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 Tue Mar 19, 2024 2:11 am
All times are UTC + 0
Multiple triggers on a single object
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [10 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Tue Jun 04, 2013 1:16 pm    Post subject:  Multiple triggers on a single object Reply with quote  Mark this post and the followings unread

This was something that had puzzled me for a while now. I wasn't exactly sure how the attached trigger thing in map triggers was supposed to work. My goal was to attach 3 triggers to a single object using the attached trigger feature. In the end it wasn't too complicated, but interestingly all the triggers (minus the very last one) need to be of type 2 (repeating). To make sure the trigger doesn't get fired over and over again, give the same trigger an action that disables it. So Trigger 1 is a repeating trigger, but disables itself after being fired once. Since it is a repeating trigger now (that doesn't get repeated) we can attach more triggers to it.

The following pictures show how to chain together 3 triggers. They activate when the target is first fired upon, then at 50% and 25% hp. What to use for the event(s) and action(s) are of course for you to decide, just remember to put the "disable trigger" as one of the actions. Or if you wanted one or more of the triggers to keep repeating, then don't use the disable trigger action. If you wanted more triggers attached to a single object, just change trigger 3 into type 2 (repeating) and give it an attached trigger, and so on.







Key Words: #Tutorials #Mapping #TiberianSun #Firestorm #FinalSun 

_________________

Back to top
View user's profile Send private message
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Tue Jun 04, 2013 1:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

As long as you keep in mind that the primary trigger has to be attached to the Team/TechType and repeating set to 2 and there are no tags for any attached trigger, you should be fine.

_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Jun 04, 2013 1:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

There was already a tutorial somewhere, but i can't find it anymore. Sad

It even explained how this works (all trigger use the same Tag) and explained that you can remove the Tags of the additional Trigger. e.g. in your case you have a Tag for Multi-Trigger 1 to 3 and you can remove the Tags for Multi-Trigger 2 and 3 as they use now the Tag of Multi-Trigger 1 too.

The Trigger-type "2-repeating" is set on the Tag, thus changing it on one Trigger, will change it for all attached trigger.

In short: on Objects (Building, Units etc) you assign a single Tag, not Trigger.
Trigger are then attached to each other and one of them (the first one) is assigned to a Tag, thus multiple Trigger can share the same Tag.
This in turn allows multiple Trigger to react on a single object.

P.S.: congrats to your PPM-FTP SuperJoe. Nice to see the pictures now hosted by PPM and not an external filehoster anymore Smile

_________________
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
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Tue Jun 04, 2013 8:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

Oh yeah I forgot to mention that you need to attach the first trigger to the object and / or team. I never bothered to check the Tags, but I guess that makes sense. So in this example Multi-trigger 3 would also be forced to type 2 repeating trigger? In that case if you didn't want it to fire more than once, you'd need to add the disable trigger action even for the last trigger. Doesn't matter at all what Type you make the triggers after the 1st one if they are all forced to be type 2?

Used these multi-triggers to create something bit more complex. 4 triggers attached to a single unit, each of them checks when it has 25% hp left. A single repeating trigger can't get the job done since it bugs out after reaching the condition once (it will activate every time after that when the unit is hit, even if it has full hp). I left only the first trigger enabled. When the unit is at 25% hp, the first trigger activates and disables itself, and enables the second trigger (with a slight delay), and so on. With this the unit changes tactics every time you manage to nearly kill it. Could probably do some other interesting things with these multi-triggers.

_________________

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


Joined: 19 Mar 2004
Location: United Kingdom

PostPosted: Tue Jun 04, 2013 9:10 pm    Post subject: Reply with quote  Mark this post and the followings unread


_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Facebook Profile URL Twitter Channel URL
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Tue Jun 04, 2013 9:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

SuperJoe wrote:
So in this example Multi-trigger 3 would also be forced to type 2 repeating trigger? In that case if you didn't want it to fire more than once, you'd need to add the disable trigger action even for the last trigger. Doesn't matter at all what Type you make the triggers after the 1st one if they are all forced to be type 2?


The attached triggers use the tag of the first (parent) trigger. If you set the tag of that trigger to 2 (repeating), all secondary (child) triggers will be updated to have their repeating flag set to 2 as well.

In the end all secondary triggers will be set to 2 (repeating) and will require a disable action for them-self.

Below there's quick draw I made to explain the tag usage (01000001 is the tag). Since 01000002 and 01000004 have no tag of their own, but are secondary triggers of 01000000 they will use the tag (01000001) of that trigger (01000000).
That's the tag you attach to a structure and also the one that 01000002 and 01000004 will use. Otherwise they don't know what to check.

If you change the repeating flag of 01000002 for instance, it will create a new tag for that trigger (most likely): 01000003.
The trigger will then look for a structure with 01000003 attached to it rather than 01000001, which results in breaking your trigger attachment chain.
Make sure you never ever create a tag for, or touch the repeating flag of a secondary trigger.

Legend:
Red line indicates trigger attachment.
Blue line indicates tag references.


_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Jun 04, 2013 9:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

thanks Allied General. That was the one i meant, though i thought i have seen it here on ppm or tibweb.

\btw, topic moved to mapping tutorials.

_________________
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
Zero18
Commander


Joined: 10 Dec 2012
Location: I'm too busy conquering the world!

PostPosted: Tue Jun 04, 2013 11:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

I attempted to do this on mission 4 to get the text trigger and damaged heal to work together. Its very complex indeed.

_________________
Mod Leader and founder of World Domination


Back to top
View user's profile Send private message
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Wed Jun 05, 2013 5:50 am    Post subject: Reply with quote  Mark this post and the followings unread

I really don't get what's so difficult about it ;_;
Might just be because I'm a mapping God...

_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

Back to top
View user's profile Send private message
Krow
Commander


Joined: 30 Jan 2010
Location: Malaysia

PostPosted: Wed Jun 05, 2013 7:00 am    Post subject: Reply with quote  Mark this post and the followings unread

A stingy mapping god.

_________________
Team Black wrote:
interesting seeing your voxel work. They're still better than Aro's!

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [10 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.1511s ][ Queries: 11 (0.0078s) ][ Debug on ]