.:[8-A]:. Computerguy419
Forum
CS2D General Activating a script inside a mapActivating a script inside a map
2 replies 1
.:[8-A]:. Computerguy419
There are other methods:
1. A lua file named the same as the map.
2. Server lua --> sys/lua/*.*
Here is button press detection: usebutton
So potentially you could do file when a person presses a button.
1
2
3
4
5
6
7
8
9
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
.:[8-A]:. Computerguy419
1