Get the Desktop App for Battle.net Now
- All your games in 1 place
- Log in once
- Automatic game updates
I am making a 2 vs 2 map with hostile attack waves in it. (these can be turned off) However I use these Air patrol units to counter curtain attacks from player on the hostile(neutral) base. The problem lies in the "trigger" down below.
[Works] The units do not spawn if nothing is destroyed
[Works] The trigger counts the amount of living members in the group.
[Works] The trigger spawns the appropriate number of units.
[Works] The trigger stops spawning when the off switch building is destroyed.
[Does not seem to work] The trigger updates those members that are spawned to be part of that group.
[Does not seem to work] The units spawned follow the patrol route.
In short if you kill 2 members of the patroll. It keeps on spawning 2 members even if there are 6 hells angels again.
Edited by Redisia on 12/8/2012 12:58 PM PST
My advice would be to learn how to debug effectively.
Even for people who are very experienced it is rare that they will create something correct on the first go. Any large section of code you write will invariably have bugs in it that need to be tracked down and removed.
Try placing debugging statements inside your code to track what happens. In the trigger editor create a new action and search for "debug" and you should find it.
I'm not trying to be a smart alec by not giving you the answer. It's just that if you are handed the answer then the next time you write code it will also have bugs in it (happens to everyone, a lot of the time) and you are going to be stuck again. Then you are no better off than you were before.
May as well learn how to debug an easy piece of code than have to learn later on a hard piece.
I would recomend placing a debugging statement...
Edited by turtles on 12/4/2012 6:52 PM PST
After messing with the debugging tool (wich really did not help so much) and a test map i fixxed it with a variable unit group.
Still have the problem that i cannot get all units in "Unit Group - Add (Last created unit) to Airpatrol 1"
Threats of violence. We take these seriously and will alert the proper authorities.
Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.
Harassing or discriminatory language. This will not be tolerated.