• 🏆 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] Hi there, need help making an item

Status
Not open for further replies.
Level 4
Joined
Dec 24, 2014
Messages
37
Hello.
I have this problem, need to create an item:
Midas Sword.
What does this item?
Basically grants you with a bonus gold every time you kill a unit (ally or enemy i dont have any problem with that).
Needs to be an item ability and the hero must have to be equipped with it.
I make an item that only make the effect of
transmute, when i kill the unit run the effect of transmute, but nothing more happens. i try and try different forms but nothing works.
Even i try with triggers. (i dont know much either)
So, what more can i do?
if you want helpme (and if you need) i can give you my map (mmmm but i have to post it here i guess)


Edit: is a passive ability of the item
 
Level 14
Joined
Jan 24, 2017
Messages
246
How about something simple like this? Then you dont even need an ability.
  • Midas Sword
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item carried by (Killing unit) in slot 1)) Equal to Midas Sword
          • (Item-type of (Item carried by (Killing unit) in slot 2)) Equal to Midas Sword
          • (Item-type of (Item carried by (Killing unit) in slot 3)) Equal to Midas Sword
          • (Item-type of (Item carried by (Killing unit) in slot 4)) Equal to Midas Sword
          • (Item-type of (Item carried by (Killing unit) in slot 5)) Equal to Midas Sword
          • (Item-type of (Item carried by (Killing unit) in slot 6)) Equal to Midas Sword
    • Actions
      • Player - Add 5 to (Owner of (Killing unit)).Current gold
 
Hello.
I have this problem, need to create an item:
Midas Sword.
What does this item?
Basically grants you with a bonus gold every time you kill a unit (ally or enemy i dont have any problem with that).
Needs to be an item ability and the hero must have to be equipped with it.
I make an item that only make the effect of
transmute, when i kill the unit run the effect of transmute, but nothing more happens. i try and try different forms but nothing works.
Even i try with triggers. (i dont know much either)
So, what more can i do?
if you want helpme (and if you need) i can give you my map (mmmm but i have to post it here i guess)


Edit: is a passive ability of the item
You've tried something like this?
  • GoldOnKill
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) has an item of type Claws of Attack +15) Equal to True
    • Actions
      • Player - Add 1000 to (Owner of (Killing unit)) Current gold
 
Level 4
Joined
Dec 24, 2014
Messages
37
You've tried something like this?
  • GoldOnKill
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) has an item of type Claws of Attack +15) Equal to True
    • Actions
      • Player - Add 1000 to (Owner of (Killing unit)) Current gold
oh man, thanks you're the best
i just tested it, and it works THANKS............. BUT
not the way i want.
it seems so unnatural, it just gives the gold directly to the gold bar indicator and doesnt display the gold bonus you get when you killed the unit on screen.
for example, the alchemist in DotA: when you kill a unit you can see the bonus gold just right above the unit you killed. like +18 +30 +45
the midas item in DotA do the same.
My item is, well.... a sword so it have to work differently (may be like the alchemist's ability)
since my map is a single player map, i resolve this with creating a dropping gold coin action.
i just had to change the action and its works fine to me.
again THANKS MAN
 
Level 4
Joined
Dec 24, 2014
Messages
37
How about something simple like this? Then you dont even need an ability.
  • Midas Sword
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item carried by (Killing unit) in slot 1)) Equal to Midas Sword
          • (Item-type of (Item carried by (Killing unit) in slot 2)) Equal to Midas Sword
          • (Item-type of (Item carried by (Killing unit) in slot 3)) Equal to Midas Sword
          • (Item-type of (Item carried by (Killing unit) in slot 4)) Equal to Midas Sword
          • (Item-type of (Item carried by (Killing unit) in slot 5)) Equal to Midas Sword
          • (Item-type of (Item carried by (Killing unit) in slot 6)) Equal to Midas Sword
    • Actions
      • Player - Add 5 to (Owner of (Killing unit)).Current gold
Thanks man for the help.
Problem solve. (i used the solution of another member but thanks anyway)
i have more requests to take care :D
 
oh man, thanks you're the best
i just tested it, and it works THANKS............. BUT
not the way i want.
it seems so unnatural, it just gives the gold directly to the gold bar indicator and doesnt display the gold bonus you get when you killed the unit on screen.
for example, the alchemist in DotA: when you kill a unit you can see the bonus gold just right above the unit you killed. like +18 +30 +45
the midas item in DotA do the same.
My item is, well.... a sword so it have to work differently (may be like the alchemist's ability)
since my map is a single player map, i resolve this with creating a dropping gold coin action.
i just had to change the action and its works fine to me.
again THANKS MAN
You could add a floating text in that trigger, give it a color and whatever.
Something like this would probably do:

  • Set t_loc1 = (Position of (Dying unit))
  • Floating Text - Create floating text that reads +25 at t_loc1 with Z offset 128.00, using font size 8.00, color (95.00%, 85.00%, 10.00%), and 0.00% transparency
  • Custom script: call RemoveLocation(udg_t_loc1)
  • Floating Text - Set the velocity of (Last created floating text) to 24.00 towards 90.00 degrees
  • Floating Text - Change (Last created floating text): Disable permanence
  • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
  • Floating Text - Change the fading age of (Last created floating text) to 2.25 seconds
 
Level 4
Joined
Dec 24, 2014
Messages
37
You could add a floating text in that trigger, give it a color and whatever.
Something like this would probably do:

  • Set t_loc1 = (Position of (Dying unit))
  • Floating Text - Create floating text that reads +25 at t_loc1 with Z offset 128.00, using font size 8.00, color (95.00%, 85.00%, 10.00%), and 0.00% transparency
  • Custom script: call RemoveLocation(udg_t_loc1)
  • Floating Text - Set the velocity of (Last created floating text) to 24.00 towards 90.00 degrees
  • Floating Text - Change (Last created floating text): Disable permanence
  • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
  • Floating Text - Change the fading age of (Last created floating text) to 2.25 seconds
Hi there,
i have this other problem buddy, could you please help me out?????
I have this unit already on the map and I need this unit to have inventory.
It is a passive unit, you have no control of this unit. (its not a hero either)
When the player gives that unit a specific item, it runs a cinematic and when it's over, that unit joins you.
The item must disappear.
I dont even know how to make the unit with the inventory. (this is the most important i want)
 
Level 14
Joined
Jan 24, 2017
Messages
246
Hi there,
i have this other problem buddy, could you please help me out?????
I have this unit already on the map and I need this unit to have inventory.
It is a passive unit, you have no control of this unit. (its not a hero either)
When the player gives that unit a specific item, it runs a cinematic and when it's over, that unit joins you.
The item must disappear.
I dont even know how to make the unit with the inventory. (this is the most important i want)
There is an ability called Inventory. You can just add that to the unit. But you also need to make sure the player can give items to the passive unit so you need this:
  • Player - For Player 1 (Red), turn Friendly spell targeting On toward Neutral Passive
 
Status
Not open for further replies.
Top