• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Trigger Causing Map to Crash for Non-Apparent Reason

Status
Not open for further replies.
Level 2
Joined
Aug 14, 2005
Messages
16
The object of these triggers, which function perfectly well outside of the occassional but well-documented crashing, is to spawn a unit at a random point along the edge of a map, move to a specific location, create an item under it, then move to another edge of the map and be removed. When used in the same playing with two other groups of triggers, this one seems to cause the game to crash as the other two function fine together. Here is the code, I would appreciate any help.

Initial Copy
Events
Unit - A unit Finishes casting an ability
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Request Rocket Launcher (Neutral Hostile)
Then - Actions
Wait 1.00 seconds
Game - Display to (All players) the text: TEST
Unit - Create 1 AH-64D Apache Longbow (Rocket Drop) for (Owner of (Casting unit)) at (Random point in Airstrike Top <gen>) facing 0.00 degrees
Set RocketLauncherHeli = (Last created unit)
Unit - Order RocketLauncherHeli to Move To (Center of Helipad <gen>)
Unit - Set RocketLauncherHeli movement speed to 1000.00
Trigger - Turn on RocketTurnOn
Else - Actions
Do nothing

Move to Target Copy (Simple to prevent maniuplating by players in case they manage to overide an anti-selection on the unt)
Events
Time - Every 5.00 seconds of game time
Conditions
Actions
Unit - Order RocketLauncherHeli to Move To (Center of Helipad <gen>)

Turn on ExitMap Copy (Just to note, the altitude adjustments do not work here)
Events
Unit - A unit enters Helipad <gen>
Conditions
(Entering unit) Equal to RocketLauncherHeli
Actions
Trigger - Turn off RocketTurnOn
Animation - Change RocketLauncherHeli flying height to 100.00 at 2.00
Wait 3.00 seconds
Item - Create URL-4T Ultor Tactical Rocket Launcher at (Center of Helipad <gen>)
Wait 1.00 seconds
Animation - Change RocketLauncherHeli flying height to 350.00 at 2.00
Wait 3.00 seconds
Unit - Order RocketLauncherHeli to Move To (Center of Airstrike Rihgt <gen>)
Trigger - Turn on RocketExit

Exit Map Copy
Events
Time - Every 10.00 seconds of game time
Conditions
Actions
Unit - Order RocketLauncherHeli to Move To (Center of Airstrike Rihgt <gen>)

Reset Copy
Events
Unit - A unit enters Airstrike Rihgt <gen>
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Entering unit) Equal to RocketLauncherHeli
Then - Actions
Trigger - Turn off RocketExit
Unit - Remove RocketLauncherHeli from the game
Set RocketLauncherHeli = No unit
Else - Actions
Do nothing


After several uses, this trigger causes the two aforementioned separate trigger groups to crash the game. They normally do not do this and extensive use of just those two has revealed that this trigger does play the key role in leading to the crash.

I'd appreciate your thoughts, thanks.
 
Level 7
Joined
Jul 30, 2004
Messages
451
well, i can point out some flaws with the triggers, nothing yet that looks crash worthy, but

A: using a wait in a trigger can cause problems if the trigger is ran again before the wait has expired
B: the wait will cause 'casting unit' reference to be lost
C: unit movement speeds cannot exceed 522
D: every 5 seconds will not be able to override player clicking, but if you go low you will have to clean the location memory or it'll build up
E: what are RocketTurnOn() and RocketExit()?

*i guess A and B only pertain to if you can use it more than once at a time, if you make sure it absolutely can't be then i suppose its ok

i'd say its something else those triggers seem fine
 
Level 2
Joined
Aug 14, 2005
Messages
16
Thanks for your help, to answer your comments:

A. The trigger can only be ran once at the same time, the ability has a high cooldown/can only be cast from one unit.
B. I have had problems in the past with this on other trigs, thanks
C. I was under the impression this could be manipulated in gameplay constants
D. The player's selection is cleared everytime they click on the unit, this is just to prevent anyone who has overridden the clear selection from stalling the trigger
E.RocketTurnon is the variable for "Movetotarget copy" and RocketExit is the variable for "Exitmap copy"

The error message received was "Fatal Error... Access violation blah blah..." Exception 0ox0000005 (Access Violation) at 001B:64F166BD... the instruction could not be read at 0xF4166BD referenced memory at "0x0F07FFF8"... The memory could not be 'read'

All right, thanks for your help.
 
Status
Not open for further replies.
Top