Author Topic: elevator rooms with checkpoints  (Read 1857 times)

pieceofcheese87

  • Global Moderator
  • The Kid
  • Posts: 346
  • Personal Text
    • View Profile
    • Twitch Tv Channel
  • Playstyle: Keyboard
elevator rooms with checkpoints
« on: August 04, 2013, 11:45:49 PM »
ok so, you all know what elevator rooms are? rooms that auto-scroll up or down sometimes caused by an object.
(in my case a mole.) How do you make it so if the player saves, the mole spawns up where the player saved instead of back at its spawnpoint?
Signature

Sephalos

  • Spike Dodger
  • Posts: 228
    • View Profile
  • Playstyle: Gamepad
Re: elevator rooms with checkpoints
« Reply #1 on: August 05, 2013, 12:10:31 AM »
ok so, you all know what elevator rooms are? rooms that auto-scroll up or down sometimes caused by an object.
(in my case a mole.) How do you make it so if the player saves, the mole spawns up where the player saved instead of back at its spawnpoint?
The easiest way to do this would be to make two seperate rooms. Otherwise you would have to do something like with the mole object step event....

if checktimer < 5 { checktimer += 1; }
if checktimer = 1 {
If player.y < 'around 96 y lower than the save point';  {
y = 'location you want to spawn the mole on reload';
} }


So assuming your save point is at y400 the code would look something like this

if checktimer < 5 { checktimer += 1; }
if checktimer = 1 {
If player.y < 496;  {
y = 700;
} }


This probably not the best way to do this but this is all I can think right off the top of my head.
« Last Edit: August 05, 2013, 12:12:37 AM by Sephalos »

UltragamerxD

  • Wannabe
  • Posts: 14
  • Kippa
    • View Profile
    • youtube channel :
  • Playstyle: Keyboard
Re: elevator rooms with checkpoints
« Reply #2 on: August 20, 2013, 01:06:59 AM »
maybe works ...
mole's create evet :
y=player.y+plus
//plus is if its lower or higher you know xD

Olivebates

  • Head
  • Alumi
  • Cherry Eater
  • Posts: 89
  • Oh god, why did I make this?
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 29.0.1547.76 Chrome 29.0.1547.76
    • View Profile
    • Tumblr News Feed
  • Playstyle: Keyboard
Re: elevator rooms with checkpoints
« Reply #3 on: September 26, 2013, 07:55:53 AM »
I would just spawn the mole in the bottom of the screen. So when you load, you set the moles y position to view_yview[current_view] + view_wview[current_view] - mole.sprite_height - 16.

The way you formulated it though, just set the moles y-position to the savepoints.
« Last Edit: September 26, 2013, 08:00:11 AM by Olivebates »
When you don't know the rules, anything's possible.