• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Properly Adding/Substracting Attributes

Status
Not open for further replies.
Level 4
Joined
Dec 30, 2006
Messages
84
:grin: Again me, who else could it be... The guy with the most Threads started by him in GUI section.....

Here we go again: :smile:
Since some of You might know...a while ago I was trying to change Primary attribute of the Unit with Morphing... And Because that didn't give wanted results...

I started of thinking the whole thing again, with ability based on footman's defend.
Here is the trigger for string 'defend'.
  • Use Thunder Maul
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(defend))
    • Actions
      • Special Effect - Create a special effect attached to the hand,right of (Triggering unit) using Hammer_Big(1).mdx
      • Hero - Modify Agility of (Triggering unit): Subtract (10 + (5 x (Level of Use Thunder Maul for (Triggering unit))))
      • Hero - Modify Strength of (Triggering unit): Add (10 + (5 x (Level of Use Thunder Maul for (Triggering unit))))
And trigger for 'undefend'
  • Use Wind Blade
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(undefend))
    • Actions
      • Special Effect - Destroy (Create a special effect using Hammer_Big(1).mdx On (Triggering unit) 's hand,right)
      • Hero - Modify Strength of (Triggering unit): Subtract (10 + (5 x (Level of Use Thunder Maul for (Triggering unit))))
      • Hero - Modify Agility of (Triggering unit): Add (10 + (5 x (Level of Use Thunder Maul for (Triggering unit))))
      • Special Effect - Create a special effect attached to the hand,right of (Triggering unit) using Blade_Long.mdx

Now, to the problem(s): As you can see the trigger is modifying STR and AGI; but when I learn a new level of ability and string 'defend' is "ON".
Here comes the problem when hero undefends himself the attributes are restored with a new factor (STR losses 5 points, but AGI is 5 points higher).

The second problem is that I am using weaponless model, so I attach weapon models when this ability is learned (for default attach I use blade_long.mdx), then when uses 'defend' the blade should be removed and a new weapon used instead...also when 'undefend' is used the blade should be restored.


Help would be welcome :)
 
Level 21
Joined
Jan 5, 2005
Messages
3,515
As you can see the trigger is modifying STR and AGI; but when I learn a new level of ability and string 'defend' is "ON".
Here comes the problem when hero undefends himself the attributes are restored with a new factor (STR losses 5 points, but AGI is 5 points higher).

why not just add the attributes to the hero again when it levels up?

you know event - hero gains a level, condition triggering unit currect order is defend, action add attributes.

you could also make defend an auroa or an item i guess.
 
Level 4
Joined
Dec 30, 2006
Messages
84
I don't want to have this solved via items, because I already have that done via buffs and item manipulation.

I would like that based on 1 ability... tell me to stop if not possible ^^

EDIT:

After some harder testing...I found out that the item version have similar issues...
 
Last edited:
Level 4
Joined
Dec 30, 2006
Messages
84
OK I solved the attachment issue with variable, but not everything :confused:
With setting variable whic contains information about attached things, and after using the defend to destroy that variable and setting of new one whic contais a new model...however thats take some time to remove old weapon so for a time instance whic is very various unit have 2 weapons...:eekani: :confused:

Also there is another problem.... If unit dies with defend toggled on... after revival her stats are completely messed up(agility is a way higher than strength...)

....
:sigh: Enough of WE for today :D Good Night ^^

I figured out most of the things now.... There is only 1 thing that is bothering me...When unit dies under issued order ... Agility is not restored...

So I wanna know if there is a way so that when unit dies under specific order to restore her attributes after revival, tryed a few things... it restores attributes if unit dies with order or without order... some kind of stupid...
 
Last edited by a moderator:
Status
Not open for further replies.
Top