TimelineFX SetRelative()
BlitzMax Forums/BlitzMax Programming/TimelineFX SetRelative()
| ||
Anyone familiar with TimelineFX? Got an issue I can't seem to get to the bottom of. I've created a particle effect in the editor, with the "relative" flag set to True. If I then do this in code: myEffect.SetRelative(False) ...it doesn't seem to make any difference - all of the existing particles still follow the mouse, when they should stay where they were. There are reasons why I can't just set the 'relative' flag in the editor. Any ideas what I'm doing wrong on this? |
| ||
Discovered that I should be setting relativity for the emitter, rather than the whole effect, so:myEmitter:tlEmitter = myEffect.GetEmitter("emitterName") myEmitter.SetParticlesrelative(True) ...would seem to be the way - only this doesn't work either. Fails in TimelineFX.max at line 1322, claiming that 'directory' is a null object: Method GetEmitter:tlEmitter(name:String) Return tlEmitter(directory.ValueForKey(Upper(name))) End Method Stumped. |
| ||
I've only just noticed this post! If you haven't solved already I believe that if you need to get at emitters inside effects then when you copy the effect you need to set the copydirectory flag to true. Sorry the docs are a bit lacking there.myeffect.copyeffect(effectslib.geteffect("myEffect"),PM,True) |