Forum

> > CS2D > General > communicating "map - lua"
Forums overviewCS2D overviewGeneral overviewLog in to reply

English communicating "map - lua"

1 reply
To the start Previous 1 Next To the start

old communicating "map - lua"

vrkiller
User Off Offline

Quote
communicating "map - lua"

can my lua scripts communicate with a map,
etc:
you type "open door goldroom" in your chat
and it repond to a trigger in my map that opens or closes the door, can you that, and if not can you make it dc?

old Re: communicating "map - lua"

DC
Admin Off Offline

Quote
this is possible very easily.
for example when the door entity has the name "door" you can use the following Lua code to trigger it:
1
parse("trigger door")

if you want to get the current state of the door (open/closed) you can use
1
state=entity(x,y,"state")
(you have to insert the tile coordinates of the door for x and y - use the editor to get them)
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview