HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unit enter Region, Player Gets Gold

04-15-2005, 04:55 PM#1
macho271
Ok, I'l try to describe this the best way I can, my english is not the best so if its something that you dont understand just ask so I can try to explain it in another way! ^_^

Ok, heres the deal.. Ive tried for some time now to get this trigger working, with no good results..

I want a trigger like this:
Unit(spesific) enters a region, owner of unit gets 10 gold per 5 seconds as long as the unit stays in the region(and is alive)

Uhm, and if I have 2 units, I get 20 gold and so on..
Plus I have more than one region that units can stand in..

And one more thing...
If I make a variabel named test(region) with array(say 3)..
And initialize region1 = test[0] region2=test[1] ++
Can I use a common word for this.. uhm..
Like when unit enters TEST[index] i have to choose a number instead of index.. and the whole point to common the regions is gone.. I mean... uhm..
:god_help_us:
04-15-2005, 05:12 PM#2
Guest
Quote:
Your trigger
Events
Time - Every 5.00 seconds of game time

Conditions
Actions
Player - Add ((Number of units in (Units in (Region))) x 10) to Player 1 (Red) Current gold

Hopefully that will work. I haven't tested it.
04-15-2005, 06:16 PM#3
Azhag
Hold on I'll look for a condition for you.

EDIT: This should work.

Code:
(Number of units in (Units in (*Your Region*) matching ((Unit-type of (Matching unit)) Equal to *Your Unit*))) Greater than or equal to 1
04-16-2005, 02:54 AM#4
Guest
Quote:
Originally Posted by Azhag
Hold on I'll look for a condition for you.

EDIT: This should work.

Code:
(Number of units in (Units in (*Your Region*) matching ((Unit-type of (Matching unit)) Equal to *Your Unit*))) Greater than or equal to 1

HOW do you set up that condition? I can't find a way to do it.
04-16-2005, 03:19 AM#5
Guest
Hmm

Edit: Thought i was integer but couldnt find matching in it
04-16-2005, 03:21 AM#6
Azhag
It is the interger comparison. I clicked on the units in region part, and selected units in region matching conditon. I then selected the unit-type comparison. Ta da. Good luck with your map.
04-16-2005, 04:02 AM#7
Guest
Quote:
Originally Posted by Azhag
It is the interger comparison.

OH yeah. When you have been working on your map for a few hours your brain needs a "reboot" (read: play San Andreas) or everything blurs together and you can't do anything.