An Explanation of Triggers

Talk about the level designer. Read about tips and tricks and share ideas.

Moderator: Level Moderator

Re: An Explanation Of Triggers

Postby AwesomeJRFD » July 19th, 2014, 9:59 pm

I am now the owner of the main post, and I've updated it with a bunch of cool new information, like Static variables and hidden trigger functions.
Image
User avatar
AwesomeJRFD
Honorary Member

 
Posts: 836
Joined: November 11th, 2010, 2:06 pm
Location: Sixteenth Dimension: Hyperspace

Runouw Votes Winner
Best Thread (An Explanation of Triggers) in Runouw Votes Summer 2013

Thumbs Up given: 50 times
Thumbs Up received: 38 times

Re: An Explanation Of Triggers

Postby Raz » July 19th, 2014, 10:33 pm

Thanks for giving the thread without telling me at all, that's cool. Even if I wasn't doing stuff, it's still a pretty scummy move to just do it without my say in the matter whatsoever.
I was actually planning on adding stuff.
(and yes I'm being completely sarcastic)
Karyete, Master of Civil Conversation
Disclaimer: none of these messages have been edited, context can be provided if needed (thanks discord!) but absolutely does not change anything about these messages and that he's too overly defensive and cocky to make situations better

Karyete: I don't have anything to say to you, I've been deliberately trying to not offend you for years, actually, but apparently everything I say to you is wrong. You come across as so aggressive that you successfully intimidated me into not wanting to talk to you
Karyete: Seriously, what is your problem? And not only that, you fail to even acknowledge you might be in some wrong here.
Karyete: Oooh it's you? Hello. Feel free to drop this right now. You're going to make yourself look like an idiot.
Karyete: We don't want to hear your opinion at this stage.
Karyete: You're not getting any apology, especially after now.
Karyete: You can stay up on your high horse, continue to twist the truth and act like an absolute child all you want. I refuse to give respect to a man who right now is picking up a dropped argument because he simply cannot fathom the idea that he might be in the wrong.
Karyete: How pathetic
User avatar
Raz
"quite easily the most manly man of all" --Raz

Error contacting Twitter
 
Posts: 4432
Joined: July 12th, 2010, 5:48 pm
Location: :-)

Razzian Fighter

Thumbs Up given: 40 times
Thumbs Up received: 367 times

Re: An Explanation of Triggers

Postby CedarBranch » July 20th, 2014, 1:43 pm

AwesomeJRFD wrote:

If I read this right, does that actually mean that the following trick below is now obsolete?


JSlayerXero in 'Designer Tips and Tricks' (Page 10) wrote:So, I figured out a way to retain global variables after death. To copy it straight out of my Mini-LLLDC entry:
Code: Select all
llitem:6:achv2mem;4203;348;64;64;0;1;branch,5,4,g_achvt,1:set,a,1:set,g_achv2t,1:exit:branch,5,7,g_achv2t,1:set,g_achv2t,1:add,g_achv,g_achv,a:set,g_achvt,0|46;4210;280;branch,5,6,achv,1:add,g_achv,g_achv,1:set,achv,1:activate,achv2mem:subtitle,1,%3Cb%3EAchievement%20Unlocked%3A%20%7B%24g_achv%7D/4%3C/b%3E%0DThe%20Ghost%27s%20Heart,75:sleep,60:subtitle_off|6;4288;256;64;64;0;1;set,g_achvt,1:activate,achv2mem

To explain this is layman's terms, basically what happens is that the Large Heart has the code to make my achievements. These are only built to activate once, and will end prematurely if you've ever gotten them before. These then activate a "memory" trigger, in this case the "achv2mem" trigger. The blank hitbox trigger I should've renamed something like "memrecall" since that is its function. It sets a "test" variable and activates the memory trigger. The test variable makes it so that the actually memory function doesn't activate prematurely. When the achievement trigger activates the memory, it also sets a global variable to let the memory know that you got that particular achievement in this life. This prevents you from getting the achievement again when you activate the recall trigger. However, since it is global, it is also used to detect if you have the achievement, but died afterwards. There are probably better ways to word this, but I've explained the basic functions.

Keep this in mind when placing these: The achievement, and to my knowledge, the memory can be anywhere in the level, but the recall has to be placed in such a way that it must be activated before going through a mandatory transition.

Keep in mind that this system is custom-built to work with my level. Modifications may be necessary to make this compatible with other levels.


