HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Can anyone help me with this problem?

07-08-2003, 03:11 AM#1
Nikolae
Okay, I'm trying to make a trigger that will do the following:
Teleport all selected units to a set location when the user types in a command and charges 25 gold per teleported unit.

Here's the trigger I have that does NOT work:
EVENTS:
Player - Player 1 (Red) types a chat message containing -t home as An exact match

ACTIONS:
Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
Loop - Actions
Player - Set (Triggering player) Current gold to (((Triggering player) Current gold) - ((Number of units in (Units currently selected by (Triggering player))) x 25))
Unit - Move (Picked unit) instantly to (Center of Home TR <gen> )

RESULT:
Nothing.

If someone could please tell me what's wrong with this, and give me a trigger that DOES work, I would really appreciate it.

Thanks,
~Nik
07-08-2003, 03:16 AM#2
LordAllout
Quote:
Unit - Move (Picked unit) instantly to (Center of Home TR <gen> )


Hm try matched unit?
07-08-2003, 03:21 AM#3
Raptor--
hmm... honestly i don't see what the problem is at a glance

i can see one thing not related to it working or not, which is:

Player - Set (Triggering player) Current gold to (((Triggering player) Current gold) - ((Number of units in (Units currently selected by (Triggering player))) x 25))

because this is being ran for each unit that is picked, it will subtract (25 * (number of units ^ 2))

what u want is just

Player - Set (Triggering player) Current gold to (((Triggering player) Current gold) - 25)


in terms of troubleshooting, what i would do, is put a [Game - text message] displaying the names of each picked unit to see whether or not
A: the trigger is even running
B: if it is properly detecting what units u have selected