• 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 makes the game crash

Status
Not open for further replies.
Level 13
Joined
Feb 18, 2009
Messages
1,381
So, this trigger crashes the game :
  • Event : Unit - A unit enters (Flightpoint to Thrallmar)
  • Actions :
  • Unit - Hide (Entering unit)
  • Unit - Create 1 Wyvern (Riderless) for player 11
  • Special effect - Create a special effect (Warrior) ontop of (Last created unit)
  • Unit - Order (last created unit) to move to (Thrallmar)
  • Unit - Move (Entering unit) to Thrallmar
  • Camera - Lock cam for (owner of unit(entering unit)) on (last created unit)
  • Wait 20 seconds. (This is the time it takes for the unit to fly to Thrallmar)
  • Unit - Remove (last created unit)
  • Unit - Unhide (Entering unit)
  • Camera - Unlock cam
Where is the leak?
 
Level 13
Joined
Feb 18, 2009
Messages
1,381
I know, i can right click and copy as text, but i deleted it because it didn't work.
So, instead of <Last created unit> should i use Variable - Unit called "Flying point riders"
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
This is the time it takes for the unit to fly to Thrallmar

If "Thrallmar" is some are in your map, cover it with a region, and then remove entering unit.

Or you can use some kind of timer system for the unit.

Save 20 into a hashtable as an integer. Add the unit to a unit group. Create a trigger that picks all units in that unit group every second. Reduce the timer value by one and save it. If the timer value is zero, remove the unit from the unit group, and then from the game,
 
Level 13
Joined
Feb 18, 2009
Messages
1,381
I understood absolutly nothing, but thanks for trying to explain me (I don't know how Hashtables work)
 
Level 13
Joined
Sep 29, 2008
Messages
672
are you creating the unit on the same region the unit enters? if you did then the crash would be an endless creation. since the created unit enters the region the trigger will run again and again and then so on and so forth... try adding a condition that it only runs when a specific unit enters the region.
 
Status
Not open for further replies.
Top