Ecceleration Problem ...?

Non-platform specific questions.

Re: Ecceleration Problem ... C'mon!

Postby Turon » Sat Jan 04, 2014 10:12 am

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? :|
Turon
 
Posts: 862
Joined: Sun Jan 24, 2010 5:23 pm
Score: 32 Give a positive score

Re: Ecceleration Problem ...?

Postby Turon » Sun Jan 05, 2014 6:14 pm

I'll take that as a yes......... So I'll probably have to simplifye the Gamplay of my game.
Turon
 
Posts: 862
Joined: Sun Jan 24, 2010 5:23 pm
Score: 32 Give a positive score

Re: Ecceleration Problem ...?

Postby lcl » Sun Jan 05, 2014 6:55 pm

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.
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Ecceleration Problem ...?

Postby Turon » Mon Jan 06, 2014 11:39 am

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?
Turon
 
Posts: 862
Joined: Sun Jan 24, 2010 5:23 pm
Score: 32 Give a positive score

Re: Ecceleration Problem ...?

Postby lcl » Mon Jan 06, 2014 12:31 pm

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. :)
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Ecceleration Problem ...?

Postby Turon » Mon Jan 06, 2014 7:05 pm

then how come he doesn't move if that's it?
Turon
 
Posts: 862
Joined: Sun Jan 24, 2010 5:23 pm
Score: 32 Give a positive score

Re: Ecceleration Problem ...?

Postby lcl » Mon Jan 06, 2014 8:26 pm

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.
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Ecceleration Problem ...?

Postby Turon » Mon Jan 06, 2014 9:17 pm

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?
Turon
 
Posts: 862
Joined: Sun Jan 24, 2010 5:23 pm
Score: 32 Give a positive score

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest