Page 1 of 1

Advanced Scripting Question

Posted: Mon Oct 06, 2008 10:27 am
by Deqlyn
I have read all scripting Tutorials more than once but cant seem to figure this one out.

Here is the situation. I have 240 Enemy forces on the map at once. I want to be able to reinforce them with another wave of 30 when the first 30 die. Here is what I have created that works but I dont feel its practical because of the amount of scripting it will take with 9 waves of enemies and possibly hitting map limits.

Group Wave 1 = 240 enemys
Wave 2 reinforcements A (30 enemies)
TUNI. Group Wave 1 < 210 - Activates on success (next cntrl)
CNTRL. Wave 2 reinforcements A Appear - Activates on Success, AT/TUNI
ATTA. Attack all enemies reinforcements wave 2 A
Wave 2 Reinforcements B
TUNI. Group Wave 1 < 180 - Activates on success next control
CNTRL. Wave 2 reinforcements B Appear...... and so on 6 more times.

All the way down to 0. Then start over for wave 3 -9.

The reason to do it like this is so that the waves keep coming and there are no "breaks." I have looked at the Mazz 5 Script and saw how they used Mungers to shorten the script of Enemy waves appearing. Problem is it is always at < 1, Not how I am attempting it with keeping at least 210 units in play at once (outside of very fast killing).

Bottom Line, Anyway to consolidate this while still keeping 210 units in the field without using all those scripts. I ran the map check and if I multiply it out, it will use 38,000 of the 96,000 MA's available. Any other way to accomplish this?

Posted: Mon Oct 06, 2008 4:30 pm
by A-Red
There's no *really* quick way to do it. You might try this though--it should cut your lines of script by almost 3/4 (as for parameters, I don't know).

TUNI Less than 240?
TUNI Less than 210?
TUNI Less than 180?
...
...

units for reinforcements (container with all reinforcements subjects)

GEOM Select 30 units
(Link to units for reinforcements)
(RIA to the CTRL and ATTA)
(TIIFN subj and subj)
(Maximum Number of Items 30)
(Choose Random Items)
(Use Markers Instead of Monsters)
(Use Only Uncreated Monsters)
(Activates on Success the CTRL below)

CTRL Chosen Units Appear

ATTA Chosen Units Attack



Just make sure each TUNI in that list activates that same GEOM, and you'll be all set. It'll pick a random 30 from the remaining invisible units each time.

Posted: Mon Oct 06, 2008 5:49 pm
by Deqlyn
How about if I dont want it Random. I have the units what they are so they keep the pressure on.

Posted: Mon Oct 06, 2008 6:31 pm
by A-Red
You can remove the random flag--in that case, the GEOM will select the first 30 guys on the reinforcements subject list (and after they are already on the map, it will pick the next 30, and so on). So make sure you've got the guys listed in the order that you want them to appear.

Posted: Mon Oct 06, 2008 8:56 pm
by Deqlyn
Sweet your a life saver A-Red. Or map saver :)

Posted: Mon Oct 06, 2008 11:43 pm
by Deqlyn
Well it works but it seems that at least 1 of my waves of 30 doesnt attack. Its odd because of the 8 groups in wave 2. 1/8 attacks, 2/8 doesnt 3/8 does then stops(sometimes) totally random if they attack are not.. Any ideas? I posted the log of the failed wave of 30 that didnt attack

