Powered by Invision Power Board

 
    Reply to this topicStart new topicStart Poll

> Moving platforms w/ static movement., Need help of course.
United States
Gr8Goomba88
Posted: Jan 27 2006, 06:33 PM
Quote Post


Gone and never coming back!


Group Icon
Group: Members
Posts: 197
Member No.: 788
Joined: 20-January 05

Status: (0d) [--]


Hey,
Could anybody tell me how to stay on a moving platform w/static movement? I know that there's a how-to for moving platforms, but you use it w/platform movement. I'm using TGF of course.
PMEmail PosterUsers Website
Top
Unspecified
Draco Icebane
Posted: Jan 27 2006, 06:42 PM
Quote Post


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


Group Icon
Group: Banned
Posts: 52997
Member No.: 10
Joined: 13-October 03

Status: (71582612m) [XX]


First off, you'll need three values for your character's left/right movement.

XBaseMov
XModMove
XTrueMov

The character's X position is offset every loop by XTrueMov, which is XBaseMov and XModMove added together.

When the character is on a platform or being blown around by the wind, simply set XModMove accordingly. (ie a platform heading right 2 pixels a second with no wind sets XModMove to 2)

XBaseMov is changed by holding left or right.

If this makes sense, you should be able to easily convert this to take moving platforms' Y movements into consideration as well.

EDIT: **** it let me explain that

When the character jumps, their Y offset is set to whatever their jumping power normally is, plus YModMove. YModMove is zero on flat ground and is modified by updrafts and platforms going up or down.

This post has been edited by Draco Icebane on Jan 27 2006, 06:43 PM
PM
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.0322 ]   [ 13 queries used ]   [ GZIP Enabled ]   [ Server Load: 0.84 ]