User Tools

Site Tools


prpl:getallunitsinrange

Differences

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

Link to this comparison view

Last revisionBoth sides next revision
prpl:getallunitsinrange [2016/12/02 18:33] – external edit 127.0.0.1prpl:getallunitsinrange [2016/12/15 17:46] – Added content GoodMorning
Line 4: Line 4:
  
 ^Arguments^Result^Notation^ ^Arguments^Result^Notation^
-| | | [ - ] |+CellX CellY Range Shape List | [ i1 i2 f1 i3 L1] |
  
  
 === Description === === Description ===
 +Provides a list of all units within Range of the specified cell. Shape of 0 will search in a circle, 1 will search in a square. (A box search //may// be more efficient. FIXME)
 +
 +**Changed from CRPL** - This command returns a //list// in PRPL. CRPL GetAllUnitsInRange returned a pile of loose UIDs and a count.
  
 === Examples === === Examples ===
-<code> i1 = GetIntFromStack();  +<code> 
- f1 = GetFloatFromStack();  +#Suppose that there is an energy pod at (10,15and another at (15,15)... 
- gsy = GetIntFromStack() +10 10 6 0 GetAllUnitsInRange Trace 
- gsx = GetIntFromStack() +#The list will contain the UID of the pod at (10,15
- stack.Push(new Data(units))  +10 10 6 1 GetAllUnitsInRange Trace 
- +#The list will contain the UIDs of both pods 
 +0 0 9999 1 GetAllUnitsInRange Trace 
 +#The list will contain the UIDs of every pod on the map.
 </code> </code>
  
prpl/getallunitsinrange.txt · Last modified: 2016/12/15 17:51 by GoodMorning