• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Why does my trigger make Wc3 Crash?

Status
Not open for further replies.
Level 7
Joined
Sep 7, 2006
Messages
97
So, i basicly tried to make a trigger where a pack of units function together as a regiment. And when i click on Testmap it loads the map but when i select a unit Warcraft crashes. To get you all to understand the problem im just putting a map with just that trigger so you can see for yourself.

Anyways, can i fix this is anyway? Help would be greatly appreciated!
 

Attachments

  • Regiments.w3x
    16.6 KB · Views: 41
Level 21
Joined
Aug 21, 2005
Messages
3,699
Your trigger is buggy. You see, this is what happens:

If a unit is selected and that unit is in regiment 1, select all units of regiment 1.
The problem is: whenever 1 unit is selected, it is selecting all units of regiment 1, which means "another" unit of regiment 1 is selected, which causes the trigger to run again, to infinity.

A possible fix:
  • Unit
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • ((Triggering unit) is in Regiment1) Equal to (==) True
    • Actions
      • Trigger - turn off (this trigger)
      • Unit Group - Pick every unit in Regiment1 and do (Selection - Select Regiment1 for Player 1 (Red))
      • Trigger - turn on (this trigger)
Another problem is that for each unit in Regiment1, you're selecting the whole group of units in Regiment1. Replace it by:
  • Unit Group - Pick every unit in Regiment1 and do (Selection - Select (picked unit) for Player 1 (Red))
And let's advertise for my own systems: you might want to check out this system:
Grouping System v1.08 - The Hive Workshop - A Warcraft III Modding Site
 
Level 7
Joined
Sep 7, 2006
Messages
97
Your trigger is buggy. You see, this is what happens:

If a unit is selected and that unit is in regiment 1, select all units of regiment 1.
The problem is: whenever 1 unit is selected, it is selecting all units of regiment 1, which means "another" unit of regiment 1 is selected, which causes the trigger to run again, to infinity.

A possible fix:
  • Unit
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • ((Triggering unit) is in Regiment1) Equal to (==) True
    • Actions
      • Trigger - turn off (this trigger)
      • Unit Group - Pick every unit in Regiment1 and do (Selection - Select Regiment1 for Player 1 (Red))
      • Trigger - turn on (this trigger)

Thanks, i tried it but it still crashed.

Another problem is that for each unit in Regiment1, you're selecting the whole group of units in Regiment1. Replace it by:
  • Unit Group - Pick every unit in Regiment1 and do (Selection - Select (picked unit) for Player 1 (Red))

Unit Group - Pick every unit in Regiment1 and do (Selection - Select Regiment1 for Player 1 (Red)

You cant do Selection - Select (picked unit) for Player 1

Anyway i discovered i could just do Selection - Select (Regiment1) for Player 1
but warcraft 3 still buggs and crashes ;(.

Ty for trying anyway :D!

Any more ideas?

And let's advertise for my own systems: you might want to check out this system:
Grouping System v1.08 - The Hive Workshop - A Warcraft III Modding Site

Cool system! But im not to good with jass to understand everything ^^, and i dont wanted units from the regiments to be able to run away from it.

Edit:
 

Attachments

  • Regiments.w3m
    16.5 KB · Views: 34
Status
Not open for further replies.
Top