Jump to content


Photo

Warp Pipes?


  • Please log in to reply
4 replies to this topic

#1 JetstreamOrbitars

JetstreamOrbitars

    GMC Member

  • New Member
  • 2 posts
  • Version:GM8

Posted 29 April 2012 - 05:12 PM

Hello. I've been trying to create a Mario-esque warp pipe in my game, however, I don't know how to make it so that the character goes down the pipe.

Script 1

if keyboard_check_pressed(vk_right) {
    if vspeed >= 0 && y <other.y-24 {
        going_in_pipe = true;
        friction = 0;
        motion_set(90,4); // move down with speed of 1
        alarm[1] = 60; // in 2 seconds...
    }
}

Script 2

room_goto_next();
going_in_pipe = false;
speed = 0;
friction = 0.5;

What happens is that the character just doesn't move and the game does not go on to the next room, essentially leaving the player stuck. I would appreciate help in solving this problem.
  • 0

#2 creators124

creators124

    awesomeliciousmember

  • GMC Member
  • 866 posts
  • Version:GM8

Posted 29 April 2012 - 05:19 PM

seems simple to make a object that doesn't do anything except move down into pipe.
then after hitting another object that makes the room change.
  • 0

#3 jo-thijs

jo-thijs

    GMC Member

  • GMC Member
  • 1484 posts
  • Version:GM8.1

Posted 29 April 2012 - 05:20 PM

Well, first of all, I don't know why you used vk_right, vk_down should have been more logical.
And I thought motion_set(90,4) makes an object move up with the speed 4 and motion_set(270,4) makes it go down with speed 4.
But these things doesn't explain the bug.
  • 0

#4 jo-thijs

jo-thijs

    GMC Member

  • GMC Member
  • 1484 posts
  • Version:GM8.1

Posted 29 April 2012 - 05:21 PM

Wait, is your pipe object solid?
  • 0

#5 creators124

creators124

    awesomeliciousmember

  • GMC Member
  • 866 posts
  • Version:GM8

Posted 29 April 2012 - 05:48 PM

Well, first of all, I don't know why you used vk_right, vk_down should have been more logical.
And I thought motion_set(90,4) makes an object move up with the speed 4 and motion_set(270,4) makes it go down with speed 4.
But these things doesn't explain the bug.

I think the code: motion_set(90,4) was to make the player object go up to the surface of the pipe

Wait, is your pipe object solid?

I think the pipe object being solid is not very bright idea if you want to go into it.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users