Forum

> > CS2D > General > Cs2d Buildings ID's
Forums overviewCS2D overviewGeneral overviewLog in to reply

English Cs2d Buildings ID's

6 replies
To the start Previous 1 Next To the start

old Cs2d Buildings ID's

memo
COMMUNITY BANNED Off Offline

Quote
Hi all , i wondered what the Cs2d Buildings ID's i know i can find them on Editor , but they are not right , all Buildings ID's on Editor are right but the Mines ID = 20 Not 15 / also i need Laser Mine ID ?

old Re: Cs2d Buildings ID's

DC
Admin Off Offline

Quote
the IDs in the editor are correct.

√ yes, there is nothing with ID 15, 16, 17, 18 and 19!
√ yes, mines DO have the ID 20
√ and yes lasermines do have the ID 21. they are listed there as well.

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

old Re: Cs2d Buildings ID's

DC
Admin Off Offline

Quote
yeah.. that's just exactly the same list as you see it in the editor. but don't get confused by the line numbers at the beginning. they are absolutely unimportant.

old Re: Cs2d Buildings ID's

memo
COMMUNITY BANNED Off Offline

Quote
Thanks Guys i get the idiea

EDIT
In case of Laser mine building function how can i directions/angles on Lua ?

Spoiler >


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

old Re: Cs2d Buildings ID's

DC
Admin Off Offline

Quote
the original command (CS2D command, not Lua, has to be executed with parse therefore) is cs2d cmd spawnobject

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


hope that helps.
oh: and note that there can only be ONE object (building/mine) per tile.

old Re: Cs2d Buildings ID's

memo
COMMUNITY BANNED Off Offline

Quote
Yea its work now , thanks DC for this important info about spawnobject , its really help me
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview