how to get this code to accept decimal inputs?
3 posts
• Page 1 of 1
how to get this code to accept decimal inputs?
Just upgraded to a titan two from titanone and I can't figure out how to get this code to work with decimal values, specifically in the 'data' section starting in line 128 without getting illegal array initialization error. Any ideas?
Last edited by metsu121 on Sat Feb 03, 2024 2:25 pm, edited 1 time in total.
-
metsu121 - Private First Class
- Posts: 2
- Joined: Mon Jan 29, 2024 8:41 pm
Re: how to get this code to accept decimal inputs?
You'd need to manually convert it to GPC2 (not use the titanone header)
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
- Mad
- Major General
- Posts: 4536
- Joined: Wed May 22, 2019 5:39 am
Re: how to get this code to accept decimal inputs?
Mad wrote:You'd need to manually convert it to GPC2 (not use the titanone header)
Took your advice and decided to just rewrite it seems good so far. My only issue I'm having now is getting the combo to change left and right values depending if I'm on player1 side or player2 side. For instance, my combo is set to run with L1. If I press DPAD RIGHT before running combo, I would like for left = left and right = right. However, if I press DPAD LEFT before running combo, I would like for left = right and right = left within the combo if that makes sense. Unfortunately I'm getting illegal operation '=' with this code, which I know has to do with my if statements. Any tips to go about this?
- Code: Select all
main {
if(get_val(BUTTON_13)){
BUTTON_12 = BUTTON_12; BUTTON_13 = BUTTON_13;
} else if(get_val(BUTTON_12)) {
BUTTON_12 = BUTTON_13; BUTTON_13 = BUTTON_12;
}
if(get_val(BUTTON_7)) {
combo_run(TB4);
} else if(TB4) {
combo_stop(TB4);
}
}
combo TB4 {
set_val(BUTTON_17, 100);
set_val(BUTTON_15, 100);
set_val(BUTTON_16, 100);
wait(100);
set_val(BUTTON_17, 0);
set_val(BUTTON_15, 0);
set_val(BUTTON_16, 0);
wait(370);
set_val(BUTTON_12, 100);
set_val(BUTTON_15, 100);
wait(100);
}
-
metsu121 - Private First Class
- Posts: 2
- Joined: Mon Jan 29, 2024 8:41 pm
3 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: Majestic-12 [Bot] and 126 guests