Forum

> > CS2D > Scripts > Editor's Trigger_Start comes before Lua?
Forums overviewCS2D overview Scripts overviewLog in to reply

English Editor's Trigger_Start comes before Lua?

8 replies
To the start Previous 1 Next To the start

old Editor's Trigger_Start comes before Lua?

Apache uwu
User Off Offline

Quote
Easy enough.

I want to stop everything at Trigger_Start.

In the editor Trigger_Start triggers foo,foo1,foo2.


While in Lua I have.

1
2
3
4
5
6
7
8
9
10
addhook("trigger","_trigger")
addhook("triggerentity","_triggerentity")

function _trigger()
	return 1
end

function _triggerentity()
	return 1
end

The entities still get triggered! Is it possible to stop the map's trigger_start with lua?

I put this code at the very top, but map loading overrides Lua.


Any ideas?

old Re: Editor's Trigger_Start comes before Lua?

Yates
Reviewer Off Offline

Quote
I tried such thing once, it never gets triggered at the start (New game), only when you restart round or change game mode (Which also restarts the round)

Btw, don't go editing maps. Make your own

old Re: Editor's Trigger_Start comes before Lua?

Banaan
User Off Offline

Quote
Trigger start works on roundstart right? (Haven't used it for a long, long time...) So what if you just restart the round after loading the map? Then the hooks would already be added and ready to stop the trigger, right?

old Re: Editor's Trigger_Start comes before Lua?

Yates
Reviewer Off Offline

Quote
user Banaan has written
Trigger start works on roundstart right? (Haven't used it for a long, long time...) So what if you just restart the round after loading the map? Then the hooks would already be added and ready to stop the trigger, right?

But then the trigger already would have started, restarting the round would be annoying everytime.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview