User Tools

Site Tools


crpl:docs:getvoid

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
crpl:docs:getvoid [2013/01/18 01:34] grauniadcrpl:docs:getvoid [2021/02/05 11:43] (current) – Rmoved discussion tag Karsten75
Line 1: Line 1:
-~~DISCUSSION~~+
 <- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#terrain_and_wall_commands|Terrain and Wall Commands]] <- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#terrain_and_wall_commands|Terrain and Wall Commands]]
 =====  GetVoid  ===== =====  GetVoid  =====
Line 8: Line 8:
  
 === Description === === Description ===
-If the terrain cell is void space a 1 is pushed to the stack, 0 otherwise.+If the terrain cell is void space or out of bounds, a 1 is pushed to the stack, 0 otherwise.
 === Examples === === Examples ===
-<code>example goes here</code> +Every 2 seconds, find a random non-void coordinate on the map and add 8 creeper on it: 
 +<code> 
 +GetTimer0 eq0 if 
 + 60 SetTimer0 
 + 
 + 1 ->isVoid 
 + 
 + while <-isVoid repeat 
 + RandCoords ->y ->x 
 + <-x <-y GetVoid ->isVoid 
 + 
 + <-isVoid not if 
 + <-x <-y 8 AddCreeper 
 + endif 
 + endwhile 
 +endif 
 +</code> 
  
crpl/docs/getvoid.txt · Last modified: 2021/02/05 11:43 by Karsten75