Forum

> > CS2D > General > How to put laser tripmine.
Forums overviewCS2D overviewGeneral overviewLog in to reply

English How to put laser tripmine.

2 replies
To the start Previous 1 Next To the start

old Re: How to put laser tripmine.

DC
Admin Off Offline

Quote
You can place laser mines with Lua using cs2d lua cmd parse with cs2d cmd spawnobject (click to see parameters). You really have to take care of the position and the rotation though. This is what you have to insert for the different parameters:

• type: 21 (value for laser mine)

• x/y: position in tiles, must be a tile NEXT to a WALL tile (itself should be a floor tile though!)

• rot: must be the direction the laser will point
     there are only 4 possible directions:
     0 - laser points UP (the wall is one tile BELOW)
     90 - laser points RIGHT (the wall is one tile LEFT)
     180 - laser points DOWN (the wall in one tile ABOVE)
     270 - laser points LEFT (the wall is one tile RIGHT)

• mode: no effect here, just keep it 0

• team and player: should be obvious / see the ref page. Keep both 0 for a neutral mine (kills everyone)


When using cs2d entity Env_Building you have to take care of the same things. Next to a wall tile AND set the direction of the beam correctly (click that circle in entity properties with your right mouse button to let the line jump in 90 degree steps)
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview