how to convert this to work
3 posts
• Page 1 of 1
how to convert this to work
hi all i am using a script generator what is not made for titan two and it wont compile i will me making many scripts so would like to know what to change to get this to work thanks
- Code: Select all
/*************************************
FIFA 21 PENALTIES v 1.0
game :FIFA 21
Author : Excalibur
**************************************/
//////////////////////////////////////////////////////////////////
// YOUR BUTTON LAYOUT
define MOVE_X = PS4_LX;
define MOVE_Y = PS4_LY;
define SKILL_STICK_X = PS4_RX;
define SKILL_STICK_Y = PS4_RY;
//-----------------------------
// VARIABLES
int onoff_penalty;
int dir;
int LeftRight,UpDown;
//---------------------------
main {
//--------------------------------------------------------------
// turn ON Penalty hold L1 and press OPTIONS
if(get_val(PS4_L1)){
if(event_press(PS4_OPTIONS)){
onoff_penalty = !onoff_penalty;
}
set_val(PS4_OPTIONS,0);
}
if(onoff_penalty){ fPenalties (); }
}//end of main block
//-----------------------------------------------------------------------
//--------------------------------------------------------------
//===========================================================
// --- PENALTIES
function fPenalties () {
if(event_press(PS4_RIGHT) )LeftRight = 1;// Right
if(event_press(PS4_LEFT) ) LeftRight = 2;// Left
if(event_press(PS4_DOWN)) UpDown = 3;// Down
if(event_press(PS4_UP)) UpDown = 4;// Up
if(LeftRight && !UpDown){
if(LeftRight == 1) dir = 1; // Right
else dir = 2; // Left
if(dir == 1 ){
set_val(PS4_LX,87); // RIGHT
set_val(PS4_LY, 0);
}
if(dir == 2 ){
set_val(PS4_LX,-86); // LEFT
set_val(PS4_LY, 0);
}
}
else if(!LeftRight && UpDown){
if(UpDown == 3) dir = 3; // Down
else dir = 4; // Up
if(dir == 3 ){
set_val(PS4_LX, 0); // DOWN
set_val(PS4_LY,100);
}
if(dir == 4 ){
set_val(PS4_LX, 0); // UP
set_val(PS4_LY,-70);
}
}
else if(LeftRight && UpDown){
//---------------------------------------
dir = (LeftRight * UpDown) + 5 ;
// Right Down
if(dir == 8 ){
set_val(PS4_LX,56);
set_val(PS4_LY,90);
}
//Right Up
if(dir == 9 ){
set_val(PS4_LX, 78);
set_val(PS4_LY,-38);
}
// Left Up
if(dir == 13 ){
set_val(PS4_LX,-78);
set_val(PS4_LY,-38);
}
// Left Down
if(dir == 11 ){
set_val(PS4_LX,-56);
set_val(PS4_LY, 90);
}
}
set_val(13,0);
set_val(14,0);
set_val(15,0);
set_val(16,0);
//---- reset the aiming direction
if(event_press(XB1_RS)){
LeftRight = 0;
UpDown = 0;
dir = 0;
}
set_val(XB1_RS,0);
}
-
Jono7110 - Command Sergeant Major
- Posts: 164
- Joined: Sun Nov 08, 2015 12:09 pm
Re: how to convert this to work
I have found out thanks
-
jasp90 - Command Sergeant Major
- Posts: 125
- Joined: Wed Nov 26, 2014 4:06 pm
Re: how to convert this to work
Jono7110 wrote:hi all i am using a script generator what is not made for titan two and it wont compile i will me making many scripts so would like to know what to change to get this to work thanks
Put this line at the very top:
- Code: Select all
#include <titanone.gph>
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
- Mad
- Major General
- Posts: 4536
- Joined: Wed May 22, 2019 5:39 am
3 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: Google [Bot] and 103 guests