2008-10-06 23:39:13 ### MA [tuni] Wave 1 < 180?: count: 177<180
2008-10-06 23:39:13 ### MA [tuni] Wave 1 < 180?: test action successful
2008-10-06 23:39:13 ### MA [tuni] Wave 1 < 180?: succeeded
2008-10-06 23:39:13 ### MA [tuni] Wave 1 < 180?: deactivated
2008-10-06 23:39:13 ### MA [geom] Select 30 Units: found 210 monsters
2008-10-06 23:39:13 ### MA [geom] Select 30 Units: testing monsters against entire map
2008-10-06 23:39:13 ### MA [geom] Select 30 Units: 30 monsters inside geometry (added to subj)
2008-10-06 23:39:13 ### MA [geom] Select 30 Units: 0 monsters outside geometry ignored
2008-10-06 23:39:13 ### MA [geom] Select 30 Units: 210 monsters points inside geometry ignored
2008-10-06 23:39:13 ### MA [geom] Select 30 Units: 0 monsters points outside geometry ignored
2008-10-06 23:39:13 ### MA [geom] Select 30 Units: succeeded
2008-10-06 23:39:13 ### MA [geom] Select 30 Units: deactivated
2008-10-06 23:39:14 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:14 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:15 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:15 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:15 ### MA [ctrl] Wave 2 Units Appear: succeeded
2008-10-06 23:39:15 ### MA [ctrl] Wave 2 Units Appear: deactivated
2008-10-06 23:39:16 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:16 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:17 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:17 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:18 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:18 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:19 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:19 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:20 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:20 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:21 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:21 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:22 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:22 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:23 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:23 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:24 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:24 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:25 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:25 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:26 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:26 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:27 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:27 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:29 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:29 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:30 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:30 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:31 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:31 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:32 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:32 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:33 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:33 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:34 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:34 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:35 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:35 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:36 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:36 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:37 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:37 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:38 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:38 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:39 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:39 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:40 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:40 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:41 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:41 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:42 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:42 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:43 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:43 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:44 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:44 ### MA [atta] Attack All Waves: succeeded
2008-10-06 23:39:46 ### MA [atta] Attack All Waves: attacking all nearby units
2008-10-06 23:39:46 ### MA [atta] Attack All Waves: succeeded

Posted: Tue Oct 07, 2008 10:21 am
by Graydon
It would appear that the information was never fed to the ATTA action...

You may have this set up already, but I'd advise putting a short delay on the ATTA action. 1-1 should work.

For future reference; If the units being made visible are using an effect to appear, say world knot style, you need to put a longer delay on any actions following the CTRL.

Posted: Tue Oct 07, 2008 10:30 am
by Deqlyn
I have a delayed ATTA action and all 8 waves of 30 use the same delayed CNTL and ATTA action. So pyro's assumption is that perhaps the ATTA action has unit limits. When it is shared. That to me makes sense since some of the waves attack and some dont. For example. Why would Wave X appear and attack but not Wave Y when they both use the same actions? Doesnt make sense.

Posted: Tue Oct 07, 2008 5:38 pm
by A-Red
Deqlyn wrote:I have a delayed ATTA action and all 8 waves of 30 use the same delayed CNTL and ATTA action. So pyro's assumption is that perhaps the ATTA action has unit limits. When it is shared. That to me makes sense since some of the waves attack and some dont. For example. Why would Wave X appear and attack but not Wave Y when they both use the same actions? Doesnt make sense.
Yes, but at this point only 60 units (at most) should be in it, no? Because it's only the second reinforcements wave. That's assuming you're using a separate attack for all reinforcements, in addition to the one for the initial attackers. I'm sure that at least 100 units can be in an ATTA.

Posted: Wed Oct 08, 2008 8:23 am
by Deqlyn
OK I will make 4 different attacks then. for the 240 reinforcements. I do need to try activates on Execution though because that is how mazz is setup. I have activates on success. SHouldnt make a difference but you never know.

Thanks A-Red

Posted: Wed Oct 08, 2008 2:51 pm
by Graydon
It does make a difference for some actions though Deq. Some actions 'activate' or 'execute' but dont have parameters that define it as 'success', so sometimes ACOS just simply never works.

Posted: Wed Oct 08, 2008 3:08 pm
by Deqlyn
Cool thanks Graydon, I plan on trying it nothing to lose but more scripting.

Thanks everyone for the help.

Posted: Wed Oct 08, 2008 5:32 pm
by A-Red
Which action is doing the triggering?

If you have a chain that looks like TUNI>GEOM>CTRL>ATTA, then success will be fine for all of the activations. If you want an ATTA to activate something, I'd recommend Activates on Activation, because I don't think they ever succeed.

Posted: Thu Oct 09, 2008 9:20 am
by Deqlyn
Well embarassed as I am to say this.... I spose for all units to attack the flag has to be set to TRUE....... Activates on Execution was needed as well. So pissed over that. :oops: :roll: Anyways it is all working now im up to wave 6 already! 3 more to go. Thanks for all the help again.