T
tomsonite
Guest
I tried typing in the approach function for my player object, only for it to be recognized as a variable and turn purple. I put this in my player object's step event under horizontal movement:
//Calculate Horizontal Movement
var dir = key_right - key_left;
hsp += dir * hsp_acc;
if (dir == 0)
{
var hsp_fric_final = hsp_fric_ground;
if (longround) hsp_fric_final = hsp_fric_air;
hsp = Approach(hsp,0,hsp_fric_final);
}
hsp = clamp(hsp,-hsp_walk,hsp_walk);
If anyone knows why it won't turn orange I'd appreciate it!
//Calculate Horizontal Movement
var dir = key_right - key_left;
hsp += dir * hsp_acc;
if (dir == 0)
{
var hsp_fric_final = hsp_fric_ground;
if (longround) hsp_fric_final = hsp_fric_air;
hsp = Approach(hsp,0,hsp_fric_final);
}
hsp = clamp(hsp,-hsp_walk,hsp_walk);
If anyone knows why it won't turn orange I'd appreciate it!
Attachments
-
91.9 KB Views: 53