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

Map Won't Work -- Closes After Loading

Status
Not open for further replies.
Level 4
Joined
Feb 12, 2006
Messages
99
When I try to test my map, after it finishes loading, one or two seconds into the game, it closes. Do you know what it might be? If it's a trigger, I only have one on, and that is this:

Code:
Starting Game
    Events
        Time - Elapsed game time is 1.00 seconds
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Unit - Pause (Picked unit))
        Set UnitsRed[1] = Footman 0001 <gen>
        Set UnitsRed[2] = Footman 0002 <gen>
        Set UnitsRed[3] = Archer 0007 <gen>
        Set UnitsRed[4] = Archer 0008 <gen>
        Set UnitsBlue[1] = Footman 0003 <gen>
        Set UnitsBlue[2] = Footman 0004 <gen>
        Set UnitsBlue[3] = Archer 0005 <gen>
        Set UnitsBlue[4] = Archer 0006 <gen>
        Camera - Pan camera for Player 1 (Red) to (Position of UnitsRed[AutoAdd]) over 2.00 seconds
        Unit - Create 1 Orbiter for Neutral Passive at ((Position of UnitsRed[AutoAdd]) offset by (DistanceMax, 0.00)) facing Default building facing (270.0) degrees
        Set Orbiter = (Last created unit)
        Trigger - Turn on Orbit <gen>
        Dialog - Show OptionsMenu for Player 1 (Red)
        Dialog - Change the title of OptionsMenu to Options
        Dialog - Create a dialog button for OptionsMenu labelled Attack
        Set Attack = (Last created dialog Button)
        Dialog - Create a dialog button for OptionsMenu labelled Move
        Set Move = (Last created dialog Button)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of UnitsRed[AutoAdd]) Equal to Footman
            Then - Actions
                Dialog - Create a dialog button for OptionsMenu labelled Ability
                Set Ability = (Last created dialog Button)
            Else - Actions
        Dialog - Create a dialog button for OptionsMenu labelled Skip Move
        Set SkipMove = (Last created dialog Button)
        Dialog - Create a dialog button for OptionsMenu labelled End Turn
        Set EndTurn = (Last created dialog Button)
        Set SelectedUnit = UnitsRed[AutoAdd]
        Set AutoAdd = (AutoAdd + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                AutoAdd Equal to 4
            Then - Actions
                Set AutoAdd = 1
            Else - Actions

Please help, or I'll never finish this map, literally.
 
Level 4
Joined
Nov 9, 2005
Messages
113
Happened to me once long, long, long ago...
It must be an error in the triggers.
Try to make several triggers (divide your current trigger in several other triggs) Try to do like:
Code:
 Events 
        Time - Elapsed game time is 1.00 seconds 
    Conditions 
    Actions 
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Unit - Pause (Picked unit)) 
        Set UnitsRed[1] = Footman 0001 <gen> 
        Set UnitsRed[2] = Footman 0002 <gen> 
        Set UnitsRed[3] = Archer 0007 <gen> 
        Set UnitsRed[4] = Archer 0008 <gen> 
        Set UnitsBlue[1] = Footman 0003 <gen> 
        Set UnitsBlue[2] = Footman 0004 <gen> 
        Set UnitsBlue[3] = Archer 0005 <gen> 
        Set UnitsBlue[4] = Archer 0006 <gen> 
        Camera - Pan camera for Player 1 (Red) to (Position of UnitsRed[AutoAdd]) over 2.00 seconds 
        Unit - Create 1 Orbiter for Neutral Passive at ((Position of UnitsRed[AutoAdd]) offset by (DistanceMax, 0.00)) facing Default building facing (270.0) degrees 
        Set Orbiter = (Last created unit) 
        Trigger - Turn on Orbit <gen> 
        Trigger - Run Dialog Create <gen>
If you can can split up more, do it. But what i don't know is this:
Code:
UnitsRed[AutoAdd])

Another possibillity is to export the triggs, make a new map and import.
 
Level 4
Joined
Feb 12, 2006
Messages
99
UnitsRed[AutoAdd] is just the way I designate a unit, the AutoAdd changes at the end of a unit's phase. I'll try doing what you said.
 
Level 4
Joined
Feb 12, 2006
Messages
99
Figured it out. My dialogue triggers were wrong, and all I need to do now is fix my Orbit trigger, which was crashing it. Here it is.

Code:
Orbit
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        Unit - Move Orbiter instantly to ((Position of UnitsRed[AutoAdd]) offset by DistanceMax towards OrbitDegrees degrees), facing Default building facing (270.0) degrees
        Set OrbitDegrees = (OrbitDegrees + 1.00)
        Trigger - Run (This trigger) (ignoring conditions)

I would appreciate any help someone can offer with this.
 
Level 4
Joined
Nov 9, 2005
Messages
113
Make sure "((Position of UnitsRed[AutoAdd])" is always only one unit and that it's set to something.

And delete "Trigger - Run (This trigger) (ignoring conditions)" since it will automatically run every 0.03".
What might be happening is that, because of that action, it runs the trigger twice at the same moment, what could explain the crash.
 
Level 4
Joined
Feb 12, 2006
Messages
99
Ahh crud, thanks. I thought I was just running this with one other trigger so I put that in. I'm glad you caught my mistake. I'll try it without that last part and see if it works.
 
Status
Not open for further replies.
Top