|Svyatchenko Yuri (Berrod)||04.02.2021 17:57|
|Hello. Please help me on this issue:
how to make the "onUpdate" function be called in a similar way as in the Motorized specialization? I mean:
1. if the motor is running (self.spec_motorized.isMotorStarted = true) - the "onUpdate" function is called constantly.
2. if the motor does not work (self.spec_motorized.isMotorStarted = false) - the "onUpdate" function is not called.
or another example in the Enterable specialization:
1. if the player is inside the vehicle (self.spec_enterable.isControlled = true) - the "onUpdate" function is called constantly.
2. if the player left the vehicle (self.spec_enterable.isControlled = false) - the "onUpdate" function is not called.
In other words, I need a flag that works in a similar way.
|Bilbo Beutlin (BBeutlin)||04.02.2021 23:54|
|This is a combination of eventListeners in function registerEventListeners() with raiseActive().
The 'raiseActive' triggers the associated eventListener. So the related onFunction is only processed if needed.
You'll find many examples in the specialization LUA codes.
|Svyatchenko Yuri (Berrod)||05.02.2021 00:37|
|Thank you for quick answer.
The two days of torture are over. Everything worked out!!
where can I find or extract the vanilla LUA codes?
Bilbo Beutlin (BBeutlin):"...You'll find many examples in the specialization LUA codes."
After installing the Remote Debugger the scripts can be found at:
Maybe different depending on install location and debugger version.
|Mike Lang (mike990)||03.12.2021 13:33|
|ich brauche das neue update 126.96.36.199 für meine mods.Mit Freundlichen Grüßen Herr lang
Note: Log in to post. Create a new account here.