Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1075919 Posts in 44152 Topics- by 36120 Members - Latest Member: Royalhandstudios

December 29, 2014, 03:31:00 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)Problem With Following and Jumping - GML
Pages: [1]
Print
Author Topic: Problem With Following and Jumping - GML  (Read 638 times)
Doctor Universe
Level 0
**



View Profile Email
« on: August 05, 2009, 04:23:19 PM »

Fixed the problem.
« Last Edit: August 07, 2009, 06:08:56 PM by Doctor Universe » Logged
weasello
Level 1
*



View Profile WWW Email
« Reply #1 on: August 06, 2009, 10:16:03 AM »

I'm not sure just by looking at your code, but:

If you limit momentum it could cause the problem. Your "If gravity>10 gravity = 10" line could do that.

Also you might be applying gravity as a velocity, not as a constant force. That could be in the gravity=0.5 line.

Or it could just be that gravity=0.5 is too little.

Or it could be that the jumping velocity never stops from getting applied (so he is still "jumping up" but the gravity is a bit stronger, giving the float down).

I'd take your big variables (gravity, acceleration, speed) and output them to the screen for debugging, then you can watch them scroll by in real time and see where the problem is.
Logged

IndieElite4Eva
Doctor Universe
Level 0
**



View Profile Email
« Reply #2 on: August 06, 2009, 11:12:35 AM »

I think the problem lies with the line

{move_towards_point(obj_player.x,y,fspeed)}

...because it's when this is activated that the gravity messes up. Having tested the minion (placing a block next to it to see if it jumps correctly, gravity and all) the minion performs accurately. It's when I introduce the move_towards_point that it begins to fall apart. Currently, I don't know any other way to get one object to follow another, aside from mp_potential_step and this has just resulted in a floating block chasing me like a ghost. Similarly, mp_linear_step results in an exceptionally jittery minion, but with similar results to the above.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic