Powered by Invision Power Board

 
    Reply to this topicStart new topicStart Poll

> Moving Platforms, SOLVED thanks to Ultramario
Unspecified
Sir_Gamealot
  Posted: Aug 20 2006, 12:01 PM
Quote Post


Happy 30th Star Wars!
[*]

Group Icon
Group: Members
Posts: 319
Member No.: 2227
Joined: 22-June 06

Status: (0d) [--]


How would I go about making vertical and horizontal moving platforms in GM6?

Thanks in advance!

This post has been edited by gamemakerchampion on Aug 20 2006, 04:37 PM


--------------------
aka: GMC; lildave2011
user posted image
peek-a-boo!
PMEmail PosterUsers WebsiteAOL
Top
Canada
MegaTailzChao
Posted: Aug 20 2006, 12:09 PM
Quote Post


So long, and thanks for all the fish.
[S][*][*][*][*]
[*][*]

Group Icon
Group: Site Staff
Posts: 15788
Member No.: 2267
Joined: 2-July 06

Status: (0d) [--]


Have the platforms move, and on collision with certain objects, change the direction. As for the character, on collision with it, check for if the player's y is less then the platefrom's y, and have the player's x/y change with the platforms h/vspeed.


--------------------
user posted image
user posted imageuser posted image
PMEmail PosterMSN
Top
Unspecified
Sir_Gamealot
Posted: Aug 20 2006, 12:31 PM
Quote Post


Happy 30th Star Wars!
[*]

Group Icon
Group: Members
Posts: 319
Member No.: 2227
Joined: 22-June 06

Status: (0d) [--]


Could you type the code,I don't know GML(I'm gonna have to change my user name,lol)?


--------------------
aka: GMC; lildave2011
user posted image
peek-a-boo!
PMEmail PosterUsers WebsiteAOL
Top
Canada
MegaTailzChao
Posted: Aug 20 2006, 12:40 PM
Quote Post


So long, and thanks for all the fish.
[S][*][*][*][*]
[*][*]

Group Icon
Group: Site Staff
Posts: 15788
Member No.: 2267
Joined: 2-July 06

Status: (0d) [--]


Hmm...

You know how to make the platfrom's movement.
Player character:
on collision with Platform:
if y > other.y
{
x += other.hspeed
y += other.vspeed
}

In theory, it should work...


--------------------
user posted image
user posted imageuser posted image
PMEmail PosterMSN
Top
Unspecified
Marth
Posted: Aug 20 2006, 12:46 PM
Quote Post


the one who hates him self the one the people hate the one who w
[*]

Group Icon
Group: Banned
Posts: 2593
Member No.: 2450
Joined: 6-August 06

Status: (0d) [--]


I'm buying the game maker book today so i'll learn gml and try to see what i can do after i help my self since i'm pathetic


--------------------
people who drew me Julio T-Man http://i19.photobucket.com/albums/b163/ajw....jpg]Mariotroid
user posted image can't wait tll my gift opens

MY REFRENCE here's my sprite sheet my sheet

art of my old character Vex Neoplis Hatman
neini Toodles(my jacko lantern.) ~Smoke~

QUOTE (LuigiFan @ Nov 25 2006, 02:20 PM)
you're like some crazy toy with a pull string that has 18000 random phrases that's on a mad out of control rampage all over the city

i'm just a fingment of your mind waiting to find a meaning
PMEmail Poster
Top
Unspecified
Sir_Gamealot
  Posted: Aug 20 2006, 12:48 PM
Quote Post


Happy 30th Star Wars!
[*]

Group Icon
Group: Members
Posts: 319
Member No.: 2227
Joined: 22-June 06

Status: (0d) [--]


Sorry,but it still doesn't work,Mario just slides off...


--------------------
aka: GMC; lildave2011
user posted image
peek-a-boo!
PMEmail PosterUsers WebsiteAOL
Top
United States
Pucifur
Posted: Aug 20 2006, 12:48 PM
Quote Post


Standard Member
[S][*][*][*][*]
[*][*][*][*][*]
[*][*][*][*][*]


Group Icon
Group: Site Staff
Posts: 6357
Member No.: 1035
Joined: 10-May 05

Status: (0d) [--]


