I have a beam effect with different phases. I use a Create Persistent with a finite amount of periods, which, On Expiration activates another Persistent with an infinite amount of periods.
On my actors, I have:
Beam Phase 1
Effect.PersistentA.Start -> Create
Effect.PersistentA.Stop -> Destroy
Beam Phase 2
Effect.PersistentB.Start -> Create
Effect.PersistentB.Stop -> Destroy
However, this makes a slight delay between the two beam phases in which there is no actor. I would like the first actor to disappear after the second actor is created.
I tried adding the term FromEffectTreeDescendant to the first destruction event, but it didn't work. I thought that was supposed to work, any clue why?
There will always be a 0.016 sec gap, that is how the game works. Else adjust the birth animation speeds of your beams.
Try getting your second beam on actor creation to send a message to the supporter to destroy it. You can then set the effect and actor find it using the supporter fields.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I have to say, it is definitely not a 0.016s gap, but at least a 0.5-0.75s gap. So perhaps I must have done something wrong with the FromEffectTreeDescendant term?
In any case, I used your suggestions to come to a solution. I set the first beam phase actor as a Supporter of the second phase actor. Then, instead of destroying the beam actor on Effect.PersistentA.Stop, I use an ActorCreation event on Phase2 actor, with Destroy Target ::Supporter.
This works perfectly. However, I have obviously the problem of destroying Phase1 actor if the beam is interrupted without going to Phase2. To solve this, I patched it like so: i put back the Effect.PersistentA.Stop event, tying it to a 1s timer, and destroying the actor anyways on Timer expiration. This makes the initial solution a bit messier and leaves me with a beam model lying there for 1s after being interrupted, which is less than ideal, but works well enough.
I wish I could use a Destroy message on Effect.PersistentA.Stop and override it on Effect.PersistentA.Expire (which ensures that Phase2 is being triggered). I tried putting a Create message on Effect.PersistentA.Expire in the hopes that another copy of the actor would be created, but nothing happens (I presume that Expire runs before Stop, so it creates another copy and then destroys it on Stop).
I put all these for somebody's future reference. I would say I am happy with the patchy solution, but if you (or anybody else) would find the time, I would appreciate comments and pointers.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have a beam effect with different phases. I use a Create Persistent with a finite amount of periods, which, On Expiration activates another Persistent with an infinite amount of periods.
On my actors, I have:
Beam Phase 1
Effect.PersistentA.Start -> Create
Effect.PersistentA.Stop -> Destroy
Beam Phase 2
Effect.PersistentB.Start -> Create
Effect.PersistentB.Stop -> Destroy
However, this makes a slight delay between the two beam phases in which there is no actor. I would like the first actor to disappear after the second actor is created.
I tried adding the term FromEffectTreeDescendant to the first destruction event, but it didn't work. I thought that was supposed to work, any clue why?
There will always be a 0.016 sec gap, that is how the game works. Else adjust the birth animation speeds of your beams.
Try getting your second beam on actor creation to send a message to the supporter to destroy it. You can then set the effect and actor find it using the supporter fields.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
I have to say, it is definitely not a 0.016s gap, but at least a 0.5-0.75s gap. So perhaps I must have done something wrong with the FromEffectTreeDescendant term?
In any case, I used your suggestions to come to a solution. I set the first beam phase actor as a Supporter of the second phase actor. Then, instead of destroying the beam actor on Effect.PersistentA.Stop, I use an ActorCreation event on Phase2 actor, with Destroy Target ::Supporter.
This works perfectly. However, I have obviously the problem of destroying Phase1 actor if the beam is interrupted without going to Phase2. To solve this, I patched it like so: i put back the Effect.PersistentA.Stop event, tying it to a 1s timer, and destroying the actor anyways on Timer expiration. This makes the initial solution a bit messier and leaves me with a beam model lying there for 1s after being interrupted, which is less than ideal, but works well enough.
I wish I could use a Destroy message on Effect.PersistentA.Stop and override it on Effect.PersistentA.Expire (which ensures that Phase2 is being triggered). I tried putting a Create message on Effect.PersistentA.Expire in the hopes that another copy of the actor would be created, but nothing happens (I presume that Expire runs before Stop, so it creates another copy and then destroys it on Stop).
I put all these for somebody's future reference. I would say I am happy with the patchy solution, but if you (or anybody else) would find the time, I would appreciate comments and pointers.