• 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 problem - map crashes - need advanced help

Status
Not open for further replies.
Level 9
Joined
Sep 8, 2004
Messages
633
hey, i was working on my little map, when i was forced to stop.
Somewhere in my triggers, is a bug, which makes the game crash.

I know exactly where the problem lies, but i cannot seem to eliminate it. I need help of someone who is really good at advanced triggering.

---

First, i'll explain the triggers.
In the map, you have one character, a marine.
I made three dummy heroes, they represent weapons you have.
the marine has 3 attacking abilities (lightning gun, rocketlauncher, redeemer)
When you select one of the heroes, a variable is changed, so another trigger for firing the weapon is used.

The triggers:

1- the attack trigger:
Code:
Attack1
    Events
        Player - Player 1 (Red) Selects a unit
    Conditions
        ((Owner of (Triggering unit)) is an enemy of (Triggering player)) Equal to True
        Var_weapon_player[(Player number of (Triggering player))] Equal to 1
    Actions
        Trigger - Turn off (This trigger)
        Unit - Order HeroOfPlayer[(Player number of (Triggering player))] to Special Archimonde - Finger Of Death (Triggering unit)
        Selection - Select HeroOfPlayer[(Player number of (Triggering player))] for (Triggering player)
        Wait 0.60 seconds
        Trigger - Turn on (This trigger)

2- The switch weapon trigger
Code:
Switch to Lightning
    Events
        Player - Player 1 (Red) Selects a unit
        Player - Player 2 (Blue) Selects a unit
        Player - Player 3 (Teal) Selects a unit
        Player - Player 4 (Purple) Selects a unit
        Player - Player 5 (Yellow) Selects a unit
        Player - Player 6 (Orange) Selects a unit
    Conditions
        (Unit-type of (Triggering unit)) Equal to Lightning Gun
        (Owner of (Triggering unit)) Equal to (Triggering player)
    Actions
        Set Var_weapon_player[(Player number of (Triggering player))] = 1
        Game - Display to (All players matching ((Triggering player) Equal to (Matching player))) for 5.00 seconds the text: |cffc5dbff*Lightnin...
        Selection - Select HeroOfPlayer[(Player number of (Triggering player))] for (Triggering player)

The attack is the trigger for weapon number one, and so is the switch weapon trigger.

---

Now, the problem, when i attack a unit, using this system, the game just crashes on me randomly.
Sometimes i can fire a few times before it crashes, other times, it crashes instantly.
For this attack system, aswel as the rest of the map, i used code from pyrodactyl's instagib map, and i asked him to take a look at if he could fix my system, so far no good.

I'd really hate having to throw my map away, specially since it's already 75% completed.
Thank you for taking the time to read this.

If you'd like to take a look at the map itself, ask.

With kind regards,
Angelusz
 
Level 8
Joined
Apr 3, 2004
Messages
507
I'm not sure that both Triggering Unit and Triggering Player are functional event responses for Player Selects a Unit events. That shouldn't crash anything, though.

It could be that you're running into old selection desync issues, but I thought that was mostly resolved with the release of TFT.
 
Level 2
Joined
Oct 1, 2004
Messages
15
I have found that the easiest way to trouble shoot triggers that cause the game to crash is to place after every one of your actions the following:
Do a quest message with a sequenced number 1..2..3.. and so on thru your trigger. After every quest message place a wait of 1 to 2 seconds so you get a chance to see each number play out and find out how far it goes. Last number you see display correctly is where the trigger will start to crap out on you and you know that the action after the last number is what you need to work on.

Hope this helps.
 
Level 9
Joined
Sep 8, 2004
Messages
633
I'll send you the map darkshadow.

panto - that isn't the problem, those are functional, the trigger works, but it just crashes on me every once in a while..

jumpyg - thanks, but as i said, i know when it crashes, i just don't know how to fix it..
 
Status
Not open for further replies.
Top