SoftKill()
- This topic has 1 reply, 2 voices, and was last updated 15 years, 2 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Home › Forums › TimelineFX Module › SoftKill()
Suppose I’ve got a candle flame that I want to extinguish, I thought Softkill() would be the tool for the job yet I’m unable to suss out exactly how it works.
Consider the code below. I’d like the flame to go out when the RMB is clicked:
Framework brl.d3d7max2d
Import rigz.timelinefx
Graphics 800, 600
Global p:tlParticleManager = CreateParticleManager(500)
p.SetScreenSize(800, 600)
Global fx:tlEffectsLibrary = LoadEffects("mvparticles.eff")
Global smoke:tlEffect = fx.GetEffect("magicvillefx/flaskboil")
SetUpdateFrequency(60)
p.SetOrigin(GraphicsWidth() / 2, GraphicsHeight() / 2)
While Not KeyDown(KEY_ESCAPE)
Cls
If MouseHit(1)
tempeffect:tlEffect = CopyEffect(smoke, p)
tempeffect.setsizex(Rnd(0.5,1.5))
tempeffect.SetX(MouseX())
tempeffect.SetY(MouseY())
p.AddEffect(tempeffect)
EndIf
If MouseHit(2)
'do what???
EndIf
p.Update()
p.DrawParticles()
Flip
Wend
I know the code is a mess but I’m just playing with stuff so it doesn’t much matter.
[edit] Never mind. Figured it out 30 seconds after I posted. 🙄
I thought smoke.softkill() would work, when I actually needed tempeffect.softkill().
Glad you figured it out 🙂
While we’re on the subject of candles, I was playing about with a candle effect, I’ve attached it. Didn’t get very far with it but might give you some more ideas.
You must be logged in to reply to this topic.