• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Need Item Trigger Help...

Status
Not open for further replies.
Level 5
Joined
Dec 15, 2010
Messages
115
I am a sucker for WC3 maps based off ones from other games, and I have been working on one for the Legend of Zelda from the NES. There is an aspect I am trying to add based off of Ring Heroes from Lord of the Rings Battle for Middle Earth II.

What happens in the game is if you discover the ring and bring it back to your base you can summon a super powerful hero to fight for you. I want that on the map I am making (With the Triforce instead of the Ring obviously). And I mostly got it, but I don't know how to trigger the item to be removed when the hero reaches the summon place and add and lock the item to the "Super" hero once it spawns. So far I got...

  • Player 1 Human
    • Events
      • Unit - A unit enters Triforce Summon 1 <gen>
    • Conditions
      • ((Triggering unit) has an item of type Triforce) Equal to True
      • (Race of Player 1 (Red)) Equal to Human
    • Actions
      • Wait 5.00 seconds
      • Unit - Create 1 Medivh for Player 1 (Red) at (Center of Triforce Summon 1 <gen>) facing 90.00 degrees
      • Trigger - Turn off (This trigger)
But obviously I need to fit in the add/remove item thing. What I am looking for is...

Player 1's <Hero> gets the Triforce, once the hero returns to base they can bring the item to the summoning circle and they will lose it, but in X amount of time (5 seconds in the trigger for testing purposes) the new super hero will be spawned. The item will also be in the new hero's inventory and be locked to them until death (Item is set to drop upon death in the item data).
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
Level 5
Joined
Dec 15, 2010
Messages
115
Sorry for the super late response (And thanks for what's answered). What exactly causes the leak? I didn't quite get what you said.
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
I believe so it's this one:

(Center of Triforce Summon 1 <gen>)

As deathismyfriend said you leak a location. Store this into a variable and use that variable instead.

Before you turn off your trigger use this line in the custom script:
  • Custom Script: call RemoveLocation(udg_YourPointVariable)
Just replace YourPointVariable with the name of the point variable you created to store the location earlier mentioned.
 
Status
Not open for further replies.
Top