Forum

> > CS2D > General > communicating "map - lua"
ForenübersichtCS2D-ÜbersichtGeneral-ÜbersichtEinloggen, um zu antworten

Englisch communicating "map - lua"

1 Antwort
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt communicating "map - lua"

vrkiller
User Off Offline

Zitieren
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?

alt Re: communicating "map - lua"

DC
Admin Off Offline

Zitieren
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)
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antwortenGeneral-ÜbersichtCS2D-ÜbersichtForenübersicht