...Or will they still not work across transitions, if I read it wrong?
(I'm doing something in my 2nd LLLDC entry where I have one of three switches at the end of each of three segments of the level. Each switch swaps an Empty Orb with a Delta Orb via Move Item functions - all within the same transition. I am concerned that the Delta Orbs will revert back out of place if I die inside or outside that particular transition, so then I used JSlayerXero's "memory trick" to attempt to fix this. However, I haven't tested it yet to make sure it clearly is fully compatible with my level; I am a very cautious individual, so I don't want to have any location where respawning/dying from it breaks the level [reverting the Delta Orbs back out of place, and needing to re-press each Switch]. Essentially, I'd love to have a clear, simple solution, and I'm hoping that Static variables is the one.)
Triple J here!
Image
Credit goes to FrozenFire/l.m
Other Stuff: show
AC:NL Info

Dream Address: 4400-3141-4504
Mayor: Triple J
Town Name: Quattom



My Super Mario Maker levels: viewtopic.php?f=77&t=46621&p=344256#p344256

My Youtube channel, if you could possibly bother: https://www.youtube.com/channel/UCuP5V8 ... subscriber

Brand-new Bomberman 64: The Second Attack Gameshark Codes!
Now on Dropbox! Active and updated irregularly.
User avatar
CedarBranch
Impulsive & ambitious

 
Posts: 1242
Joined: June 15th, 2012, 1:10 pm
Location: Reclusive. (At least I want to.)

Runouw Votes Winner
Voted "Best Level" with Essence of Time in Runouw Votes New Year 2014/15

Thumbs Up given: 384 times
Thumbs Up received: 108 times

Re: An Explanation of Triggers

Postby AwesomeJRFD » July 20th, 2014, 2:40 pm

Static variables work the same way as regular Global variables in that they work across transitions and different triggers, so yes. They will work fine for that, and Xero's trick is obsolete.
Image
User avatar
AwesomeJRFD
Honorary Member

 
Posts: 836
Joined: November 11th, 2010, 2:06 pm
Location: Sixteenth Dimension: Hyperspace

Runouw Votes Winner
Best Thread (An Explanation of Triggers) in Runouw Votes Summer 2013

Thumbs Up given: 50 times
Thumbs Up received: 38 times

Re: An Explanation of Triggers

Postby CedarBranch » July 20th, 2014, 2:56 pm

Thank you so much for that clarification. :>

...And now to continue working on my entry. IT HAZ TO B DUN!
Triple J here!
Image
Credit goes to FrozenFire/l.m
Other Stuff: show
AC:NL Info

Dream Address: 4400-3141-4504
Mayor: Triple J
Town Name: Quattom



My Super Mario Maker levels: viewtopic.php?f=77&t=46621&p=344256#p344256

My Youtube channel, if you could possibly bother: https://www.youtube.com/channel/UCuP5V8 ... subscriber

Brand-new Bomberman 64: The Second Attack Gameshark Codes!
Now on Dropbox! Active and updated irregularly.
User avatar
CedarBranch
Impulsive & ambitious

 
Posts: 1242
Joined: June 15th, 2012, 1:10 pm
Location: Reclusive. (At least I want to.)

Runouw Votes Winner
Voted "Best Level" with Essence of Time in Runouw Votes New Year 2014/15

Thumbs Up given: 384 times
Thumbs Up received: 108 times

Re: An Explanation of Triggers

Postby ReSult » July 26th, 2014, 10:38 am

I have my own object here, for Grass Levels.
Code: Select all
llitem:194;535;1395;1;1;130;;0|195;559;1416;1;1;125;;0|193;573;1411;1;1;40;;0|193;587;1387;1;1;-140;;0|196;586;1388;1;1;55;;0|189;528;1362;1;1;15;;0|192;549;1318;1;1;-95;;0|193;557;1302;1;1;-110;;0|190;543;1299;1;1;-130;;0|195;570;1310;1;1;-10;;0|194;571;1341;1;1;0;;0|196;571;1339;1;1;-170;;0
Image

/\__/\
(='.'=)
/____\
(") (")
This is a cat put him in your signature to help defeat the bunny, or else it will invade your avatar
ReSult
Guardian to Glitch Castle

 
Posts: 10
Joined: July 20th, 2014, 12:08 pm
Location: In Errorland

A Good Start

Thumbs Up given: 0 times
Thumbs Up received: 0 times

Previous

Return to Last Legacy Level Designer