• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Map is crashing on trigger please help!

Status
Not open for further replies.
Level 8
Joined
Sep 15, 2006
Messages
426
My problem is whenever my map runs this trigger:
  • Drop
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item being manipulated) Equal to myGun
    • Actions
      • Unit - Replace (Hero manipulating item) with a Syndicate Footsoldier (No Weapon) using The old unit's relative life and mana
      • Unit - Change color of (Last replaced unit) to Black
      • Selection - Add (Last replaced unit) to selection for (Owner of (Hero manipulating item))
runs, my map crashes. Is there any reason why this is happening?
 
If you replace a unit the replaced hero isn't owned by anyone anymore, so you can't refer to that, it does not excist anymore and the game crashes. Try to use a variable and save the owner of the unit, player. Try this and it might work. Or in the last action just simply change it to owner of replaced unit.
Last one is better...

Also if the old unit has more mana or life than new unit's max, I have no idea how the trigger reacts to this. Maybe it gives the new unit its max mana/life.
 
I'm not sure that that's it. Even if I use Selection - Add (Last replaced unit) to selection for Player 1 (Red) it still crashes.
 
I'm not sure that that's it. Even if I use Selection - Add (Last replaced unit) to selection for Player 1 (Red) it still crashes.
Then I was wrong with the replace thing apparently. Then try changing the "old unit's relative life and mana" to something else and test if it works. If this does not work there might be something wrong with the mygun variable.
 
I'm not sure about the variable. I tried removing it from the trigger that sets it, and that seemed to fix it. Although when I removed it as a condition from the Drop trigger and re-enabled the trigger, the problem reoccured. It seems there is a joint issue between that trigger and the myGun variable. Hmm.
 
Alright, I tested your trigger and used one item in place of your condition item variable. Your trigger works perfectly. This means the problem is with your item variable. Now put an item to your map and select it to the condition to the place of your variable and it works.

The reason why your game crashes is because of another trigger, not this one.
 
Is there any reason that this trigger:
  • Tactical 1
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to |cff0f0f0f.45 Tactical|r
      • (Charges remaining in (Item being manipulated)) Greater than 0
    • Actions
      • Item - Set charges remaining in (Item being manipulated) to ((Charges remaining in (Item being manipulated)) + 1)
      • Unit - Replace (Hero manipulating item) with a Syndicate Footsoldier (.45 Tactical) using The old unit's relative life and mana
      • Unit - Change color of (Last replaced unit) to Black
      • Selection - Add (Last replaced unit) to selection for Player 1 (Red)
      • Unit - Change color of (Last replaced unit) to Black
would crash? For some reason, if I either have a reference to the myGun variable in it or just have the Drop trigger enabled, THIS trigger will cause my map to crash. WTF?
 
Well, I have no clue what was going on, but I tried adding wait for .01 seconds as the first action. For some reason, this makes it work. Not sure why, but it's fixed other triggers of mine in the past.
 
Status
Not open for further replies.
Back
Top