Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Apr 18, 2024 6:15 am
All times are UTC + 0
Trigger help
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [14 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Mar 14, 2012 9:02 am    Post subject:  Trigger help
Subject description: Shutdown buildings, when others are destroyed
Reply with quote  Mark this post and the followings unread

I would like to know how to disable certain buildings, if other buildings are destroyed.

e.g. i have 3 radars and want to shut down (action 61 turn off building) 2 barracks once all three radars are destroyed.

Is it really necessary to create for each radar a trigger with event 48 destroyed by anything and set this way 3 local variables, one for each radar?
Then add another trigger with 3 events with each having "36 local is set" and one of the 3 local variables assigned.
Do 3 events really work in an "AND" connection? I dont want to shut down the barracks after every single destroyed radar, but only when all 3 are destroyed.

Can someone give me an overview how to achieve the described scenario?

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
DonutArnold
General


Joined: 18 Jan 2005
Location: Finland

PostPosted: Wed Mar 14, 2012 9:34 am    Post subject: Reply with quote  Mark this post and the followings unread

Hmm, I think final FS mission might have the solution.

Can't really say 'cause I have never done any maps nor triggered them...

Back to top
View user's profile Send private message
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Wed Mar 14, 2012 9:41 am    Post subject: Re: Trigger help Reply with quote  Mark this post and the followings unread

Alternatively, you can create a new house for the radars only. Then create a trigger that activates once all structures (the three radars) from this house are destroyed. The trigger then disables the barracks.

But yeah, AFAIK events usually function in AND situation. This may depend on the events and their order, though. I can't remember 100%.

_________________


Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Mar 14, 2012 10:18 am    Post subject: Reply with quote  Mark this post and the followings unread

Using a new house is not possible in MP maps and also like using a sledge hammer for a small nail.

Strange that even TD supported OR and AND relations in trigger.
0 was not repeating
1 was AND
2 was OR

I wonder if using a 1 on the trigger type works in TS, even if FinalSun only knows 0 and 2.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Ixith
Cyborg Commando


Joined: 12 Apr 2006
Location: under there!

PostPosted: Wed Mar 14, 2012 2:40 pm    Post subject: Re: Trigger help Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:

Do 3 events really work in an "AND" connection? I dont want to shut down the barracks after every single destroyed radar, but only when all 3 are destroyed.

Can someone give me an overview how to achieve the described scenario?


that would work and is actually how I have chosen to do it in a couple of maps. For example in Yelcraz Island once all the churches are destroyed it triggers an Ion Storm. Whether or not it's the easy way to do it, I don't know. But it does work. And one particular reason I like doing it this way is because you can easily cause other events and circumstances from each radar being destroyed with use of the local it sets.
However keep in mind that, like Crimsonum thought, the event order DOES matter in some cases. By some cases I mean typically anything that depends on time. If you're just using locals you probably won't have to worry about it but if say you wanted something to trigger 1000 tics after a local is set then you'd want to put the local first and then the Elapsed Time event otherwise the elapsed time part runs and the trigger will then fire right after the local is set. Or at least that's been my experience.

So yes, 3 triggers one for each radar which sets a local, and then another trigger which shuts down both barracks after the 3 locals are set should work for the situation.

_________________
Kalistia Crestland (2)
In Soviet Russia, grass grows on tiberium!

Back to top
View user's profile Send private message Send e-mail Skype Account AIM Address
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Mar 14, 2012 7:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

thanks for the info.

Does anyone noticed a limit for the max amount of local variables and/or triggers?

Since tunnels can be only max 127 on one map (max 127 entries in the Tubes section), i fear there might be a limit on these as well.

\EDIT
yay, as expected, the 1 does indeed work. (see attached picture) Very Happy

If you set the trigger Type to 1, it will work with an "AND" relation.
I've added this trigger to 3 radars. It has the event "destroyed by anything" and the trigger won't activate until all 3 radars are destroyed.



ANDTrigger.png
 Description:
 Filesize:  12.97 KB
 Viewed:  3491 Time(s)

ANDTrigger.png



_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Ixith
Cyborg Commando


Joined: 12 Apr 2006
Location: under there!

PostPosted: Wed Mar 14, 2012 8:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

I know I've seen 1 used in some WW missions in that box before but never bothered looking into why or how it was used. Good to know though.

As for a limit on the locals...if there is one it's a high enough number that I doubt you'll use them all. I think the most i've seen before was on the 2nd Nod firestorm mission where you have to use the civilians to bait the tib creatures out of the genesis pit to destroy all the GDI base and civi city on the other side of the river. I think that map uses like 60 some odd locals altogether and most of them are linked too IIRC.

_________________
Kalistia Crestland (2)
In Soviet Russia, grass grows on tiberium!

Back to top
View user's profile Send private message Send e-mail Skype Account AIM Address
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Thu Mar 15, 2012 7:46 am    Post subject: Reply with quote  Mark this post and the followings unread

Ixith wrote:
As for a limit on the locals...if there is one it's a high enough number that I doubt you'll use them all. I think the most i've seen before was on the 2nd Nod firestorm mission where you have to use the civilians to bait the tib creatures out of the genesis pit to destroy all the GDI base and civi city on the other side of the river. I think that map uses like 60 some odd locals altogether and most of them are linked too IIRC.


Must've been a pain to debug that one, lol.

_________________


Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Mar 15, 2012 8:07 am    Post subject: Reply with quote  Mark this post and the followings unread

WW had an ingame map editor and debug windows. Thus they surely hadn't to map, start the game, load the map, test the trigger, leave the game, continue mapping. They only had to start the game and map. Wink I guess they were able to produce maps 5 times faster than we can.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Orac
President


Joined: 11 Jul 2008
Location: New Zealand

PostPosted: Thu Mar 15, 2012 9:43 am    Post subject: Reply with quote  Mark this post and the followings unread

And yet, Grand Canyon.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Mar 15, 2012 12:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

Orac wrote:
And yet, Grand Canyon.

good tools don't replace creativity Wink

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Jun 27, 2012 11:46 am    Post subject: Trigger help the 2nd Reply with quote  Mark this post and the followings unread

This is somewhat related to this so i continue this topic.

How can i trigger that a single building should shutdown after 30 seconds, then turn on after another 30 seconds, then shut down again after another 30 sec and so on?

Since each Trigger has its own unique Tag, and only one Tag can be assigned to a building, how can i assign the other Trigger to the building? (one Trigger for shutdown, the other for turning on)

In other words, how can i assign two different Triggers to one building?

Last edited by Lin Kuei Ominae on Wed Jun 27, 2012 11:56 am; edited 1 time in total

Back to top
View user's profile Send private message
Aro
Alcohol Fueled


Joined: 10 Sep 2006

PostPosted: Wed Jun 27, 2012 11:56 am    Post subject: Reply with quote  Mark this post and the followings unread

A nice easy tutorial posted by Allied General on Revora should clear that up for you.

Allied General wrote:
The thing you must understand is that you do not actually attach a trigger to an object. What you are really doing is attaching that trigger's tag. So what you need is a common tag for all triggers involved. Let's consider an example where you want to attach 2 triggers to the same building.

Make both triggers, and call them TRIG1 and TRIG2. Now edit TRIG1: in the "attached trigger" field (you thought you would never use this, right?), select TRIG2. Now TRIG2 is attached to TRIG1, so TRIG2 doesn't need a tag anymore -- because it can use TRIG1's tag instead! At this point, open into the Tag Editor and find TRIG2's tag, and delete it. It is no longer needed and its presence would just confuse things. You want to force TRIG2 to use TRIG1's tag.

Double-check TRIG1 in the trigger editor and make sure it is set to Type2 (repeating). You must do this or your multiple trigger arrangement will not work properly. This is because tags can be repeating or not -- not triggers. If the tag was not flagged as a repeating tag, then when the first trigger fires the tag gets "used up", and the second trigger would never fire. After you set TRIG1 to be repeating, you can check TRIG2 and you will see it has automagically become a Type2 trigger as well.

Now double-click on your building, and attach TRIG1's tag to it. Both triggers are now attached to the same building!

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Jun 27, 2012 12:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

fantastic. Smile thank you Aro.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [14 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.2070s ][ Queries: 14 (0.0142s) ][ Debug on ]