HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

TempPoint with Array Removal

07-10-2008, 12:51 PM#1
SeruK
'sup. I'm making this "squad" system for my map which is just x units spawning at once. Now I want to make this trigger MUI, but there is a point involved and the trigger obviously runs quite frequently so I want to remove it. Just what should I write when it comes to removing it? udg_x_TempPointSpawn(Integer A)?

Here's the trigger.

Hidden information:
Trigger:
Punters
Collapse Events
Unit - A unit Finishes training a unit
Collapse Conditions
((Entering unit) is A structure) Equal to False
Collapse Actions
Collapse For each (Integer A) from 1 to 3, do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Owner of (Trained unit)) Equal to inc_Players[(Integer A)]
Collapse Then - Actions
Set x_TempPointSpawn[(Integer A)] = (Position of (Trained unit))
Unit - Create ((Point-value of (Trained unit)) / 100) (Unit-type of (Trained unit)) for (Owner of (Trained unit)) at x_TempPointSpawn[(Integer A)] facing (Facing of (Trained unit)) degrees
Custom script: call RemoveLocation(udg_x_TempPointSquad) //?
Collapse Else - Actions
Do nothing
07-10-2008, 01:04 PM#2
the-thingy
This:
call RemoveLocation (udg_x_TempPointSpawn[GetForLoopIndexA ()])
or

call RemoveLocation (udg_x_TempPointSpawn[bj_forLoopAIndex])
But, to be honest, you don't need an array. You are destroying the point after it's created/used without any delay, so an array just makes it longer and more awkward
07-10-2008, 01:17 PM#3
SeruK
Quote:
Originally Posted by the-thingy
This:
call RemoveLocation (udg_x_TempPointSpawn[GetForLoopIndexA ()])
or

call RemoveLocation (udg_x_TempPointSpawn[bj_forLoopAIndex])
But, to be honest, you don't need an array. You are destroying the point after it's created/used without any delay, so an array just makes it longer and more awkward
Hey, thanks a bunch. But what are you saying? That all I have to do is remove (udg_x_TempPointSpawn) without specifying the array number thingO?

Or that I don't need an array for the trigger? Because that I do.
07-10-2008, 01:20 PM#4
the-thingy
Quote:
Hey, thanks a bunch. But what are you saying? That all I have to do is remove (udg_x_TempPointSpawn) without specifying the array number thingO?

Or that I don't need an array for the trigger? Because that I do.

That you don't need an array. If that's your whole trigger, you sure as hell don't need an array.

You don't need that "Do nothing" either. Leaving the Else - Actions blank will have the same effect
07-10-2008, 01:31 PM#5
SeruK
Quote:
Originally Posted by the-thingy
That you don't need an array. If that's your whole trigger, you sure as hell don't need an array.

You don't need that "Do nothing" either. Leaving the Else - Actions blank will have the same effect
Oh wait, maybe I don't. But is it really MUI then? It would suck if the peeps would end up in the enemies base.

And Do Nothing is purely aestethic. :P

ed: +rep for being pro.
07-10-2008, 01:41 PM#6
the-thingy
Quote:
Oh wait, maybe I don't. But is it really MUI then? It would suck if the peeps would end up in the enemies base.

Ye, it'll be MUI. It'll have to go through all the loop actions for that particular value of integer A before moving onto the next value for integer A