User Tools

Site Tools


prpl:initmissile

Differences

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

Link to this comparison view

Next revision
Previous revision
prpl:initmissile [2016/12/02 18:33] – external edit 127.0.0.1prpl:initmissile [2017/10/28 02:48] (current) – Added critical workaround information and fixed argument interpretation. GameGibu
Line 1: Line 1:
 <- [[.:prplreference| PRPL reference]] <- [[.:prplreference#everything_else_2|Everything Else 2]] <- [[.:prplreference| PRPL reference]] <- [[.:prplreference#everything_else_2|Everything Else 2]]
  
-=====  INITMISSILE  =====+=====  InitMissile  =====
  
 ^Arguments^Result^Notation^ ^Arguments^Result^Notation^
-| | | [ - ] |+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. 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.
  
 === Examples === === Examples ===
-<code>i3 = GetIntFromStack(); //Enemy bool  +<code> 
-i2 = GetIntFromStack(); //Target Particle UID (can be virtual)  +# Fire a missile at the nearest enemy particle within 40 map tiles 
-i1 = GetIntFromStack(); //Missile UID  +GetNearestTarget(GetMouseCell 40 1 0 0 1 0->Target 
- +"Missile" CurrentCoords CreateUnit ->UID 
 +<-UID 1.0 SetUnitHealth 
 +<-UID <-Target 1 InitMissile
 </code> </code>
  
prpl/initmissile.txt · Last modified: 2017/10/28 02:48 by GameGibu