Page 1 of 1

Destroy an infinitely looping effect

Posted: Wed Jul 16, 2014 11:00 pm
by Noobasaurus
When someone enters a region, I want the object that is emitting an infinite effect to disappear (along with the effect) and a new object to spawn with an explosion effect. Everything works, but the infinite effect from the first object still persists. This is how my object odf looks.
Hidden/Spoiler:
[code][GameObjectClass]

ClassLabel = "destructablebuilding"
GeometryName = "myg1_bldg_fire_effect.msh"


[Properties]

GeometryName = "myg1_bldg_fire_effect"


FoleyFXGroup = "metal_foley"

IsNotTargetableByPlayer = "1"
MaxHealth = "99999999999"
AddHealth = "99999999999"

MapTexture = ""
MapScale = 0.0



AttachEffect = "superdupereffect""

AttachToHardPoint = "hp_fire_01"
[/code]
If you want my effect file I can provide that as well.

Re: Destroy an infinitely looping effect

Posted: Thu Jul 17, 2014 12:10 am
by AQT
How exactly are you making the first object disappear? KillObject? SetProperty with the "IsVisible" parameter?

Alternatively, you could use procedural animation to instantaneously move the object with the effect still attached to it to another location. Be sure to include the following in the object's ODF:

Code: Select all

AttachDynamic = "1" 
after the AttachEffect line.

Re: Destroy an infinitely looping effect

Posted: Thu Jul 17, 2014 2:21 pm
by Noobasaurus
I'm using KillObject, although if SetProperty with the "IsVisible" parameter gets rid of the effect then I will use that.

I will try creating an animation for the object tomorrow. Thank you for the response.

EDIT: I just tested the SetProperty method and that does not get rid of the effect.

EDIT2: I made an animation that makes the object instantly teleport away. It works fine in ZE, but in game it does not work. The animation name is the same name as its group name. I'm using PauseAnimation and PlayAnimation to play the animation. There aren't any errors in the error log.

Re: Destroy an infinitely looping effect

Posted: Thu Jul 17, 2014 2:52 pm
by AQT
Why are you using PauseAnimation?

Re: Destroy an infinitely looping effect

Posted: Thu Jul 17, 2014 4:44 pm
by Noobasaurus
I did a search and people said that using it was better. I also saw the stock scripts use it.

Re: Destroy an infinitely looping effect

Posted: Thu Jul 17, 2014 4:56 pm
by AQT
Who are those people, and in what context did you see stock scripts use it? Because in your case, there's no reason why you need it all...

Do you have "Disable Hierarchies" enabled and "Plays When Levels Begins" disabled? And are you saving the animation by clicking "Save Animations"?

Re: Destroy an infinitely looping effect

Posted: Thu Jul 17, 2014 5:21 pm
by Noobasaurus
Okay, I looked back at the ones that had pause in them, and they were before rewind. I took it out.

Yes, yes, and yes.