User Tools

Site Tools


4rpl:commands:setfieldrect

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
4rpl:commands:setfieldrect [2021/02/08 03:18] – Expand with more information Grabz4rpl:commands:setfieldrect [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 21: Line 21:
   * **affected**: 0 means the field applies to both creeper and AC. 1 means creeper only, and 2 means AC only.   * **affected**: 0 means the field applies to both creeper and AC. 1 means creeper only, and 2 means AC only.
   * **deploy**: If //true //then values are written to the game's field array. If //false//, then negative values are written to the game's field array. Useful for exactly reversing a deployed field.   * **deploy**: If //true //then values are written to the game's field array. If //false//, then negative values are written to the game's field array. Useful for exactly reversing a deployed field.
 +
 +Note: The values are read from the bottom left corner, doing a row at a time.  So if you're doing the double for loop like the example, the inner loop has to be x, and the outer loop has to be z.  
  
  
 ===== Examples ===== ===== Examples =====
 <code 4rpl> <code 4rpl>
-CreateList ->field +:Awake 
-V2(1 0) ->v +   CreateList ->field 
-do (21 0) +   V2(1 0) ->v 
-   do(101 0) +   do (21 0) 
-      AppendToList(<-field <-v)+      do(101 0) 
 +         AppendToList(<-field <-v) 
 +      loop
    loop    loop
-loop +   SetFieldRect(119 86 <-field 101 1000000 0 0 true)
-SetFieldRect(119 86 <-field 101 1000000 0 0 true)+
 </code> </code>
 <=[[4rpl:start| Index]] <=[[4rpl:start| Index]]
  
4rpl/commands/setfieldrect.1612754299.txt.gz · Last modified: 2025/02/14 14:56 (external edit)