WarCraft: Source

 

ViewCone

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

ViewCone


 

This command returns every user inside a cone size that is emited from the user. Imagine a cone emiting from the players eyes... The further into the distance the wider the area... like a "V" shape from the user... Everyone inside this area will return the to Callback Function.

 

The correct syntax is:

 

wcs.Command(<userid>).ViewCone(<"filter">, <ConeSize>, <ConeDistance>, <Call-Back Function>)

 

  • Userid - The userid that the cone will be 'emiting' from
  • Filter - EST player Filter....
  • Cone Size - The end with of the cone at the widest part
  • Cone Distance - How far the cone will be at it's furthest distance
  • Call Back Function - The function that will be run when the user is found within the cone

 


 

Example:

 

def player_ability_on(ev):

    userid = ev['userid']

    team = int(es.getplayerteam(userid))

    if team == 2:

        filter = '#c'

    elif team == 3:

        filter = '#t'

    wcs.Command(userid).ViewCone(filter,150,600,forkedTarget)

 

def forkedTarget(userid, attacker):

    wcs.Command(userid).Damage(forked,32,attacker)

    wcs.Effect().Beam1(attacker, userid, 1.5, 255, 255, 0)

    es.tell(attacker,'#multi','#lightgreenForked Lightning #default- #greenYou have hit %s!'%es.getplayername(userid))

 

 

Comments (0)

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