Forum

> > CS2D > General > Activating a script inside a map
Forums overviewCS2D overviewGeneral overviewLog in to reply

English Activating a script inside a map

2 replies
To the start Previous 1 Next To the start

old Re: Activating a script inside a map

Apache uwu
User Off Offline

Quote
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
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview