Page 2 of 2

Re: Ecceleration Problem ... C'mon!

PostPosted: Sat Jan 04, 2014 10:12 am
by Turon
So wat your trying to say is that you don't have any better idea on how to fix this problem than wat I have? :|

Re: Ecceleration Problem ...?

PostPosted: Sun Jan 05, 2014 6:14 pm
by Turon
I'll take that as a yes......... So I'll probably have to simplifye the Gamplay of my game.

Re: Ecceleration Problem ...?

PostPosted: Sun Jan 05, 2014 6:55 pm
by lcl
Turon wrote:I'll take that as a yes......... So I'll probably have to simplifye the Gamplay of my game.

I think it's more likely that people just haven't noticed your topic. I'm pretty sure your problem is fixable.
If no one else helps you before tomorrow, I will try to have a look at it. Today I can't because I'm busy with my own project.

Re: Ecceleration Problem ...?

PostPosted: Mon Jan 06, 2014 11:39 am
by Turon
lcl wrote:
Turon wrote:I'll take that as a yes......... So I'll probably have to simplifye the Gamplay of my game.

I think it's more likely that people just haven't noticed your topic. I'm pretty sure your problem is fixable.
If no one else helps you before tomorrow, I will try to have a look at it. Today I can't because I'm busy with my own project.


I thought so... I have also been made aware that Hblade suffers a similar problem with people ignoring his topics.

Turon wrote:
Turon wrote:i have removed the *x-=* thing but now he does not move

skydereign wrote:Right. You need to add a line of code in the actor's draw actor event that moves the player based off of the velocity variable.
player -> Draw Actor -> Script Editor
Code: Select all
x+=velocity;

Hmmm So I need to figure out a code based on *x+=velocity;*?
Here my try the movements are a little rough though.
Code: Select all
x+=velocity=2;

Skydereign said something about creating a code based on "x+=velocity;" as I take it the "x" and the "velocity" are important aspects of the code,
"x+2=velocity; don't work", "x+=2velocity; don't work and "x+=velocity=2; don't work. do I have to add to the code or rearrange it?

Re: Ecceleration Problem ...?

PostPosted: Mon Jan 06, 2014 12:31 pm
by lcl
Turon wrote:I thought so... I have also been made aware that Hblade suffers a similar problem with people ignoring his topics.

It's not about ignoring. There is just very little people active on the forum nowadays. And those who are, often just come to check the new posts,
and may not have time to answer anything. That's the case for me almost always when I'm here on my phone.

But about your problem..
What skydereign means, is that you should only have this in your player actor's draw actor code:
Code: Select all
x += velocity;

Nothing more. Then you just change the value of velocity in keydown events to make him accelerate faster / slower. :)

Re: Ecceleration Problem ...?

PostPosted: Mon Jan 06, 2014 7:05 pm
by Turon
then how come he doesn't move if that's it?

Re: Ecceleration Problem ...?

PostPosted: Mon Jan 06, 2014 8:26 pm
by lcl
Have you given velocity any value? Also, if the value given to it is a real number, the variable must also be real variable, not integer variable.
Otherwise any value smaller than 1 will be rounded down to 0.

Re: Ecceleration Problem ...?

PostPosted: Mon Jan 06, 2014 9:17 pm
by Turon
Here's my attempt, movements are very slippery
Key Down: Right > Script Editor
Code: Select all
velocity = min(velocity+0.5, 8);
ChangeAnimation("Event Actor", "MaxWalkRight", NO_CHANGE);
velocity+=2;

And wats a integer variable?