• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Trigger] Need help with trigger

Status
Not open for further replies.
Level 2
Joined
Nov 17, 2009
Messages
9
Hi. my first hive post :p uh i have a script so that when the hero goes on the item it adds a model like a sword or armor ro him, and when he takes off the item it goes away. i have a working one but its WAY Simple. to simple like if i added a sword and took off the sword it would take off the armor. o_O

Add item
  • test
    • Events
      • Unit - Villager (Male) 0001 <gen> Acquires an item
    • Conditions
    • Actions
      • Special Effect - Create a special effect attached to the chest of Villager (Male) 0001 <gen> using war3mapImported\MercenaryArmor_v2.mdx
Take off item
  • take off
    • Events
      • Unit - Villager (Male) 0001 <gen> Loses an item
    • Conditions
    • Actions
      • Special Effect - Destroy (Last created special effect)
please help so it isent so simple, im new to this kinda triggering :p
and is it working? and is it ok.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Oh, this is pretty easy, you don't need triggers for it.
(and yes: the triggers you showed are really crap... absolutely worthless, sorry for the hard words :p)
Your trigger will not work (since "Last Created Special Effect" isn't the attachment anymore from the moment another special effect is made, you should've set it to a variable in that case).

Here is what you need to do:
Go to the abilities-section and create a new spell.
It doesn't really matter which spell you pick, as long as it isn't an active one... (like an aura)
Now set all values of that spell to 0 (or set the values so they don't do anything), then set "Art - Target" to the model you want.
Don't forget to set "Target - Attachment Point" to the point where the model needs to be attached.


overhead (floats over the unit's head, but doesn't sway with)
head (sways with the unit's animation)
chest (also good for wings)
origin (usually at the base of a unit's feet)
hand
foot
weapon (for heroes)
sprite (for buildings)
medium (for buildings)
large (for buildings)


Attachment Point Modifiers:
left
right
mount (for mounted units)
rear (for quadrupeds)
first (for buildings)
second (for buildings)
third (for buildings)
fourth (for buildings)
fifth (for buildings)
sixth (for buildings)
rallypoint (for buildings)


Go to the items-page, select the item which needs the attachment and give it the ability you just created.
It should now show the attachment whenever you pick up the item and dissapear when you drop it.

Good luck ^^
 
Level 2
Joined
Nov 17, 2009
Messages
9
Oh, this is pretty easy, you don't need triggers for it.
(and yes: the triggers you showed are really crap... absolutely worthless, sorry for the hard words :p)
Your trigger will not work (since "Last Created Special Effect" isn't the attachment anymore from the moment another special effect is made, you should've set it to a variable in that case).

Here is what you need to do:
Go to the abilities-section and create a new spell.
It doesn't really matter which spell you pick, as long as it isn't an active one... (like an aura)
Now set all values of that spell to 0 (or set the values so they don't do anything), then set "Art - Target" to the model you want.
Don't forget to set "Target - Attachment Point" to the point where the model needs to be attached.


overhead (floats over the unit's head, but doesn't sway with)
head (sways with the unit's animation)
chest (also good for wings)
origin (usually at the base of a unit's feet)
hand
foot
weapon (for heroes)
sprite (for buildings)
medium (for buildings)
large (for buildings)


Attachment Point Modifiers:
left
right
mount (for mounted units)
rear (for quadrupeds)
first (for buildings)
second (for buildings)
third (for buildings)
fourth (for buildings)
fifth (for buildings)
sixth (for buildings)
rallypoint (for buildings)


Go to the items-page, select the item which needs the attachment and give it the ability you just created.
It should now show the attachment whenever you pick up the item and dissapear when you drop it.

Good luck ^^

Thank you! :)
 
Status
Not open for further replies.
Top