WarCraft: Source

 

Beam3

Page history last edited by freddukes@... 1 yr ago

Beam3


This beam connects lots of users together from a list. The beam starts at X,Y,Z, then it will connect all users via a beam...

 

The correct syntax is:

 

wcs.Effect().Beam3(<x>, <y>, <z>, <['userid1','userid2','etc']>, <life>, <red>, <green>, <blue>)

 

  • X, Y, Z - The co-ordinates where the origin of the beam will start
  • List of userids - Place each userid that you want to connect the beam to inside quotation marks. Split them up using a comma
  • Life - How long the effect will stay there
  • Red - The red color of the beam
  • Green - The green color of the beam
  • Blue - The blue color of the beam


Example:

 

def player_hurt(ev):

    my_player_list = []

    wcs.Command(ev['userid']).Near(150,AddToList)

    # All the players within a distance of 150 are now added to the list

    x,y,z = es.getplayerlocation(ev['userid'])

    # Store the co-ordinates of the player in variables 'x','y' and 'z'

    wcs.Effect().Beam3(x, y, z,my_player_list, 5, 255, 0, 0)

 

def AddToList(near_player, userid):

    my_player_list.append(near_player)

 

Comments (0)

You don't have permission to comment on this page.