• 0

    posted a message on Playing Death Animation while Behavior is Active

    After many hours, I finally found a workaround for my problem. Its a combination of Data and Triggers. This is how I did it, doesn't mean it will work for every instance, but works perfectly for my map; because I have multiple abilities that can revive fallen heroes.

    The triggers I used goes like this:

    Event - Unit has Incapacitated Behavior change create Action - Set Life = 1 Hide triggering unit Create 1 fallen hero (Body) for player owner of triggering unit at position triggering unit (This is a place holder unit that is the death animation for the unit type) Set (Last Created Unit) model to Specter Death "In this case the actor is a spectre" Play Death animation for (actor for (Last created unit)) as default Wait 2 seconds Add behavior Freeze animation (this is a behavior that changes the global time scale to .001 Wait for conditions -> triggering unit has incapacitated = false if/then/else if (last created unit) has behavior (remove body) = true then remove last created unit else change ownership to 0 "neutral" finally show triggering unit and create a secondary trigger that will move the hero to the respawn location

    My data editing removes the incapacitated behavior and adds a dumby behavior to the body which i dubbed as remove body. So any ability that revives a heroes is simply remove the incapacitated behavior, then add remove body behavior to the body and the triggers will take care of the rest. If anyone has any questions or comments let me know.

    Posted in: Triggers
  • 0

    posted a message on Playing Death Animation while Behavior is Active

    I am attempting to make a trigger that functions very much like the incapacitated feature in the Terran campaign. I have everything working perfectly except for the death animation, it gets pretty weird or stops all animations on the actor all together. Could someone point me in the right direction or fix my trigger to make it work smoothly. I pretty much want the unit to play the death animation for the entire duration while the behavior is active. This is what I have so far. I have tried multiple variations of the animation - set animation duration/time etc and have not had any luck making it stick.

    Unit - Any Unit has (Fallen Hero) Change Create - This is my rendition of the incapacitated behavior Unit - Set unit (Trigger unit) model to Specter Death Animation - Play Death Animation for (Actor for (Trigger unit) General - Wait 2.0 game time seconds Animation - set the default animation duration for (Actor for (triggering unit) to 30 seconds General - wait for conditions, checking every 1 game time seconds -> conditions (Triggering unit) has Fallen Hero) == False Unit - Set unit (Triggering unit) model to spectre

    Posted in: Triggers
  • 0

    posted a message on Transfering Inventory to Trained Unit

    Thanks man, it works perfectly

    Posted in: Triggers
  • 0

    posted a message on Transfering Inventory to Trained Unit

    There are three unit involved in this trigger. The barracks (unit doing the training), the SCV (unit inside the cargo of the barracks), and the unit being trained (Marine). As previously stated the SCV needs to be inside the barrack in order to train the marine. This is pretty much accomplished with requirements and do not need to help with this. So I have my 3 units, unit in triggering units cargo (SCV), triggering unit (Barracks) and Triggering Progress Unit (Marine). I want all the items from the Unit in Triggering Units Cargo (SCV) to be transfered to Triggering Progress Unit (Marine) before I remove the "SCV" from the game. This would pretty much give the illusion that the SCV has been trained to a marine and retains all the items during the transition. - The two transferring unit's inventories are identical - There is only 1 cargo space in the barracks With this said I am not having any luck transferring or moving any items from one unit to the next. The only working part that my trigger has managed is to replace or remove the SCV inside the Barracks with the "Unit - Remove (cargo unit in (triggering unit) at slot 1) from the game" Thanks for any input

    Posted in: Triggers
  • 0

    posted a message on Transfering Inventory to Trained Unit

    Looking for help from anyone who would be able to tell me how to write a trigger that would transfer inventory items from one unit to another unit, however the kickers is; In order to train a hero in my map you need to be in the cargo of a building (barracks).

    I have had several attempts at this trigger and cannot seem to figure out how to make it work! If there are any workarounds, or a way to simply replace the inventory unit with the trained unit type (while keeping the inventory intact), the help would be much appreciated. I would like it to be along the lines of

    Event: Unit - Any Unit training progress is Completed

    Conditions: (Triggering progress unit type) == Marine

    Action: ...

    Posted in: Triggers
  • To post a comment, please or register a new account.