• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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,240
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
671
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