Posts: 52
Threads: 17
Joined: Feb 2013
Reputation:
0
Anyone know what can we do in OnPlayerUpdate ? I give example : I want apply something when a variable changes , so should I do codes under OnPlayerUpdate ?
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
If a variable changes, you KNOW when it changes (because YOU changed it with an operation) so why would you want to check thousands of times a second if it was changed? Just call a function to set the variable, and in that function do whatever.
EDIT: @LarzI beat me by a max of 15 seconds :/
Posts: 1,223
Threads: 5
Joined: Sep 2011
Reputation:
0
It depends on what you want to do. If you need to call something for a player roughly 25 times per second (which stacks, so 10 players = 25*10 calls per second) then you would use OnPlayerUpdate.
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
That's what OnPlayerDeath is for.
Posts: 2,628
Threads: 32
Joined: Apr 2007
Reputation:
0
The code will only stop if you return a value or if you use goto(confirm this, please, as I am not entirely sure). If you don't do either, the code will run until it reaches the end of the callback (The last closing brace)
Posts: 52
Threads: 17
Joined: Feb 2013
Reputation:
0
thank you ! so it will contunue (cause I have no returns or 'contunue'.. only conditions)