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

Game crashes when an unit enters to a region

Status
Not open for further replies.
Level 2
Joined
Feb 28, 2019
Messages
10
unknown.png


When a peasant enters to that region this trigger replaces him to a powerfull militia
However, when another unit enters there I want to replace them to another unit
then I set an "Else" in oder to anyone who passes that place turns into a Dragon
but the game instantly crashes.
 
Last edited:
Level 14
Joined
Nov 4, 2006
Messages
1,241
you are creating an infinite loop there, because replacing a unit (or creating a new one for that matter) counts as "entering" the region, which is why the game crashes.

Edit: you can add conditions to check if the unit type is not equal to either Militia or Searinox, so the trigger doesn't fire again
 
Status
Not open for further replies.
Top