Jump to content

[AOG] Lift System with Events


Ainz Ooal Gown

Recommended Posts

Description:

This is basically a fancy lift system that displays doors opening and closing then warping a player. This system can be copied and paste / used many times, as you will only need to change the "Warp" points in "Lift Up" (lift 1) and "Lift Down" (lift 2).

 

Video:

https://ascensiongamedev.com/resources/filehost/a58c6c76386b9421958fa3337aba5509.mp4

 

Process:

  1. A player can walk up to a lift, press action button press to call the lift.
  2. Lift doors will then open allowing the player to enter the lift.
  3. Lift doors will then close.
  4. Player is then warped to another lift located anywhere in your world.
  5. Doors to lift open ejecting the player, then closing again. :)

 

Issue:

Only one I found so far, when triggered all lifts in game visually change for the Player ONLY. This isn't a big issue, as the player wont see any of the other lifts.

 

Build:

First we need to make a player variable to hold the lift stage process, so create a new player variable and call it "Player Lift".

Second we create a Player Lift Switch for a On/Off condition we use later.

 

  • Player Variable: Player Lift
  • Player Switch: Lift

 

Now we need a start and finish point for the lift. This can be on the same map or anywhere in your world, as well as this system can be replicated (used) many times.

 

(Tiles are not included in tutorial, sorry)

 

Setting the map tiles for lift:

Spoiler

Here I have put the lift right next to each other. But as you can see you need to have it so the doors are closed.

 

NOTE: “Ele Reset” is not needed, I used it during testing to reset the player lift variable.

1a7ed75856ec331c7b0507a37c240a52.jpg

 

Next we make a map event. This will be the "Lift Up" event (we will make the second lift later based on the first one).

Spoiler

Place the map event at the base of the lift:

afe6b679cad369162789eaa0164a01e5.jpg

 

Each event page  uses the "Player Lift" variable we created earlier, which allows the page to run if the condition is met:

Spoiler

This will be the condition of page 1 and ever page on from this will be "Player Lift is equal to +1". So page 1 "Player Lift" var will be 0, page 2 "Player Lift" will be 1 and so on.

88b1d02fbf9cb7975a3530b2074c2480.jpg

 

This event has 17 pages, but most of them are only stages for the doors to open and close. We use the "Player Lift"variable to also set what stage of the lift process we are currently on:

 

Page 1:

Spoiler

Page 1 "Trigger" will be set as "Action Button", as we want to player to call the lift through an action.

 

432c1346612662677ac8785fcdf0cafc.jpg

 

Pages 2 - 5:

Spoiler

Each page has entity preview set to the doors opening.

 

Page 2 to 5 "Triggers" are "Autorun":

8ad97bb9c544555fb5473fcf480f0caa.jpg

 

4572816e329e1716337d2ba36023e4be.jpg

 

ca91dd1ed3816b20fc9a3d3525c11927.jpg

 

692c2cf03f4da9d1d14033638a5a0396.jpg

 

 

Page 5 is different as now the doors to the lift are fully open. So we want the "Trigger" to be set to "Player Touch" so that when the player steps into the lift the process continues.

 

NOTE: If the player does not trigger page 6 by walking into the lift, the lift doors for every lift event in your game will stay open. To get around this you can create a "Common Event" to check this:

Spoiler

What is happening here is the following:

  1. If "Player Lift" variable = 5 then
  2. Wait 30 seconds
  3. If after 30 seconds "Player Lift" is still set to 5 then set "Player Lift" variable to 14 (this is the end stage of lift system which closes the lift doors)

846dba40eee4c5fcfaaccdf250574761.jpg

 

Page 6:

Spoiler

Page 6 is where the action starts.

 

The "Trigger" Process for the page is "Player Touch", so only triggers when a player walks onto the event (enters lift). When this happens the users control of his character is locked out until the lift process finishes.

 

NOTE: This page is "Passable" to allow the player to touch the event and move through it. All previous stages are NOT passable.

 

de41e4746fe48fbd97de5dd25bd09d58.jpg

 

This page is also different as we have a new command, to move the player:

 

de9f987aa13b7f9bffe1123172292deb.jpg

 

Now we have the player in the lift we want to close the doors, pages 7 - 9:

Spoiler

723440e61c8a6a181a3036e372dfaa54.jpg

 

1597d13df3ca22be3c0366fc62ba57e4.jpg

 

01a0765cefc6b063b41566d17ded9824.jpg

 

Page 10 we now warp the player to the second lift event, but we make the warp point 2 spaces above the event and make the player face down, as well as have a condition on the "Player Lift" Switch:

Spoiler

Here is where the "Player Switch Lift" comes into action. We use a condition for this bit:

 

NOTE: We don't set a entity preview, as the map tiles should be the lift doors closed.

799e7ed207fc8973d811657ff30c6e91.jpg

 

Warp point:

f649fe34a291422d008d49e353573603.jpg

 

Pages 11 - 13 doors open in second lift:

Spoiler

