
Forum




Activating a script inside a map
2 replies




There are other methods:
1. A lua file named the same as the map.
2. Server lua --> sys/lua/*.*
Here is button press detection:

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




