• 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.

[Trigger] Fatal Error?

Status
Not open for further replies.
Level 4
Joined
Jan 27, 2008
Messages
72
These two triggers apparently cause a fatal error:

  • Hero Transfer Fix
    • Events
      • Unit - A unit Changes owner
    • Conditions
      • ((Triggering unit) is A structure) Equal to True
    • Actions
      • Trigger - Turn on Hero Transfer Fix 2 <gen>
      • Wait 0.05 seconds
      • Custom script: call IssueImmediateOrderById(GetTriggerUnit(), 851976)
      • Wait 0.05 seconds
      • Trigger - Turn off Hero Transfer Fix 2 <gen>
  • Hero Transfer Fix 2
    • Events
      • Unit - A unit Cancels reviving
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Unit - Remove (Triggering unit) from the game
These two triggers seem to cause a fatal error for the person the base is given to. Any idea why?
 
Level 4
Joined
Jan 27, 2008
Messages
72
Yep, the first trigger refers to a building. In this case, a base that a player has given to his ally.

If a player gives his ally a base while his hero is reviving, the hero is transferred to the ally along with the base. I'm not 100% sure, but I don't think this hero transfer can be detected via the unit changes ownership event, because there is no change of ownership action in the triggers for the hero, it is merely an unintended consequence of a base changing owners.

As a result, I first cancel the revival of the hero in the base, and then remove it from the game, and for some reason that causes the fatal error. This might be due to how these two triggers interact with other triggers in the map and so it might be impossible to tell why the fatal error happens from just this, but who knows.

I also tried to add an expiration timer to the hero that is being revived instead of removing it but that doesn't seem to do anything.
 
What is it you are trying to accomplish with these triggers? How does it relate to the other trigger systems? I can't tell by the triggers you posted what the desired effect of this will be. It might be that there is a totally different way to go about what you are doing that will eliminate the issue entirely.

It is my understanding that if a trigger looks for a variable that does not exist, it can cause a fatal error. Like when you have a unit on the map set as a variable, for example (Paladin_generic_083) and then you remove the unit and then another trigger looks for the unit, this might cause a crash.
 
Status
Not open for further replies.
Top