if (place_meeting(x,y+1,obj_platform)
{
 hspeed = other.hspeed
}


You'll need to change the bold to whatever the moving object is called.

This post has been edited by Pucifur on Aug 20 2006, 12:50 PM


--------------------
- P - U - C - I - F - U - R -
got one
user posted image
PMEmail Poster
Top
Unspecified
Sir_Gamealot
  Posted: Aug 20 2006, 01:02 PM
Quote Post


Happy 30th Star Wars!
[*]

Group Icon
Group: Members
Posts: 319
Member No.: 2227
Joined: 22-June 06

Status: (0d) [--]


I'm really sorry but your's didn't work either(and yes I did add a second ")")...


--------------------
aka: GMC; lildave2011
user posted image
peek-a-boo!
PMEmail PosterUsers WebsiteAOL
Top
Unspecified
Captain Chicken Soup
Posted: Aug 20 2006, 01:10 PM
Quote Post


Hot Member
[*][*]

Group Icon
Group: Members
Posts: 4785
Member No.: 2245
Joined: 26-June 06

Status: (0d) [--]


hspeed/or vspeed=instance_nearest, this isnt the exact code, but its something like that
PMEmail PosterAOLMSN
Top
Unspecified
Sir_Gamealot
  Posted: Aug 20 2006, 01:15 PM
Quote Post


Happy 30th Star Wars!
[*]

Group Icon
Group: Members
Posts: 319
Member No.: 2227
Joined: 22-June 06

Status: (0d) [--]


QUOTE (gamemakerchampion @ Aug 20 2006, 01:31 PM)
Could you type the code?I don't know GML.


ackhem... sad.gif


--------------------
aka: GMC; lildave2011
user posted image
peek-a-boo!
PMEmail PosterUsers WebsiteAOL
Top
Unspecified
PunkR0ckz
Posted: Aug 20 2006, 01:33 PM
Quote Post


Standard Member


Group Icon
Group: Members
Posts: 45
Member No.: 2041
Joined: 26-April 06

Status: (0d) [--]


If you mean, make those vertical/horizontal platform moves (not the player!) just use paths or do the following:
make 1 sprite solid and unvisible wall, make 1 sprite of your v/h platform
now: when you create your v or h platform, make it moves in a direction (left, right, up down, left and up, left and down etc...) then in the collision event with the solid and unvisible wall you make it reverse its horizontal or vertical movement and thats it.
If you meant making the player moves, then use one of the code mentionned by Pucifur or MegaTailzChao (something like that, sorry if there is some mispelling biggrin.gif)
PMEmail Poster
Top
United States
Zero Kirby
Posted: Aug 20 2006, 04:32 PM
Quote Post


Well, your local psychic is off to visit your mother!
[*][*][*][*]

Group Icon
Group: Members
Posts: 6252
Member No.: 2501
Joined: 15-August 06

Status: (0d) [--]


Yeah, uhh... what he said, but simpler.

Just make two platform objects that move in a direction, then make an invisible block that when they collide, the platform reverses direction. Place two and voila, you have a moving platform.


--------------------
Falcon Punch is the result of the Sun heating fists. It drives the Blue Falcon. Heating causes destruction of water into the pain, where it then hurts, creating rain. Rain creates flowing water in tears, which can then be converted into other forms through more pain.

My Ref - Full Body Ref (minus the badass hat)

Visit Just Another Just Another Day - The Webcomic!

Super Mario Zero: Game Status (RAZZ Y U STEALING MAH FORMAT BRO)
Mario Object: Pretty much finished!
Enemy Objects: [||||||||--] Just gonna add Spinies, Bullet Bills and Cheep Cheeps!
Boss Fights: None in progress.
General Engine: [|||||||||-] Ranking System Complete! Gonna add pipes!
Levels Complete: [|---------] Haven't even finished the tutorial!
PMUsers WebsiteAOLMSN
Top
Unspecified
Sir_Gamealot
  Posted: Aug 20 2006, 04:48 PM
Quote Post


Happy 30th Star Wars!
[*]

Group Icon
Group: Members
Posts: 319
Member No.: 2227
Joined: 22-June 06

Status: (0d) [--]


Here's the working code for all my fellow n00bs
For the platform's step event:
If there's an object _charac_ at realtive postion 0,-8
<if hspeed is larger than 0
for object _charac_ jump to realtive postion 2(depends from platforms speed),0
if hspeed is smaller than 0
for object _charac_ jump to realtive postion -2(depends from platforms speed),0>

For player's collision with lift(solid):
move to contact postion: direction,12
vspeed = 0

yay! :-P


--------------------
aka: GMC; lildave2011
user posted image
peek-a-boo!
PMEmail PosterUsers WebsiteAOL
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

  Topic Options Topic Options Reply to this topicStart new topicStart Poll

 




[ Script Execution time: 0.0553 ]   [ 14 queries used ]   [ GZIP Enabled ]   [ Server Load: 0.52 ]