User Tools

Site Tools


prpl:initmissile

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
prpl:initmissile [2017/07/21 20:46] – content, needs a better example. GoodMorningprpl:initmissile [2017/10/28 02:48] (current) – Added critical workaround information and fixed argument interpretation. GameGibu
Line 4: Line 4:
  
 ^Arguments^Result^Notation^ ^Arguments^Result^Notation^
-| Missile Target Enemy | | [ UID PID bool - ] |+| Missile Target isAlly | | [ UID PID bool - ] |
  
  
 === Description === === Description ===
-Sets the target of a missile. FIXME May or may not work on missiles generated by built-in units.+Sets the target of a missile. FIXME May or may not work on missiles generated by built-in units. Note that in order for a PRPL-generated missile to do damage, ''%%SetUnitHealth(<-UID 1.0)%%'' (or an equivalent) //must// be called, else the missile will do no damage. The amount of health dictates the amount of damage dealt.
  
-Target is a PID, which can be virtual. Enemy seems to be whether the missile is enemy.+Target is a PID, which can be virtual.
  
 === Examples === === Examples ===
 <code> <code>
-"Missile" CurrentCoords CreateUnit <-Target 0 InitMissile+# Fire a missile at the nearest enemy particle within 40 map tiles 
 +GetNearestTarget(GetMouseCell 40 1 0 0 1 0) ->Target 
 +"Missile" CurrentCoords CreateUnit ->UID 
 +<-UID 1.SetUnitHealth 
 +<-UID <-Target 1 InitMissile
 </code> </code>
  
prpl/initmissile.1500684418.txt.gz · Last modified: 2017/07/21 20:46 by GoodMorning