Convert this script
5 posts
• Page 1 of 1
Convert this script
Hi guys,
For some reason this script not working on titan one, but on CM yes.. please help me:
For some reason this script not working on titan one, but on CM yes.. please help me:
- Code: Select all
/* -- CTR --
Crash Team Racing
Nitro-Fueled
Alternate Controls
Double Tap Y/Triangle to Hold Accelerator
Press X/Square to Release
Hold A > TIME_HELD for Auto Boost
//---------------------------------------------------------------- */
define TIME_HELD = 1300;
define TIME_BETWEEN_BOOST = 810;
int hold_acc,d_tap;
main {
if(d_tap) d_tap -= get_rtime();
if(event_press(XB1_Y) && d_tap)
hold_acc = TRUE;
else if(event_press(XB1_Y) && !d_tap)
d_tap = 300;
if(event_press(XB1_X)) hold_acc = FALSE;
if(hold_acc) set_val(XB1_RT,100);
//-------------------------------------------==
if(get_val(XB1_A) && get_ptime(XB1_A) > TIME_HELD)
combo_run(BOOST);
}
combo BOOST {
set_val(XB1_LB,100);
wait(60);
wait(TIME_BETWEEN_BOOST);
}
-
danilos1992 - Sergeant First Class
- Posts: 18
- Joined: Sun Jun 10, 2018 11:02 pm
Re: Convert this script
The provided script does not compile with 1 error. After making some adjustments I got it to compile and hopefully work as intended for your game.
Here is my full gpc script adjustments,
I simply made it easier to read in my opinion. If you want only the change I made that ended up fixing it, changing
to
should also work.
Here is my full gpc script adjustments,
- Code: Select all
/* -- CTR --
Crash Team Racing
Nitro-Fueled
Alternate Controls
Double Tap Y/Triangle to Hold Accelerator
Press X/Square to Release
Hold A > TIME_HELD for Auto Boost
//---------------------------------------------------------------- */
define TIME_HELD = 1300;
define TIME_BETWEEN_BOOST = 810;
int hold_acc,d_tap;
main {
if(d_tap)
{
d_tap = d_tap - get_rtime();
}
if(event_press(XB1_Y) && d_tap)
{
hold_acc = TRUE;
}
else if(event_press(XB1_Y) && !d_tap)
{
d_tap = 300;
}
if(event_press(XB1_X))
{
hold_acc = FALSE;
}
if(hold_acc)
{
set_val(XB1_RT,100);
}
//-------------------------------------------==
if(get_val(XB1_A) && get_ptime(XB1_A) > TIME_HELD)
{
combo_run(BOOST);
}
}
combo BOOST {
set_val(XB1_LB,100);
wait(60);
wait(TIME_BETWEEN_BOOST);
}
I simply made it easier to read in my opinion. If you want only the change I made that ended up fixing it, changing
- Code: Select all
if(d_tap) d_tap -= get_rtime();
to
- Code: Select all
if(d_tap) d_tap = d_tap - get_rtime();
should also work.
-
shadowzach7 - Sergeant
- Posts: 9
- Joined: Sun Jun 23, 2019 12:07 am
Re: Convert this script
@shadowzach7 Many thanks, i should use your version, this work perfectly
-
danilos1992 - Sergeant First Class
- Posts: 18
- Joined: Sun Jun 10, 2018 11:02 pm
Re: Convert this script
No problem. Glad it works!
-
shadowzach7 - Sergeant
- Posts: 9
- Joined: Sun Jun 23, 2019 12:07 am
5 posts
• Page 1 of 1
Return to GPC1 Script Programming
Who is online
Users browsing this forum: No registered users and 68 guests