• 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 causing immediate crash..

Status
Not open for further replies.
Level 9
Joined
Apr 14, 2020
Messages
63
I have (painstakingly) isolated this trigger as the cause of the crash. I know this is the cause by disabling it and the map works fine.

What about this trigger would cause the map to cause the entire program to silent crash 2 seconds (according to an income timer I have) in?

Also, is there a general way I can script this trigger to be more efficient/cause less performance issues?

I know throughout the map I have probably sloppily thrown together the triggers I have, due to lack of experience.

I appreciate any help.
 

Attachments

  • Trigger Help.PNG
    Trigger Help.PNG
    39 KB · Views: 53
Level 28
Joined
Sep 26, 2009
Messages
2,516
You are most likely hitting an infinite loop with your "Unit - Replace unit" action.

This is the flow I see in your trigger:
  1. Unit dies
  2. Your trigger is fired
  3. Your trigger replaces dying unit with a new unit with same unit-type and set's the new unit's HP and MP relative to the dying unit's HP and MP
well, if I remember correctly, relative HP and MP means that the replacing unit should have same percentual HP and MP to the unit which was replaced. In your case, the replaced unit is dead (0% HP), so the new unit has 0% HP as well, causing it to die and firing your trigger again. As this happens inifnitely, it causes your game to crash.

So I would start by changing the configuration in your "Unit - Replace unit" action to "using the new unit's max HP and MP".

Also, this trigger will currently "revive" any unit in the game (as the "else" block will be executed for any which is not a monastery or where the killing unit is not player 10).

Edit: also, is there only one Shadopan Monastery in the entire game? Because I see in your trigger that you create some additional units at the center of two regions, but then you remove those regions. That means that the first time a shadopan monastery changes owner, the two units will spawn correctly in their respective regions, but any successive ownership change of any other shadopan monastery will cause the two units to spawn in bad positions (most likely in the center of the entire map).
 
Last edited:
Status
Not open for further replies.
Top