HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

trigger help!!!!!

10-20-2003, 10:03 PM#1
Crimsongg137
ok i hvae a trigger but theres to many of them so i was wondering how i would shorting this:
Catholic
Events
Unit - A unit enters Governmet <gen>
Conditions
(Unit-type of (Entering unit)) Equal to Catholic
(Owner of (Entering unit)) Equal to Player 1 (Red)
Actions
Unit - Kill (Entering unit)
Trigger - Turn on CAt <gen>
i have 1 for each player and i was wondering if i could shorten it
10-20-2003, 10:06 PM#2
Draco
I don't really understand with the given information. If you have an identical one for each player, why is the (Owner of (Entering unit)) Equal to Player 1 (Red) even needed? :bgrun:
10-20-2003, 10:06 PM#3
Vexorian
My Mind is telling me that Cat <gen> is a trigger that works for Player 1 only, and that you have different Triggers for each players and that there is the problem, Could you post the Cat trigger?
10-20-2003, 10:07 PM#4
Crimsongg137
ahh i c wrong trigger but that will shorten it 2
10-20-2003, 10:10 PM#5
Crimsongg137
here we go :
Democracy Copy 4
Events
Unit - A unit enters Govermet <gen>
Conditions
(Unit-type of (Entering unit)) Equal to Democracy
(Owner of (Entering unit)) Equal to Player 5 (Yellow)
Actions
Player - Set Player 5 (Yellow) Gold upkeep rate to 10
Unit - Replace Government 0020 <gen> with a Religion using The old unit's relative life and mana
Unit - Kill (Entering unit)
10-20-2003, 10:21 PM#6
Vexorian
the government units need to be stored in a 12 lenght Unit Array called Government[]

then at map initialization or something
set Government[1] = Government XXXX
...
set Government[5] = Government 0020
...
set Government[12] = Government YYYY


Democracy Copy 4
Events
Unit - A unit enters Govermet <gen>

Conditions
(Unit-type of (Entering unit)) Equal to Democracy
)

Actions
Player - Set (Owner of (Entering unit) Gold upkeep rate to 10
Unit - Replace Government[Player number of (Owner of (Entering unit)] with a Religion using The old unit's relative life and mana
Unit - Kill (Entering unit)
10-20-2003, 10:26 PM#7
Crimsongg137
um how is that gonna shorten it?
10-20-2003, 10:28 PM#8
Vexorian
I forgot to remove the Player condition, FIXED
10-20-2003, 10:37 PM#9
Crimsongg137
Quote:
Originally posted by Lord Vexorian
the government units need to be stored in a 12 lenght Unit Array called Government[]

then at map initialization or something
set Government[1] = Government XXXX
...
set Government[5] = Government 0020
...
set Government[12] = Government YYYY

wut is that
10-20-2003, 10:43 PM#10
Vexorian
If I understood you well, there are 12 Units of type Government in your map, each works for a player, That's one of the reasons you neede a trigger for each player

But if you make an array that sorts them by player, you can make a huge difference

set Government[1] = (The Government unit for Player 1)

If it isn't the way your map works, then forget about this
10-20-2003, 11:03 PM#11
ULTIMA_WEAPON_
it depends, how many players are there?
10-20-2003, 11:08 PM#12
Crimsongg137
i have 5
10-20-2003, 11:17 PM#13
ULTIMA_WEAPON_
you dont have to make the entire trigger all over again, just copy and paste is wut i would do until i discover a good trigger that would make better sense. Just copy and paste until all 5 players have been added. And dont forget to change the triggers a bit when you do copy it. I run into the same problems as you.
10-20-2003, 11:47 PM#14
Crimsongg137
thats wut i do but im lookin for a better trigger because i have 2 many