• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Trigger- changing unit projectile after unit gets item

Status
Not open for further replies.
Level 3
Joined
Feb 8, 2008
Messages
34
I'm working on a map where theres different guns lying around and when a unit picks up the gun, it is attached. However, the guns have different properties so I want to make a trigger to make it so that when a unit picks up the weapon, :fp:their attack strength, attack rate, projectile art, projectile speed, and projectile homing are changed. I also need a trigger that makes it so that :fp:when a unit picks up a weapon, their previous weapon is removed. Please tell me how to make these triggers, thanks. :smile: :thumbs_up:
 
Level 28
Joined
Jun 4, 2007
Messages
1,479
For the attack changes you just need the Item Attack Fire Bonus spell and edit it so that it fits your needs.

For the weapon limit I know one way but it will be messy. You will have to make on If, Then, Else action for each weapon type you have. And set the Item class of all weapons to the same. Let's say they all are Artifact. Youi pick up a Shotgun and you already have a Gun. Then make a trigger like this:

Events:
- Unit aquires an item
Conditions:
Actions:
IF: - AND
-- Hero Manipulating Item has an item of type Gun
-- Item class of Item Being Manipulated equal to Artifact (Boolean Comparison, click the first blue text and look up the Item functions in the list)
Then - Item remove item carried by Hero Manipulating Item of type Gun
Else -
 
Level 3
Joined
Jun 13, 2006
Messages
45
I think the only way to change the projectile speed and homing is to replace a hero type by another when he picks up another weapon (remove hero->create hero at removing point). Using variables you can store inventory and exp before and reload it again after.
For attack rate and strenght, as Just Spectating said you can use an orb with your gun attachment, and modify agi/str and bonus damage. But you can also set those properties with your different hero types.
 
Level 3
Joined
Jun 13, 2006
Messages
45
you mean you can change projectile speed and homing using an orb? I don't think so. Why don't you read before answering?
 
Level 3
Joined
Jun 13, 2006
Messages
45
nah the orb can't change anything but projectile model, attack speed and damage and bonus stat... not projectile speed.
 
Level 28
Joined
Jun 4, 2007
Messages
1,479
For the attack changes you just need the Item Attack Fire Bonus spell and edit it so that it fits your needs.

That is an orb ability...
For the attack speed increase you just need the Item Attack Speed Bonus ability. Strength increase can be given with the Item Hero Stats Bonus ability.
And homing can be changed in the orb abilities. The only off these things that can't be changed with abilities is missile speed.
 
Status
Not open for further replies.
Top