This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| prpl:initmissile [2016/12/02 23:33] – external edit 127.0.0.1 | prpl:initmissile [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| <- [[.: | <- [[.: | ||
| - | ===== | + | ===== |
| ^Arguments^Result^Notation^ | ^Arguments^Result^Notation^ | ||
| - | | | | [ - ] | | + | | Missile Target isAlly |
| === 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, '' | ||
| + | |||
| + | Target is a PID, which can be virtual. | ||
| === Examples === | === Examples === | ||
| - | < | + | < |
| - | i2 = GetIntFromStack(); //Target | + | # Fire a missile at the nearest enemy particle within 40 map tiles |
| - | i1 = GetIntFromStack(); | + | GetNearestTarget(GetMouseCell 40 1 0 0 1 0) ->Target |
| - | + | "Missile" CurrentCoords CreateUnit ->UID | |
| + | <-UID 1.0 SetUnitHealth | ||
| + | <-UID <-Target 1 InitMissile | ||
| </ | </ | ||