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

Amarin 18 years, 1 month ago

Why is he banned?

smaksak 18 years, 1 month ago

Rest in ban

Darktech 18 years, 1 month ago

RIB REST IN BAN

MMM RIBS

Polystyrene Man 18 years, 1 month ago

Quote:
Why is he banned?
Does it matter why?

Omega_Squid 18 years, 1 month ago

maybe

1337 18 years, 1 month ago

aha MASSIVE WARN!!!

1337 18 years, 1 month ago

hes not banned

noshenim 18 years, 1 month ago

hold your mouse over his badges.

noshenim 18 years, 1 month ago

I'll look at the way I did it.

create

hstep=0

step

var imagexscaleto,gun_xscaleto;
imagexscaleto=0;
gun_xscaleto=0;

move_higher(0)
if(keyboard_check(ord("W"))&&place_meeting(x,y+1,block)){move_higher(0);vspeed=-fps_based_speed(60,40);}
if(keyboard_check(ord("A"))&&place_free(x-8,y-11)){hstep-=fps_based_speed(60,0.1);image_xscaleto=-1;gun_xscaleto=-1}
if(keyboard_check(ord("D"))&&place_free(x+8,y-11)){hstep+=fps_based_speed(60,0.1);image_xscaleto=1;gun_xscaleto=1}
if(keyboard_check(ord("S")))vspeed=fps_based_speed(60,30);

if(!place_free(x,y+1))gravity=0;
else gravity=fps_based_speed(60,1)/((fps+(fps==0))/60);
if(vspeed>fps_based_speed(60,30))vspeed=fps_based_speed(60,30);

if not(keyboard_check(ord("A"))||keyboard_check(ord("D")))hstep=hstep*fps_based_speed(60,0.9);
if(abs(hstep)<fps_based_speed(60,0.1))hstep=0;

if(abs(hstep)>fps_based_speed(60,8))hstep=fps_based_speed(60,8)*sign(hstep)
if(place_free(x+hstep,y-11)){x+=hstep;move_higher(0);}

scripts

fps_based_speed is simply

return(argument1)

move_higher is

var n;
for(n=0;n<12;n+=1)
    {
    if(place_free(x+argument0,y-n))
        {
        y-=n
        break;
        }
    }

that should be it.

give credit untill you only have max 3 spelling/grammar errors in a blog that will stay on the front page. then no credit.

I hope you won't be able to implant it :D

Snakeman 18 years ago

finally, hes banned! :D