Hey, I've been working on a sidescroller arena type game, and I need some assistance with actor events to allow me to switch one unit's actor with another different actor when the player activates an ability. The unit has to remain moving at whatever speed it was moving before the player used the ability. Basically, I need to change the units host site operations, so that instead of having an explicit rotation facing to the right, it is facing to the left. So I'll either need to replace the actor, or find a way to change the units host site operations. Regardless, I have little to no experience with actors so far and I really could use some assistance here.
Instead of swapping actors consider applying a hidden behavior to the unit, and then in the actor's events listen for that behavior's On event and send a Model Swap message. Then do the same with the off event, using Model swap to return to the original model. That should be much simpler.
e: Sorry I didn't fully understand your question the first time around, if you aren't just switching models and need a new actor then you'll need to set up events so the first actor sends a Destroy message and the second sends a Create message in response to the same event. (Abil.YourAbility.SourceCastStart, for example.)
Instead of swapping actors consider applying a hidden behavior to the unit, and then in the actor's events listen for that behavior's On event and send a Model Swap message. Then do the same with the off event, using Model swap to return to the original model. That should be much simpler.
e: Sorry I didn't fully understand your question the first time around, if you aren't just switching models and need a new actor then you'll need to set up events so the first actor sends a Destroy message and the second sends a Create message in response to the same event. (Abil.YourAbility.SourceCastStart, for example.)
Yeah that would work, personally I would make morph ability since it would give me more options.
This worked, but there's still a problem. When the actor is changed, the animation defaults to a standing animation until the unit comes to a complete stop, rather than the moving animation that it should be using. Is there a way to reset the unit animation?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hey, I've been working on a sidescroller arena type game, and I need some assistance with actor events to allow me to switch one unit's actor with another different actor when the player activates an ability. The unit has to remain moving at whatever speed it was moving before the player used the ability. Basically, I need to change the units host site operations, so that instead of having an explicit rotation facing to the right, it is facing to the left. So I'll either need to replace the actor, or find a way to change the units host site operations. Regardless, I have little to no experience with actors so far and I really could use some assistance here.
@Timthetoolman: Go
Instead of swapping actors consider applying a hidden behavior to the unit, and then in the actor's events listen for that behavior's On event and send a Model Swap message. Then do the same with the off event, using Model swap to return to the original model. That should be much simpler.
e: Sorry I didn't fully understand your question the first time around, if you aren't just switching models and need a new actor then you'll need to set up events so the first actor sends a Destroy message and the second sends a Create message in response to the same event. (Abil.YourAbility.SourceCastStart, for example.)
Yeah that would work, personally I would make morph ability since it would give me more options.
This worked, but there's still a problem. When the actor is changed, the animation defaults to a standing animation until the unit comes to a complete stop, rather than the moving animation that it should be using. Is there a way to reset the unit animation?