HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger help on Moon power and towers healing and research

04-09-2004, 10:40 PM#1
samuraipanda
Hello:

I need help on a trigger I wanna make true, its like this:
First i need to do a research of a custom made research that will make it possible for the towers to self heal, but only at night time and i want that there will be a moonbeam on the towers... remember that the towers would be spread around depance on where the user put the towers, and have in mind that there will be up to 4 players that will mayby choose to upgrade this...so and an xemple what if i research it and suddenly everybody gets the same thing even my enemyes.... and i dont want that to happend..
meaning that only i have research it and nobody else have and they suddenly get it. But of couse they will get the same thing when they do the research. Oh and i want that the healing and the moon beam goes away when days come back. ;)
thx for helping :D
04-10-2004, 01:39 AM#2
Quetz
Quote:
Originally Posted by samuraipanda
Hello:

I need help on a trigger I wanna make true, its like this:
First i need to do a research of a custom made research that will make it possible for the towers to self heal, but only at night time and i want that there will be a moonbeam on the towers... remember that the towers would be spread around depance on where the user put the towers, and have in mind that there will be up to 4 players that will mayby choose to upgrade this...so and an xemple what if i research it and suddenly everybody gets the same thing even my enemyes.... and i dont want that to happend..
meaning that only i have research it and nobody else have and they suddenly get it. But of couse they will get the same thing when they do the research. Oh and i want that the healing and the moon beam goes away when days come back. ;)
thx for helping :D

Give the towers regeneration only at night, and when they are first finished disable that regeneration via triggers. Using another trigger with the event a player finishes your upgrade, enable the regen for all of their towers and disable the trigger that was disabling them in the first place.

Now use a trigger with a periodic event, every (however long it takes to get from day/night in game) , pick every unit of (unit type of your tower thing) in playable map area owned by (player who researched the upgrade), and create the sfx on them. Now, turn off that trigger, and turn on another one with the same event. When that one goes off, use the actions to get rid of the sfx, turn it off, and turn on the first periodic event trigger.

If that made no sense whatsoever, I'm sorry, I'll try to be clearer.
04-10-2004, 01:52 AM#3
samuraipanda
Quote:
Originally Posted by Quetz
Give the towers regeneration only at night, and when they are first finished disable that regeneration via triggers. Using another trigger with the event a player finishes your upgrade, enable the regen for all of their towers and disable the trigger that was disabling them in the first place.

Now use a trigger with a periodic event, every (however long it takes to get from day/night in game) , pick every unit of (unit type of your tower thing) in playable map area owned by (player who researched the upgrade), and create the sfx on them. Now, turn off that trigger, and turn on another one with the same event. When that one goes off, use the actions to get rid of the sfx, turn it off, and turn on the first periodic event trigger.

If that made no sense whatsoever, I'm sorry, I'll try to be clearer.
To many words hehe.... plz could you make some screenshots or just type it like it would be in the triggers i done the towers now about them getting healed at night.. but the rest i need help
04-10-2004, 03:32 AM#4
fugly
something like this...
1 variable holds the info for which player has researched the ability some thing like
booleen array: PlayerAbility[]
you want it to be like PlayerAbility[1] = true, means that player 1 researched that ability, PlayerAbility[2] = false, means that Player 2 didn't research the ability. So make a booleen array and then make a trigger
Code:
Event: Player researches ability
Condition: abilty = to what ever your custom thing is
Action:
set variable PlayerAbility[Player Number of Triggering Player] = true
ok so now by the use of that bolleen array you know who has, and hasnt researched that ability

now for the trigger that makes the special effect
Code:
Event: Time of day = (When ever night is)
Action: Loop from 1 -  4 (how every many players could have this abilty, lets say 4 for the sake of argument)
              if -  PlayerAbility[Integer A] = true 
                 then -  Pick every unit of type (the type that gets that special effect) owned by Player[IntegerA] and add special effect to picked unit
              else - do nothing
Ok this makes a loop that when night time strikes, it checks every player if they had researched the abiltiy. This is done when it says
Quote:
if - PlayerAbility[Integer A] = true
. Integer A represents what number the loop is at. If it checks out for true, it then searches for every tower that should have a moonbeam and adds it on to it.
When day comes you wanna add a trigger that has the opposite effect
Code:
Event: Time of day = (When ever day is)
Action: Loop from 1 -  4 (how every many players could have this abilty, lets say 4 for the sake of argument)
              if -  PlayerAbility[Integer A] = true 
                 then -  Pick every unit of type (the type that gets that special effect) owned by Player[IntegerA] and remove special effect from picked unit
              else - do nothing
04-10-2004, 01:05 PM#5
samuraipanda
Thx for helping i got it working now... :D