User Tools

Site Tools


crpl:docs:getwall

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
Last revisionBoth sides next revision
crpl:docs:getwall [2014/01/08 23:17] – [GetWall] Flabortcrpl:docs:getwall [2018/05/01 20:22] – add example Grabz
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]]
 =====  GetWall  ===== =====  GetWall  =====
Line 12: Line 11:
 Values in between represent varying degrees of health for the wall. Values in between represent varying degrees of health for the wall.
 === Examples === === Examples ===
-<code>example goes here</code> +Spawn walls under this unit based on its cell width and cell height. Repair these walls every 10 seconds, effectively making them Crazonium (invincible) walls. 
 +<code> 
 +GetTimer0 eq0 if 
 + 300 SetTimer0
  
-=== Possible Issues === + CurrentX ->x 
-In one coder's experience, this removes the wall. <del>This can be fixed by adding "dup SetWall" after using GetWall.</delNo. Don't do this. Ignore this user.+ CurrentY ->y 
 + 
 + Self CONST_CELLWIDTH GetUnitAttribute ->cellWidth 
 + Self CONST_CELLHEIGHT GetUnitAttribute ->cellHeight 
 + 
 + <-cellWidth 2 div ->cellWidthRadius 
 + <-cellHeight 2 div ->cellHeightRadius 
 + 
 + <-y <-cellHeightRadius add 1 add <-y <-cellHeightRadius sub do 
 + <-x <-cellWidthRadius add 1 add <-x <-cellWidthRadius sub do 
 + I J 1 SetWall 
 + loop 
 + loop 
 +endif 
 +</code
crpl/docs/getwall.txt · Last modified: 2018/05/10 22:18 by Grabz