User Tools

Site Tools


prpl:createunit

Differences

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

Link to this comparison view

Next revision
Previous revision
prpl:createunit [2016/12/02 23:33] – external edit 127.0.0.1prpl:createunit [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 1: Line 1:
-<- [[.:prplreference| PRPL reference]] <- [[.:prplreference#everything_else_2|Everything Else 2]]+<- [[.:prplreference| PRPL reference]] <- [[.:prplreference#units|Units]]
  
-=====  CREATEUNIT  =====+=====  CreateUnit  =====
  
 ^Arguments^Result^Notation^ ^Arguments^Result^Notation^
-| | | [ - ] |+Unit Type, X cell coord, Y cell coord UID | [ s1 i1 i2 i3 ] |
  
  
 === Description === === Description ===
 +
 +Creates a unit of type ''s1'' at cell coordinates ''i1'',''i2''. Returns the UID of the created unit, or -1 if the command fails. A list of unit types can be found [[.:unittypelist|here]]. Note that unit type strings are case-sensitive.
  
 === Examples === === Examples ===
 +<code prpl>
 +# Create a PRPL core at map cell 1,1
 +CreateUnit("PRPLCORE" 1 1) ->UID
 +</code>
 <code> i2 = GetIntFromStack(); //Y cell  <code> i2 = GetIntFromStack(); //Y cell 
  i1 = GetIntFromStack(); //X cell   i1 = GetIntFromStack(); //X cell 
prpl/createunit.1480721638.txt.gz · Last modified: 2025/02/14 14:56 (external edit)