Power hath descended forth from Thy hand...

Posted by sk8m8trix on Oct. 20, 2006, 7:11 p.m.

hey i would seriously like some help with my game, a guy promised to make me an example in exchange for a sprite, never got the example, so i seriously need to get this bug fixed.

heres teh situation:

i am using wasd controls and w is to jump, so i make it so that when you hit a ground object you vspeed get set to 0 but i am using h speed to move and i need to not stick to walls when i hit them from the side. PLEASE HELP!!

Comments

NeutralReiddHotel 18 years, 2 months ago

 if (char_stuckonwall=true)
{
   unstuck(char);
}

sk8m8trix 18 years, 2 months ago

.. that dosent work

Polystyrene Man 18 years, 2 months ago

…he was joking. You haven't provided enough information.

sk8m8trix 18 years, 2 months ago

okay…. w is to jump (v speed -10) a is to go left (h speed -5) d is to go right (h speed 5) and when you hit a platform (v speed=0) so when i jump at a platform and hold the right or left button it will stay there untill i release it, so how do i fix that problem. if u still do not understand ill post a wip

Shork 18 years, 2 months ago

try putting a collision check line in there with an If statement, then a position check to determine if it's horizontal or vertical, then a move_to_outside or something. I did it in Cannon Man. One of the platformer examples already one the site is bound to better than Cannon Man though.

poultry 18 years, 2 months ago

Uh. I remember this code worked for me before..

Quote:

if (char_stuckonwall=true)

{

unstuck(char);

}

Shork 18 years, 2 months ago

That could work, if you defined functions for char_stuckonwall and unstuck(char). But if you define a function well enough you could use a make_game() function and not worry about getting stuck becuase the make_game() script would do everything for you.

sk8m8trix 18 years, 2 months ago

shork i dont really understand what your saying do you man d&d functions because theers 3 of them

sk8m8trix 18 years, 2 months ago

move_outside_all(dr,maxdist)

dose dr stand for direction?

twisterghost 18 years, 2 months ago

Have you tried the make_game() function yet?