Please do not send inquiries to the Forum Moderators and Community Manager Cuddles regarding forum name changes. Exceptions are only made if the forum name violates the CoC. Thank you for understanding.

[Tutorial/Guide] Triggers and You!

ShimaekoShimaeko
Maplestory 2 Rep: 1,230
Posts: 42
Member
edited 10:05AM May 11, 2018 in Housing Creations
Hello Fellow Maplers! Shimaeko/(Potatoe ign) Here With a wonderful tutorial for y'all!

Please Note, This I am always open to edits and suggestions to make this guide better, Also it is a WIP as I still need to get many screen captures to better clarify points, and am still learning new things about it. Feel free to let me know any additions, and I will update this.

A bunch of people seem to want to know a little bit more about the trigger system here in MS2. Well good news! I'm gonna give you a lil tutorial on how to use them (and for the most part, its pretty short and sweet). So Lets Get Started!

What You Need
• A House
• At Least 1 Network Computer (1)
• Some Things to trigger (these can be switches, doors, lights, and some other items) (2/3)
• Some basic knowledge of conditional logic (if/then)

jAsQbHo.jpg

The Basics
To start, one must place down a Network Computer in their home.
Each network computer can do the following:
• Hold up to 10 triggers (1 start, 9 others)

Each trigger can do the following:
• Hold 3 Upon triggers
• Hold 3 Conditional If statements

Each Conditional If statement can do the following:
• Hold 3 Triggers
• Will always route back to itself or another trigger

Once you have a Network Computer Down, you must also place some trigger-able items. Most common trigger-able items are doors, lights, and switches. All trigger-able items only have 2 states: On and Off.
After you have some of these placed, its times to start creating your triggers. To do this, exit builder mode, walk up to your Network Computer and press the action key (space by default). This will bring up the MS2 Trigger UI

FO4ldgs.jpg
1.) A trigger
2.) Button to add triggers
3.) List of placed trigger-able objects in house
4.) Save button
5.) Min/Max button

