- Joined
- May 9, 2014
- Messages
- 1,820
Hey, everyone. I'm trying out Wurst, and I think this snippet might help out with initialization heavy processes. (Its' a simple one, only that I can't seem to find it in the Wurst Standard Library)
I got the ForForce idea from TrollBrain so he gets some of the credit for this.
Wurst:
package InitPackage
/*
InitPackage - A simple Snippet for dealing with op-limits...
------------------------------------------------------------
Credits to Troll-Brain for the ForForce exploit.
Documentation:
--------------
public function onMapStartDelay(code func)
Creates a trigger with a timer that will execute when done.
Makes initialization of certain things easy, but will cause
a lag spike.
public function onMapStart(code func)
internally calls ForForce which allows for doing initialization-
heavy processes without interrupting the main thread.
*/
public function onMapStartDelay(code func)
CreateTrigger()
..registerTimerEvent(0., false)
..addCondition(Condition(func))
..addCondition(Condition(() -> DestroyTrigger(GetTriggeringTrigger())))
public function onMapStart(code func)
ForForce(bj_FORCE_PLAYER[0], func)
Last edited: