<- [[.:prplreference| PRPL reference]] <- [[.:prplreference#everything_else_2|Everything Else 2]] ===== InitMissile ===== ^Arguments^Result^Notation^ | Missile Target isAlly | | [ UID PID bool - ] | === 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 === # 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.0 SetUnitHealth <-UID <-Target 1 InitMissile