Forum

> > CS2D > General > Activating a script inside a map
ForenübersichtCS2D-ÜbersichtGeneral-ÜbersichtEinloggen, um zu antworten

Englisch Activating a script inside a map

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Re: Activating a script inside a map

Apache uwu
User Off Offline

Zitieren
I don't think that is possible within the map editor.

There are other methods:

1. A lua file named the same as the map.
2. Server lua --> sys/lua/*.*

Here is button press detection: cs2d lua hook usebutton

So potentially you could do file when a person presses a button.

1
2
3
4
5
6
7
8
9
addhook("usebutton","_usebutton")

function _usebutton(id,x,y)
	if x==3 then --button x coord.
		if y==2 then --button y coord.
			dofile("sys/lua/myLua.lua") --lua to "activate"
		end
	end
end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antwortenGeneral-ÜbersichtCS2D-ÜbersichtForenübersicht