HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Control Point income issue

08-13-2009, 02:41 AM#1
lordofpie7000
Hi i've been working on my new map for a couple days and have been testing it every so often to make sure the triggers work. I ran into an issue when i was testing my control points. I set up a trigger to give the owner of the control point gold every so often and that works fine but it uses a specific unit already placed on the map.
My revive control point trigger has the following

Events-Control Point ironforge 0070 <gen> dies
conditions
actions-create 1 control point ironforge for ((owner of (killing unit)) at position of (control point ironforge 0070 <gen>) facing default building facing degrees

I kno it doesnt work because the original control point was killed and a new one was made, but i dont know how to revive the same unit without using variables to store it and then ressurect it instantly at full life for another player. If anyone knows an easy to fix this please tell me how with GUI and not Jass as im not able to use Jass yet, any help is appreciated.
08-13-2009, 11:34 AM#2
Anitarf
You would likely need to use variables, probably a unit array holding all the control points, or better yet a group variable, and when the map starts add all your control points to that group. Then have a trigger with a generic unit dies event, check in the conditions if the dying unit is in the group of control points, if it is then create a new one for the owner of the killing unit and add it to the group.

Then, in a periodic trigger, loop through the group and do the gold increase for the owner of each unit in the group.
08-15-2009, 03:32 AM#3
lordofpie7000
cool thanks for the help
08-15-2009, 05:16 AM#4
lordofpie7000
one question though i want each of my control points to give me different amounts of gild depending on which one it is. would i have to make alot of seperate groups, or a bunch of different triggers with different conditions
08-15-2009, 07:59 AM#5
0zyx0
You can set the point value in the object editor to whatever amount of gold you want each type of structure to generate. You can read the point value in the trigger editor.
08-16-2009, 01:22 AM#6
lordofpie7000
thanks for the help every thing works perfectly now, cool