Passing YOU in function EFFECT

Posted By: Anonymous

Passing YOU in function EFFECT - 06/20/15 18:58

The manual does not state that if function EFFECT is run from a entities action/function that the entities pointer is pass as the YOU point.
This should be in the notes for function EFFECT.

Or am I just benefiting from good/bad timing as the manual state EFFECT runs at the next wait?

Is the YOU pointer passed to the particle function or is the YOU pointer vagabond at the time the particle function is running?

Thank for your time and help
MAl
Posted By: Superku

Re: Passing YOU in function EFFECT - 06/20/15 22:31

Originally Posted By: online manual
If effect_local was called by an entity, the particle functions can access this entity through the you pointer. This way, the particle effect can use entity parameters.

I don't know why that sentence focusses on effect_local but on a single player system effect_local and effect behave identically anyway.
Posted By: Anonymous

Re: Passing YOU in function EFFECT - 06/20/15 22:56

Thank you Superku
I simply skipped that sentence and assumed all the information would be multiplayer specific.

Thank you again
Mal
Posted By: FBL

Re: Passing YOU in function EFFECT - 06/21/15 09:03

Originally Posted By: Superku
Originally Posted By: online manual
If effect_local was called by an entity, the particle functions can access this entity through the you pointer. This way, the particle effect can use entity parameters.

I don't know why that sentence focusses on effect_local but on a single player system effect_local and effect behave identically anyway.


Possibly it's not true when calling effect() in multiplayer games (bad idea anyway), so this information was put to effect_local().
Posted By: jcl

Re: Passing YOU in function EFFECT - 06/22/15 11:51

Yes, that's right. The effect() function is remote triggered in a multiplayer game and thus has no YOU pointer, but I would use effect_local() on the clients anyway.
© 2024 lite-C Forums