Trouble with writing my script
3 posts
• Page 1 of 1
Trouble with writing my script
Hey i have been trying to make a script where if i hold the left analog stick down it rapidly goes from normal to down very quickly and i have had no luck any help?
-
Relinquished - Sergeant Major
- Posts: 100
- Joined: Thu May 21, 2015 4:19 pm
Re: Trouble with writing my script
- Code: Select all
#define S2Y_STARTVAL 5.0
#define S2Y_WAIT 1
#define S2Y_ADD 1.0
fix32 s2y;
main {
if (get_actual(STICK_2_Y) > S2Y_STARTVAL) {
set_val(STICK_2_Y,s2y);
combo_run(s1yDown);
} else {
s2y = 0.0;
}
}
combo s1yDown {
s2y+=S2Y_ADD;
if (s2y > 100.0) s2y = 0.0;
wait(0);
wait(S2Y_WAIT);
}
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Trouble with writing my script
- Code: Select all
#define S2Y_STARTVAL 5.0
main {
if (get_val(STICK_2_Y) > S2Y_STARTVAL) {
set_val(STICK_2_Y, sq(cos((fix32)system_time()/100f)) * 100f);
}
}
-
DontAtMe - Captain
- Posts: 502
- Joined: Tue Oct 02, 2018 4:49 am
3 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: No registered users and 166 guests