In each one of these pages we "Set Move Route for Player". Now we don't actually move the player but hold them so he cant move in lift, so we set a "Wait" for 1000ms (1 second):

Spoiler

5eaa424dd214af10a45f8a2a4447c870.jpg

 

24d44cd4bfb279bf90e23cc03f4d6097.jpg

 

38f8236fdc6c18057d679db430cfa084.jpg

 

1040cf8ec7bd1fc7c0038f8a352da44e.jpg

 

Page 14:

Spoiler

This is when we want the player to exit the lift so we "Set Move Route for Player" to "Move Down" three times:

Spoiler

123c082d7fb0aed0fe82312949a6abcc.jpg

 

NOTE: Page 14 is set to "Passable" to allow the player to walk out of the lift:

 

1d8814a54cb32ad30a4089718cf2de63.jpg

 

Pages 15 - 17:

Spoiler

Now we want the lift doors to close:

 

858301b141b87cf2d39c98aacbec9541.jpg

 

b666eb59c04c9a8e7903cd49b23b8f6b.jpg

 

3bdde7faed66b5a9b6ed2ce798b50d31.jpg

 

Awesome!

 

If you have got this far then I have to tell you we have another 17 pages to go... I joke! Now we have the "Lift Up" or (Lift 1) complete we can use it as a template for "Lift Down" (Lift 2).

 

So Save the event the copy and paste the event to the place you want the second end of the lift you want to be!

 

Once you have pasted the lift we have to change a few things:

 

Set the "Warp" point on page 10 to "Lift Up" (Lift 1) position but 2 spaces above, like so:

Spoiler

a9d3fbaa67b02b11bce42167442b7273.jpg

 

We need to change the Player Switch "Lift":

Spoiler

Page 1, we change the "Player Switch Lift" = True

42ada09ae004d2264165c61c6be4018f.jpg

 

Page 10, we also change the condition "Player Switch Lift" = False

58de3caff9731a6b219647f8c0f0804a.jpg

 

Complete!

 

Now you should have a fully working Lift System! You can copy and paste the lift as many times as you want, and you just need to set the "Warp" points!

 

Event system is very powerful and with it you can accomplish many features the core engine does not have :)

 

Enjoy!

 

 

Link to comment
Share on other sites

Just now, A l m a said:

Many thanks ~ ♥
And great job with this system (✿◠‿◠)

 

Haha thanks :D

 

Took some doing to make sure I covered everything. Lol

 

Hoping it will inspire people to use the power of the event system, as can add many features to your game using it!

Link to comment
Share on other sites

I personally would make the lift more like pokemon where you go to a seperate map and leave the map and arive at your floor destination. You can even select your floor using a multi select dialogue.

 

Good tutorial and interesting use of the event editor though! 

Link to comment
Share on other sites

8 minutes ago, Kibbelz said:

I personally would make the lift more like pokemon where you go to a seperate map and leave the map and arive at your floor destination. You can even select your floor using a multi select dialogue.

 

Good tutorial and interesting use of the event editor though! 

 

Thats a good idea, could be done by adding a option set to pick the floor. Why I did it based on a variable to set the lift process so it can be be extended. Would also need to change the Player Switch Lift to a variable for the defined floors I think.

 

Might add an extention to the tutorial with that Kibbelz, thanks :D

Link to comment
Share on other sites

5 minutes ago, Little Pixel said:

would this work with the interaction of multple players though trying to use at the same time ?

 

I’ve not tested it with multiple players, but in theory it should work with no issues. If you have the map as a safe zone then the players can move through eachover so can call the lift at the same time and interact with event at same time. If not a safe zone then players can’t walk through each over so have to wait in line for player in front to enter lift event... if that makes sense lol

 

I will do some testing and let you know :)

Link to comment
Share on other sites

2 minutes ago, Ainz Ooal Gown said:

 

I’ve not tested it with multiple players, but in theory it should work with no issues. If you have the map as a safe zone then the players can move through eachover so can call the lift at the same time and interact with event at same time. If not a safe zone then players can’t walk through each over so have to wait in line for player in front to enter lift event... if that makes sense lol

 

I will do some testing and let you know :)

what about the animation cycles ?

Link to comment
Share on other sites

8 minutes ago, Little Pixel said:

i only ask because iv been tryig to perfect such a system for my project :)

 

Actually now that I think it will work(visually) for just the individual for animations and whole process, as it is using a "Player" variable and not a "Global". So only the player will see the lift change (doors open/close and such).

 

EDIT: Just tested and works so that only the player using lift see changes (doors open/close) this is because its based on a player variable. If you did global then everyone would see change, but then you would have to have a global variable for each lift you make for the stages/process.

Link to comment
Share on other sites

6 hours ago, jcsnider said:

Looks absolutely fantastic. Only advice I can give is a new animation where the 'down' button lights up on the elevator for just a little more realism :)  

 

Haha thanks buddy! Yeah nice one, I shall add the button display for the down lift today :D

Link to comment
Share on other sites

Looks great but lifts aren't in the timezone of my game ;-; (or correct me if I'm wrong did they have lifts in 10th century?)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...