This is what the trigger UI looks like. On the left, you have all placed trigger-able objects in your house. each item has a unique ID attached to them that are used to identify your objects. (You can minimize the trigger editor in the top right and move around. all items will have their ID's listed above them in your house while the editor is open) You can also freely move around and test your triggers without exiting the editor)

By default there is a single blank trigger added to your window. You may also notice the word [Start] in red. This is the trigger that is always first to start in its sequence of events. You can swap this starting trigger by clicking any of the "Default" buttons in the left side of the trigger window.

A Single Trigger
There's 2 parts of a trigger:
• Upon These are fired when entering a trigger from another triggers conditional
• Conditional These are triggers that are fired when certain criteria is met.

Everything in a trigger is Binary (on/off) and all conditionals are simple if statements, nothing more. Additionally, a conditional will always go to another trigger.

Finding Your Way Around A Trigger / Creating a simple light switch

fVNhqjR.jpg
To add Conditions/Triggerable events to the trigger, you can hover over the section with the mouse and click the add button.

zSjvmKM.jpg
The highlighted text can be clicked to select the condition/item/trigger that you would like. You may also drag items from the objects list.

hzzbeJo.jpg
Hovering over "go to" link will show you what trigger will each conditional is linked to.

You now want to hit the save button. After, you can hit the minimize button and try out your new light switch.

What is happening
The trigger starts in the [Start] trigger named switch. From here we are doing a strict conditional for this switch: If switch is on, do something, if switch is off, do this other thing. This thing is, well, turn on the light! At the end of the of the conditional, we point back to itself. This ensures that the triggers will always be active, and waiting for something else to be triggered. We keep the -upon section blank, because we do not want anything to trigger once entering the trigger again. If we wanted this switch to trigger multiple light switches, we can simply do this by adding up to 2 more trigger-able objects in the conditional (for a total of 3)

A Little More Complex Light Switch Trigger
Below is another version of a light switch trigger. However this one utilizes the power of -upon, and multiple triggers.

Babeecl.jpg

What is happening
In this scenario, we have a light switch doing the same thing as the simple light switch with a few more things. First: We are turning a third claw light off to start. (this is in the "Upon" section. Then we are checking the status of the switch. If it is on, we are going to open the door, turn on one light, then proceed to the second trigger. (if its off, we are closing the door and turning off the light). In the second trigger, we are turning the third claw light on, then we are checking the status of the door. If the door is open, we are turning off a second cat light, if closed, we are turning on the second cat light. All of this results in the following:
• A flickering claw light (triggered by the the on/off in "upon" section as it goes back and forth between triggers)
• A switch that when ON -> opens a door turns on one cat light and turns off another cat light and when OFF -> closes the door, turns off the cat light, and turns on another cat light.

Gr5LQK3.jpg


I hope you liked this tutorial!

I will post more/rearrange as I get comments/feedback/time and all that jazz. Additionally, I have major plans to make some pretty nice things (I am a programmer at heart). By first big maple project on release is going to be a Maple House Maze :) (I will post when I finish all the design and what not/when I got time).
Posesmileycat3rv1nstusaderDrakooonDanDKNumberFaelightAmaranthineSpecksand 1 other.

Comments

  • ShimaekoShimaeko
    Maplestory 2 Rep: 1,230
    Posts: 42
    Member
  • PosePose
    Maplestory 2 Rep: 7,045
    Posts: 264
    Member
    Awesome! Thanks.
    Drakooon
  • TreekiTreeki
    Maplestory 2 Rep: 1,670
    Posts: 25
    Member
    edited 7:01AM May 11, 2018
    Is there a way to edit the camera view by interaction with something? I saw a video posted here a few days ago where he switched from quarter view to side view by going though a portal that led to another part of his house. Very nice guide though I really appreciate it.
  • PosePose
    Maplestory 2 Rep: 7,045
    Posts: 264
    Member
    Treeki wrote: »
    Is there a way to edit the camera view by interaction with something? I saw a video posted here a few days ago where he switched from quarter view to side view by going though a portal that led to another part of his house. Very nice guide though I really appreciate it.

    In the house settings when you enter furnishing, you can change your house view to top down, 2d, or default.
  • TreekiTreeki
    Maplestory 2 Rep: 1,670
    Posts: 25
    Member
    Pose wrote: »
    Treeki wrote: »
    Is there a way to edit the camera view by interaction with something? I saw a video posted here a few days ago where he switched from quarter view to side view by going though a portal that led to another part of his house. Very nice guide though I really appreciate it.

    In the house settings when you enter furnishing, you can change your house view to top down, 2d, or default.

    I know, I was asking if you could have a trigger affect the camera view
  • ShimaekoShimaeko
    Maplestory 2 Rep: 1,230
    Posts: 42
    Member
    Treeki wrote: »
    Pose wrote: »
    Treeki wrote: »
    Is there a way to edit the camera view by interaction with something? I saw a video posted here a few days ago where he switched from quarter view to side view by going though a portal that led to another part of his house. Very nice guide though I really appreciate it.

    In the house settings when you enter furnishing, you can change your house view to top down, 2d, or default.

    I know, I was asking if you could have a trigger affect the camera view

    As far as I know, you cant. Triggers only interact with trigger-able objects; you can usually tell because the item description says it can be effected by triggers.

    However portals themselves are apparently trigger-able, Though I haven't played around with that yet. Most likely only allows for activate/deactivate as its on/off function. Though, going through a portal itself, that leads to another part of the house (because you can link house portals) may actually move the camera, but would still need to walk through the portal. (function of the portal not the trigger)
    DanDKNumber
  • smileycatsmileycat
    Maplestory 2 Rep: 3,110
    Posts: 184
    Member
    Maple House Maze sounds amazing! Definitely tell us when you build one :)
    Shimaeko
  • ShimaekoShimaeko
    Maplestory 2 Rep: 1,230
    Posts: 42
    Member
    smileycat wrote: »
    Maple House Maze sounds amazing! Definitely tell us when you build one :)

    Will do :) still plotting it out. Gonna be multi level, and hopefully gonna have the puzzle difficulty increase each level. The trigger system is a lil limiting, but i think i can make do.
    smileycat
  • MarisaKirisameMarisaKirisame
    Maplestory 2 Rep: 820
    Posts: 35
    Member
    would be nice to set up something that would check a player's level enters your house if they're under a certain level they wouldn't be able to enter certain areas in the house because they will die if they go through any of those teleporters cuz they lead to really high level areas
  • SinishadowSinishadow
    Maplestory 2 Rep: 1,865
    Posts: 100
    Member
    Elevators are simple doors, or they actually work and can teleport you to the other elevator? o:
  • ShimaekoShimaeko
    Maplestory 2 Rep: 1,230
    Posts: 42
    Member
    Sinishadow wrote: »
    Elevators are simple doors, or they actually work and can teleport you to the other elevator? o:

    They are just fancily designed doors

    though you could technically put a portal behind one, and have it come out another one.
  • DrakooonDrakooon
    Maplestory 2 Rep: 7,060
    Posts: 947
    Member
    OMG! Jump Quest Houses with triggers in them *screams*

    ---Drakooon on mobile
    DanDK
  • DanDKDanDK
    Maplestory 2 Rep: 33,475
    Posts: 2,569
    Member
    Drakooon wrote: »
    OMG! Jump Quest Houses with triggers in them *screams*

    ---Drakooon on mobile

    Indeed, it'd be possible to emulate classic Party Quest puzzles as well. Unfortunately the host will not have any way to randomize outcome but with an additional bunch of control triggers he could preset a lot of different combinations, which could give roughly the same effect. Combining Jump Quests with this has much more potential too :D
    Drakooon
  • ShimaekoShimaeko
    Maplestory 2 Rep: 1,230
    Posts: 42
    Member
    DanDK wrote: »
    Drakooon wrote: »
    OMG! Jump Quest Houses with triggers in them *screams*

    ---Drakooon on mobile

    Indeed, it'd be possible to emulate classic Party Quest puzzles as well. Unfortunately the host will not have any way to randomize outcome but with an additional bunch of control triggers he could preset a lot of different combinations, which could give roughly the same effect. Combining Jump Quests with this has much more potential too :D

    to bad you couldn't also randomize gravity changes xD though even just changing gravity rules could be enough to add a little challenge.
  • DrakooonDrakooon
    Maplestory 2 Rep: 7,060
    Posts: 947
    Member
    Shimaeko wrote: »
    DanDK wrote: »
    Drakooon wrote: »
    OMG! Jump Quest Houses with triggers in them *screams*

    ---Drakooon on mobile

    Indeed, it'd be possible to emulate classic Party Quest puzzles as well. Unfortunately the host will not have any way to randomize outcome but with an additional bunch of control triggers he could preset a lot of different combinations, which could give roughly the same effect. Combining Jump Quests with this has much more potential too :D

    to bad you couldn't also randomize gravity changes xD though even just changing gravity rules could be enough to add a little challenge.

    I think in MS1 the theif skills (haste) and other speed boosters (running speed %) attk speed%, etc. Were all removed/set to a standard/fixed setting. I would recommend the same for MS2. I'm not sure how they use all this in MS2 as I didn't play a fast pace class this time around e.g. theif, assassuin etc.?

    ---Drakooon on mobile
  • ShimaekoShimaeko
    Maplestory 2 Rep: 1,230
    Posts: 42
    Member
    Drakooon wrote: »
    Shimaeko wrote: »
    DanDK wrote: »
    Drakooon wrote: »
    OMG! Jump Quest Houses with triggers in them *screams*

    ---Drakooon on mobile

    Indeed, it'd be possible to emulate classic Party Quest puzzles as well. Unfortunately the host will not have any way to randomize outcome but with an additional bunch of control triggers he could preset a lot of different combinations, which could give roughly the same effect. Combining Jump Quests with this has much more potential too :D

    to bad you couldn't also randomize gravity changes xD though even just changing gravity rules could be enough to add a little challenge.

    I think in MS1 the theif skills (haste) and other speed boosters (running speed %) attk speed%, etc. Were all removed/set to a standard/fixed setting. I would recommend the same for MS2. I'm not sure how they use all this in MS2 as I didn't play a fast pace class this time around e.g. theif, assassuin etc.?

    ---Drakooon on mobile

    Well inside a house there are gravity settings you can change, and you can apply haste, however from what I was testing, It seems that jump height is static (unless there's something out there that modifies it). All the gravity does is decreases/increases the time it takes you to drop back down. Was still able to jump from spot to spot the same (or at least it seemed like it).
  • hankiepixhankiepix
    Maplestory 2 Rep: 1,635
    Posts: 82
    Member
    edited 5:47AM June 29, 2018
    Awesome! Reminds me of a few social games I played when I was younger. Can you make loops? Also can what people say trigger things to happen? (For example saying "light on" would turn on all the lights)
    I wouldn't actually expect such kinds of interactions with items in a game like this, but a kid can dream :')
    Edit: Also, if you can make loops, since I haven't played MS2 yet, do items have cool downs? As a game I used to play didn't have cool downs, and people would cause these kinds of triggers with a loop to basically make your game crash by doing everything at once haha (for example, loads of toilets placed in a space with the lids doing a mexican wave)
  • ShimaekoShimaeko
    Maplestory 2 Rep: 1,230
    Posts: 42
    Member
    hankiepix wrote: »
    Awesome! Reminds me of a few social games I played when I was younger. Can you make loops? Also can what people say trigger things to happen? (For example saying "light on" would turn on all the lights)
    I wouldn't actually expect such kinds of interactions with items in a game like this, but a kid can dream :')
    Edit: Also, if you can make loops, since I haven't played MS2 yet, do items have cool downs? As a game I used to play didn't have cool downs, and people would cause these kinds of triggers with a loop to basically make your game crash by doing everything at once haha (for example, loads of toilets placed in a space with the lids doing a mexican wave)

    You can make loops, though given that the only things that are able to be used within the scripting system are switches and switchable items (doors, lights, portals) all they do is open/close/off/on. You can make lights flicker in patterns and what not. From what I've noticed, given that you do have a limit on the amount of triggers you can create, it wont crash your game.

    I really hope they do add more functionality for programmers. Being a programming nerd myself, this stuff is fun, though they system can be a little annoying and clunky at times. One thing i think is pretty cool is that you could potentially daisy chain houses together (kinda like a multi-level puzzle dungeon). still have yet to test that out though given that only got 1 beta account.
  • GotexGotex
    Maplestory 2 Rep: 860
    Posts: 31
    Member
    When using portals and a switch does its condition effect its funtion or visability. Example, can you make a switich that when the consition is off then portals aren't visable, and when you switch on they appear? Or is it when the switch is of / on they just function or dont?
  • PhlygonePhlygone
    Maplestory 2 Rep: 300
    Post: 1
    Member
    I am so confused on how portals are supposed to work. None of the guides specify how to change the trigger to go to a location on the map, only to another portal in your house (and honestly I can't get that to work right either). I have some programming knowledge but by no means an expert, any help on the issue would be appreciated.