Forum
![>](img/i_next.png)
![>](img/icons/cs2d.png)
![>](img/i_next.png)
![>](img/i_next.png)
Cs2d Buildings ID's
6 replies![To the start](img/i_first.png)
![Previous](img/i_prev.png)
![Next](img/i_next.png)
![To the start](img/i_last.png)
![√](img/ok.gif)
![√](img/ok.gif)
![√](img/ok.gif)
just go back to the editor and take a look at the env_building IDs. they are true. I don't see any problems with this. just ignore the skipped IDs.
please note that lasermines have to be set to the right direction when set with editor/command. they have to face a wall otherwise they will explode/not be created. try the directions/angles 0, 90, 180 and 270
![•](img/dot.gif)
![](img/smiles/smile.gif)
EDIT
In case of Laser mine building function how can i directions/angles on Lua ?
first time its Explode
second time its : LUA ERROR : spawnobject - Wrong tiles properties !
and start to give me LUA ERRORS
attempt to Call a Nil Values !
edited 2×, last 12.03.10 11:46:02 pm
![cs2d cmd](img/i_codehelp.png)
I don't know what your cod.spawnobject is and how you pass the parameters to the original command. I noticed that you pass one parameter less (mode parameter?). your command has bugs if it causes Lua errors (because a CS2D command like spawnobject does never cause Lua errors).
however:
- type: 21
- x / y: a tile position of a tile which is a FLOOR tile next to a WALL tile
- rot: one value of these 4: 0, 90, 180, 270. depends on which side the wall is
- mode: just 0 (doesn't matter for this object!)
- team: 0 for neutral, 1 for t or 2 for ct mine
- player: id of the player who created it or just 0
type, x, y and rot are essential. the other 3 params can just be 0 and it will still work.
most "difficult" thing is rot:
if the wall is UNDER the field (x|y) -> rot 0 (laser goes up)
if the wall is LEFT of the field (x|y) -> rot 90 (laser goes right)
if the wall is OVER the field (x|y) -> rot 180 (laser goes down)
if the wall is RIGHT of the field (x|y) -> rot 270 (laser goes left)
also see black values here:
![IMG:https://www.carnagecontest.com/img/help_angles.gif](https://www.carnagecontest.com/img/help_angles.gif)
hope that helps.
oh: and note that there can only be ONE object (building/mine) per tile.
![](img/smiles/smile.gif)
![To the start](img/i_first.png)
![Previous](img/i_prev.png)
![Next](img/i_next.png)
![To the start](img/i_last.png)