converting titan 1 to Titan 2 scripts
21 posts
• Page 2 of 3 • 1, 2, 3
Re: converting titan 1 to Titan 2 scripts
oaky seemed to figure out some converting (I know nothing bout coding) I am stuck here
GPC error: (71): syntax error, unexpected ASSIGN '='.
GPC error: (71): syntax error, unexpected ASSIGN '='.
- Code: Select all
// Set hair triggers
if (get_val(FIRE)) {set_val(FIRE, ON); }
if (get_val(ADS)) {set_val(ADS, ON); }
ar_fire = get_val(FIRE);
if (get_val(LEFT) && event_press(JUMP)) {
if (PrimaryFire == 4) {
PrimaryFire = 1;
set_pvar(SPVAR_1, PrimaryFire);
} else if (PrimaryFire == 1) {
PrimaryFire = 2;
set_pvar(SPVAR_1, PrimaryFire);
combo_run(RumbleNotifier);
} else if (PrimaryFire == 2) {
PrimaryFire = 3;
set_pvar(SPVAR_1, PrimaryFire);
combo_run(DoubleRumbleNotifier);
} else if (PrimaryFire == 3) {
PrimaryFire = 4;
set_pvar(SPVAR_1, PrimaryFire);
combo_run(TripleRumbleNotifier);
}
}
if (get_val(LEFT) && event_press(CROUCH)) {
if (SecondaryFire == 1) {
SecondaryFire = 2;
} else if (SecondaryFire == 2) {
SecondaryFire = 1;
}
set_pvar(SPVAR_2, SecondaryFire);
if (SecondaryFire == 1) {
combo_run(RumbleNotifier);
}
}
if (get_val(LEFT) && event_press(RELOAD)) {
if (AkimboOnOff == 1) {
AkimboOnOff = 2;
} else if (AkimboOnOff == 2) {
AkimboOnOff = 1;
}
set_pvar(SPVAR_5, AkimboOnOff);
if (AkimboOnOff == 1) {
combo_run(RumbleNotifier);
}
}
if(event_release(SWITCH)){
if(get_ptime(SWITCH) <= 300){
Primary = !Primary;
}
if(Primary){
set_pvar(SPVAR_1, PrimaryFire);
combo_run(RumbleNotifier);
set_pvar(SPVAR_2, SecondaryFire);
}
else{
set_pvar(SPVAR_2, SecondaryFire);
combo_run(DoubleRumbleNotifier);
}
}
if(PrimaryFire == 2 && get_val(FIRE) && Primary){
combo_run(RapidFire); combo_stop(AutoSprint);
}
if(PrimaryFire == 3 && get_val(FIRE) && Primary){
combo_run(BurstFire); combo_stop(AutoSprint);
}
if(PrimaryFire == 4 && get_val(FIRE) && Primary){
combo_run(L96AUTO_SOH); combo_stop(AutoSprint);
}
if(SecondaryFire == 1 && get_val(FIRE) && !Primary){
combo_run(RapidFire2); combo_stop(AutoSprint);
}
if(AkimboOnOff == 1 && get_val(FIRE) && !Primary){
combo_run(Akimbos); combo_stop(AutoSprint);
}
if (PrimaryFire == 2 && get_val(FIRE)) {
if (get_val(UP)) {RateOfFire = RateOfFire - 1; }
if (get_val(DOWN)) {RateOfFire = RateOfFire + 1; }
if (RateOfFire > 250) { RateOfFire = 250; }
if (RateOfFire < 25) { RateOfFire = 25; }
set_pvar(SPVAR_3, RateOfFire);
HoldTime = RateOfFire;
}
if (SecondaryFire == 1 && get_val(FIRE)) {
if (get_val(RIGHT)) {RateOfFire2 = RateOfFire2 - 1; }
if (get_val(LEFT)) {RateOfFire2 = RateOfFire2 + 1; }
if (RateOfFire2 > 250) { RateOfFire2 = 250; }
if (RateOfFire2 < 25) { RateOfFire2 = 25; }
set_pvar(SPVAR_4, RateOfFire2);
HoldTime2 = RateOfFire2;
}
if (PrimaryFire == 3 && get_val(ADS) && !get_val(FIRE)) {
if (get_val(UP)) {BurstOfFire = BurstOfFire - 1; }
if (get_val(DOWN)) {BurstOfFire = BurstOfFire + 1; }
if (BurstOfFire > 1000) { BurstOfFire = 1000; }
if (BurstOfFire < 10) { BurstOfFire = 10; }
set_pvar(SPVAR_12, BurstOfFire);
HoldBurst = BurstOfFire;
}
if (PrimaryFire == 3 && get_val(ADS) && !get_val(FIRE)) {
if (get_val(RIGHT)) {BurstOfFire2 = BurstOfFire2 - 1; }
if (get_val(LEFT)) {BurstOfFire2 = BurstOfFire2 + 1; }
if (BurstOfFire2 > 1000) { BurstOfFire2 = 1000; }
if (BurstOfFire2 < 10) { BurstOfFire2 = 10; }
set_pvar(SPVAR_13, BurstOfFire2);
ReleaseBurst = BurstOfFire2;
}
if (get_val(UP) && event_press(CROUCH)) {
if (SnakeGlitchOnOff == 2) {
SnakeGlitchOnOff = 1;
set_pvar(SPVAR_7, SnakeGlitchOnOff);
} else if (SnakeGlitchOnOff == 1) {
SnakeGlitchOnOff = 2;
set_pvar(SPVAR_7, SnakeGlitchOnOff);
combo_run(RumbleNotifier);
}
}
if (SnakeGlitchOnOff == 2) {
combo_run(Snaking); combo_stop(AutoSprint);
}
if (get_val(DOWN) && event_press(CROUCH)){
if (DropShotOnOff == 1) {
DropShotOnOff = 2;
} else if (DropShotOnOff == 2) {
DropShotOnOff = 1;
}
set_pvar(SPVAR_14, DropShotOnOff);
if (DropShotOnOff == 1) {
combo_run(RumbleNotifier);
}
}
if (DropShotOnOff == 1) {
if((!get_val(ADS) && event_press(FIRE)) || (event_release(ADS) && get_val(FIRE))) {
combo_run(DropShot);
combo_stop(AutoSprint);
}
}
if(get_val(LT)) {
combo_run(LT_C);
}
if(get_val(RT) && get_val(LT)) {
combo_stop(LT_C);
combo_run(RT_C);
}
if(get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value || get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value) {
combo_stop(LT_C);
combo_stop(RT_C);
}
}
combo LT_C {
set_val(RY, -23);
wait(delay)
set_val(RX, 23);
set_val(RY, 13);
wait(delay)
set_val(RY, 13);
wait(delay)
set_val(RX, -23);
set_val(RY, 13);
wait(delay)
}
combo RT_C {
set_val(RY, -35);
wait(delay)
set_val(RX, 35);
set_val(RY, 25);
wait(delay)
set_val(RY, 25);
wait(delay)
set_val(RX, -35);
set_val(RY, 25);
wait(delay)
}
combo RumbleNotifier {
set_rumble(RUMBLE_A, 100);
wait (300);
reset_rumble();
}
combo DoubleRumbleNotifier {
set_rumble(RUMBLE_A, 100);
wait (300);
set_rumble (RUMBLE_A, 0);
wait (300);
set_rumble(RUMBLE_A, 100);
wait (400);
reset_rumble();
}
combo TripleRumbleNotifier {
set_rumble(RUMBLE_A, 100);
wait (300);
set_rumble (RUMBLE_A, 0);
wait (300);
set_rumble(RUMBLE_A, 100);
wait (400);
set_rumble (RUMBLE_A, 0);
wait (300);
set_rumble(RUMBLE_A, 100);
wait (400);
reset_rumble();
}
combo RapidFire {
set_val (FIRE, ON);
wait (HoldTime);
set_val (FIRE, OFF);
wait (HoldTime);
}
combo RapidFire2 {
set_val (FIRE, ON);
wait (HoldTime2);
set_val (FIRE, OFF);
wait (HoldTime2);
}
combo BurstFire {
set_val (FIRE, ON);
wait (HoldBurst);
set_val (FIRE, OFF);
wait (ReleaseBurst);
}
combo Akimbos {
set_val (ADS, OFF);
wait (HoldTime2);
set_val (ADS, ON);
wait (HoldTime2);
}
combo AutoSprint {
set_val (SPRINT, ON);
wait (40);
set_val (SPRINT, OFF);
wait (40);
}
combo FastReload {
set_val (SPRINT, 0);
wait (ReloadTime);
set_val (SPRINT, 100);
}
combo L96AUTO_SOH {
set_val (FIRE, ON);
wait (100);
set_val (FIRE, ON);
set_val (RELOAD, ON);
wait (70);
set_val (FIRE, ON);
set_val (RELOAD, OFF);
wait (30);
wait (330);
set_val (SWITCH, ON);
wait (40);
wait (30);
set_val (SWITCH, ON);
wait (40);
}
combo Snaking {
set_val (CROUCH, 100);
wait (150);
set_val (CROUCH, 100);
set_val (JUMP, 100);
wait (100);
set_val (CROUCH, 100);
set_val (JUMP, 0);
wait (100);
set_val (CROUCH, 100);
set_val (JUMP, 100);
wait (100);
set_val (CROUCH, 0);
set_val (JUMP, 0);
wait (100);
}
combo DropShot {
set_val (CROUCH, ON);
wait (600);
set_val (CROUCH, OFF):
wait (360);
set_val (CROUCH, ON);
wait (30);
set_val (CROUCH, OFF);
wait (30);
set_val (CROUCH, ON);
wait (30);
set_val (CROUCH, OFF);
}
combo HoldBreath {
set_val (SPRINT, ON);
wait (10);
set_val (SPRINT, ON);
}
combo AntiRecoilADV {
if(ar_fire && get_val(FIRE)) {
ar_tmp = get_val(10) + ANTI_RECOIL_FORCE;
if(ar_tmp > 100) ar_tmp = 100;
else if(ar_tmp < -100) ar_tmp = -100;
set_val(10, ar_tmp);
}
}
-
maikolo66 - Staff Sergeant
- Posts: 11
- Joined: Thu Feb 09, 2017 10:00 pm
Re: converting titan 1 to Titan 2 scripts
That is not the full code, so we are not able to help you.
Maybe you have changed the
somewhere ?
The T1 syntax is
The T2 syntax is
Have you tried using the T1.gph header for converting your script ?
Maybe you have changed the
- Code: Select all
define
somewhere ?
The T1 syntax is
- Code: Select all
define MOV_Y_AXIS = PS4_LY;
The T2 syntax is
- Code: Select all
#define MOV_Y_AXIS PS4_LY
Have you tried using the T1.gph header for converting your script ?
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: converting titan 1 to Titan 2 scripts
Sorry bout that but here I think this will make it more simple
I like this T2 script here
would like to combine it with the snake glitch script from T1 here
and this other T1 script here
thats basically what im trying to convert and combine. Ill keep keep trying though
Oh and ya Im following the directions on how to do the T1.gph header but I keep getting unable to open error. Ill keep at it and try to figure out what im doing wrong. Appreciate it
I like this T2 script here
- Code: Select all
#pragma METAINFO("<Jacked>", 1, 0, "")
#include <xb1.gph>
#define SHOOT XB1_RT
#define ADS XB1_LT
#define RAPIDFIRE_SPEED 30 // Lower the value, faster the rapidfire
bool toggle = !FALSE;
main {
if((get_val(XB1_UP) && event_active(XB1_RT)) || (get_val(XB1_RT) && event_active(XB1_UP))) {
toggle = !toggle;
}
if(toggle && is_active(SHOOT)) {
combo_run(RapidFire);
} else if(RapidFire) {
combo_stop(RapidFire);
}
}
combo RapidFire {
set_val(SHOOT, 100.0);
wait(RAPIDFIRE_SPEED);
set_val(SHOOT, 0.0);
wait(RAPIDFIRE_SPEED);
}
would like to combine it with the snake glitch script from T1 here
- Code: Select all
// GPC Online Library
// black_ops_super_snake_glitch.gpc
// ADS TRIGGER + D-PAD LEFT TURNS IT ON/OFF.
// SNAKES IN ALL DIRECTIONS!
define ADS = 7;
define D_PAD_LEFT = 15;
define JUMP = 19;
define CROUCH = 18;
int snake;
init {
snake = get_pvar(SPVAR_1, 1, 2, 2);
}
main {
if (get_val(ADS) && event_press(D_PAD_LEFT)) {
if (snake == 1) {
snake = 2;
} else if (snake == 2) {
snake = 1;
}
set_pvar(SPVAR_1, snake);
if (snake == 1) {
combo_run(RumbleNotifier);
}
}
if (snake == 1) { combo_run(Snaking); }
}
combo RumbleNotifier {
set_rumble(RUMBLE_A, 100);
wait(200);
reset_rumble();
}
combo Snaking {
set_val (CROUCH, 100);
wait (150);
set_val (CROUCH, 100);
set_val (JUMP, 100);
wait (100);
set_val (CROUCH, 100);
set_val (JUMP, 0);
wait (100);
set_val (CROUCH, 100);
set_val (JUMP, 100);
wait (100);
set_val (CROUCH, 0);
set_val (JUMP, 0);
wait (100);
}
and this other T1 script here
- Code: Select all
//
//Posted :
define RT = XB1_RT;
define LT = XB1_LT;
define RX = XB1_RX;
define RY = XB1_RY;
int value = 33;
int value2 = -33;
int delay = 11;
main {
if(get_val(LT)) {
combo_run(LT_C);
}
if(get_val(RT) && get_val(LT)) {
combo_stop(LT_C);
combo_run(RT_C);
}
if(get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value || get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value) {
combo_stop(LT_C);
combo_stop(RT_C);
}
}
combo LT_C {
set_val(RY, -30);
wait(delay)
set_val(RX, 30);
set_val(RY, 20);
wait(delay)
set_val(RY, 20);
wait(delay)
set_val(RX, -30);
set_val(RY, 20);
wait(delay)
}
combo RT_C {
set_val(RY, -40);
wait(delay)
set_val(RX, 40);
set_val(RY, 30);
wait(delay)
set_val(RY, 30);
wait(delay)
set_val(RX, -40);
set_val(RY, 30);
wait(delay)
}
thats basically what im trying to convert and combine. Ill keep keep trying though
Oh and ya Im following the directions on how to do the T1.gph header but I keep getting unable to open error. Ill keep at it and try to figure out what im doing wrong. Appreciate it
Last edited by maikolo66 on Wed Feb 22, 2017 7:19 pm, edited 2 times in total.
-
maikolo66 - Staff Sergeant
- Posts: 11
- Joined: Thu Feb 09, 2017 10:00 pm
Re: converting titan 1 to Titan 2 scripts
I have created a small tutorial how to use the T1.gph file.
This information should work for your second T1 script mentioned here, too.
You just need to add an include:
and fix the combos line with the wait command to have an ; at the end of the line.
My tip is to convert each script one by one first.
If they compile then start merging them.
This information should work for your second T1 script mentioned here, too.
You just need to add an include:
- Code: Select all
#include <XB1.gph>
and fix the combos line with the wait command to have an ; at the end of the line.
My tip is to convert each script one by one first.
If they compile then start merging them.
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: converting titan 1 to Titan 2 scripts
Yup, that did it. great work and thanks for the help!
-
maikolo66 - Staff Sergeant
- Posts: 11
- Joined: Thu Feb 09, 2017 10:00 pm
Re: converting titan 1 to Titan 2 scripts
Hi dudes i am using the script below and i have problems with the toggling option i dont now why. When i phave my Primary weapon equiped and press d-pad up and PS4_R2 it dont toggle to rapidfire this happens with all toggling option the scipt converting says there are no erros. So what the hell i am doing wrong?
- Code: Select all
#pragma METAINFO("DESTINY - Hunter Fun Pack", 1, 0, "antithesis")
#include <PS4.gph>
#include <PS3.gph>
#include <xb1.gph>
#include <xb360.gph>
#include <T1.gph>
//==============================================================================
/* DESTINY - Hunter Fun Pack
//------------------------------------------------------------------------------
This is the most fully-featured script available for Destiny's Hunter class. Warlock and Titan scripts have been published separately.
Credits: Authored by antithesis for the Console Tuner forums - www.consoletuner.com/forum/
Thanks to The_Rabid_Taco for the Anti-Recoil and Toggle functions butchered for this script.
Thanks also to Bonefisher for answering all of my stupid questions.
Thanks most of all to J2Kbr for creating Titan One - you've made console gaming fun again!
Not to mention the various anonymous authors for random snippets refactored to work with
this script. You are gone Guardian, but not forgotten :salute:
Version: 1.9.3 - Increased PVAR range to use all of the 16-bit range for the persistent toggles to save & restore correctly
1.9.2 - Reversed Wombo Combo to toss Smoke before Grenade
This overrides default GRENADE functionality if the Wombo Combo is enabled by blocking the first GRENADE press to ensure MELEE triggers first
Hold rather than tap GRENADE to initiate Wombo Combo, or only the Smoke will toss
1.9.1 - Added toggle for Wombo Combo. Enable only for Nightstalkers
- Adjusted Wombo Combo timing to prevent Super from triggering. Super will still trigger correctly on GRENADE + MELEE press
- Added defines in DECLARATIONS for ShadeStep and Wombo Combo to tweak the time to trigger combos
1.9 - Shotgun auto-melee follow-up is now reliable. New define added for NoScopeWait in AUTO-MELEE section to allow customisation
- 500ms SPRINT block added to Auto-sprint to allow SHOOT to trigger while SPRINT is active. Shotgun rushing with auto-melee follow-up is now possible without a slide
- Version number changed to 1.9 to reflect parity with the Titan and Warlock Fun Packs to minimise end-user confusion
1.2 - Auto-sprint disabled for Sparrow
1.1.1 - Hotfix to add a small delay to Auto-melee after Shoot for Shotgun consistency
1.1 - Auto-melee when using a Special weapon now triggers automatically after every shot to make it easier to
melee after a Shotgun blast. Enable no-scope trick shot ONLY when using a Shotgun to use the auto-melee follow-up
- ADS or SHOOT disables the OPTIONS menu mod to prevent other mods from remaining disabled
Date: Wednesday October 5, 2016
Device: Titan One
System: PS4 and XB1
Controller: DualShock 4, XB1 controller, XB1 Elite, Scuf, Xim4 with m/kb or Nav/kb
Support: viewtopic.php?f=6&t=4836
//==============================================================================
// COPYRIGHT
2016 antithesis from http://www.consoletuner.com. This Script was made and intended for http://www.Consoletuner.com & Titan 0ne ONLY,
UNLESS written permission is given by the creator and/or copywritee.
All rights reserved. This material may not be reproduced, displayed, modified or distributed without the express prior written permission
of the copyright holder. For permission, contact antithesis via http://www.consoletuner.com/forum
//------------------------------------------------------------------------------
// FEATURES
Weapon Tracking: LED lights indicate Primary (green LED), Special (red LED) and Heavy (Yellow LED) weapons
Primary and Special weapons have separate rapid-fire, rapid-reload, quick-scope ADS, quick-scope SHOOT, and weapon-swap settings
Primary and Special have separate anti-recoil modes, for both HIP and ADS
Quickly reset Weapon Tracking for Primary, Special or Heavy if tracking comes unstuck
Rapid-Fire: Separate Primary and Special ON/OFF rapid-fire modes
Includes SHOOT hold and SHOOT rest times for Primary and Special in both HIP and ADS, allowing fine control over fire-rates
Works with all weapons, including Fusion Rifles and can improve the ADS fire-rate of Automatic Rifles in Focused Fire mode including Suros Regime
Anti-Recoil: Primary and Special left, right and vertical anti-recoil, with separate HIP and ADS modes
Anti-recoil supports Xim 4 and MaxAim, as well as controllers
Trick Shots: No-scope, quick-scope, weapon-swap no-scope and weapon-swap quick-scope
Primary and Special weapons feature separate SWAP, ADS and SHOOT speeds for flexible load-outs
Auto-Melee: Rapid-MELEE, and auto-MELEE after Special Weapon SHOOT, if moving forward or backwards
Hold MELEE to rapid-melee
Auto-Sprint: Get your SPRINT going without wearing out your thumb bones
Hold left stick forward to auto-sprint. Reload and Rapid-reload friendly
Tighter Turns: Increased sensitivity for faster turning while sprinting
Sniper Mode: Reduced sensitivity while ADS for improved accuracy and experimenting with Aim Assist lock-on
Shadestep: Auto-shadestep while wearing Graviton Foreit, or the Shadestep perk is enabled on a Nightstalker, with cooldown rumble
Hold CROUCH to Shadestep. Does not disrupt normal slide or CROUCH
Wombo Combo: Hold GRENADE to toss the Nightstalker Wombo Combo
Auto-Revive: Aim and SHOOT while reviving your fireteam
Press D-PAD DOWN to Revive
Rapid-Reload: Speed up RELOAD, or take advantage of the Final Round weapon perk by popping only one round in the chamber
Separate Primary and Special weapon RELOAD speeds. Auto-sprint friendly
Does not disrupt normal RELOAD while stationary, or if Auto-sprint is disabled
No Land Beyond: Triple the RELOAD speed and fire-rate, when NLB has reserve ammo
Rumble on cooldown between shots when NLB has no reserve amno
Jumper Layout: Swap to Jumper button layout for improved Jump and Shadestep control. It's what the pros use. Be a pro
Menu Friendly: Disables all combos when accessing Menus via OPTIONS button
Persistent Toggles: Customise your game by turning on only the stuff you want to use, with rumble feedback on activation
Set and forget with toggle ON/OFF states that are saved to Titan One, or change them on-the-fly
Make New Friends: Guardians everywhere will think you're a swell guy with high emotional IQ thanks to all the Dancing, Waving and Pointing you'll be doing
Make New Enemies: Opposing Guardians will try to rip you a new one for outplaying them with your mad uber-Hunter skillz
//------------------------------------------------------------------------------
// CONTROLLER TOGGLES
- Weapon Tracking Reset R3 (Default), or D-PAD LEFT (Jumper)
// Hold D-PAD UP, click button to the right
- Primary Rapid-fire D-PAD UP + PS4 R2 / XB1 RT, while holding Primary weapon (green LED)
- Special Rapid-fire D-PAD UP + PS4 R2 / XB1 RT, while holding Special weapon (red LED)
- Anti-recoil D-PAD UP + PS4 L2 / XB1 LT
- Rapid-reload D-PAD UP + PS4 SQUARE / XB1 X
- Shadestep D-PAD UP + PS4 CIRCLE / XB1 B
- Super mode D-PAD UP + PS4 CROSS / XB1 A
- Wombo Combo D-PAD UP + PS4 L1 / XB1 LB
- Auto-melee D-PAD UP + PS4 R1 / XB1 RB
- Auto-sprint D-PAD UP + PS4 L3 / XB1 LS
- Auto-revive D-PAD UP + PS4 R3 / XB1 RS
// Hold D-PAD RIGHT, click button to the right
- No Land Beyond D-PAD RIGHT + PS4 SQUARE / XB1 X
- No-scope D-PAD RIGHT + PS R2 / XB1 RT
- Quick-scope D-PAD RIGHT + PS4 L2 / XB1 LT
- Weapon-swap scope-shots D-PAD RIGHT + PS4 R1 / XB1 RB
- Jumper Layout D-PAD RIGHT + PS4 R3 / XB1 R3
//------------------------------------------------------------------------------
// INSTRUCTIONS
- All toggles are stored on the Titan One and are disabled by default
- Toggle everything you want turned on, they'll save automatically to the Titan One
- No-scope and Quick-scope trick shots integrate with Auto-melee. Enable both to
perform actions like MELEE after SHOOT
- Rapid-reload integrates with Auto-sprint. Enable both for Rapid-reload to function
- Once the initial setup is complete, the only toggles that will be used on a
regular basis are Primary & Special Rapid-fire, and maybe No Land Beyond,
Shadestep and Auto-revive, depending on your load-out and game mode
- Disable Anti-recoil and leave Rapid-fire Hold and Wait times at 50 if frequently changing load-outs mid-game
Disable weapon-swap scope-shots for competitive 3v3 PvP (changes double-ADS behaviour)
Enable auto-revive only for competitive 3v3 PvP
- R3 (or D-Pad Left on Jumper) will see regular use to reset errant weapon flags
There's a lot of conditional code to eliminate flag swaps, but they rely on presses
of CHANGE WEAPON and/or R3 / D-Pad Left rather than in-game tracking, so they can come unstuck
A quick R3 / D-pad Left press will get them back on-track
- Primary & Special weapons fire-rates, anti-recoil settings for HIP & ADS,
weapon swap time (important for ShotGuns), shoot hold times (important for Fusion Rifles),
ADS hold times (important for Snipers), reload times and auto-melee times
are customisable below in DECLARATIONS, as is auto-revive (time depends on gear) and Sniper Mode
- The script is documented throughout. Read the green notes in each section to understand
their function and use that information to experiment with your weapon load-outs
- Given the suite of customisation options, this script is targeted at those looking to fine-tune
their settings to match specific load-outs. Instead of constantly copying files across to the Titan One
and rebooting do the following -
1. Connect Titan One to PC and transfer this script to a spare slot
2. Enable all toggles you want turned on on a regular basis
NOTE - this is important to get persistent toggles to set correctly when using Build and Run
3. Connect Titan One to both PC and console
4. Load up GTuner Pro, go to the Compiler tab and open this file
5. Edit ONLY the red numbers values in DECLARATIONS to tweak the script to your load-out
6. Use the Build and Run option to test the settings in-game
7. Repeat steps 5 and 6 until everything feels right
- Comments (green text following "//") are unlimited in a GPC script, so make note of your
custom settings for future reference and punch them in when swapping load-outs. Create multiple copies
of this file tweaked to custom load-outs and swap between them using Titan One slots
*/
//==============================================================================
// DECLARATIONS
//------------------------------------------------------------------------------
// DEFAULT CONTROLLER LAYOUT
/* Default Layout should be fine for mouse & keyboard, Scuf or XB1 Elite controllers
- Do NOT rename any of the define aliases (e.g HOME, SHARE etc) or the script will break
All aliases work for all supported platforms
- Do NOT edit the red values below, unless you REALLY know what you're doing, for example
remapping ADS and SHOOT from L2 / R2 to L1 / R1
- Do NOT uncomment the defines for MELEE, FLAG_RESET, GRENADE, DPAD_LEFT and JUMP
They have been replaced with Variables, are managed via the Jumper Layout toggle
and are kept here for button mapping reference only
!!! NOTE: FLAG_RESET is R3 / RS in Default Layout
*/
define HOME = 0; // XB1_XBOX XB360_XBOX PS4_PS PS3_PS
define SHARE = 1; // XB1_VIEW XB360_BACK PS4_SHARE PS3_SELECT
define OPTIONS = 2; // XB1_MENU XB360_START PS4_OPTIONS PS3_START
// define MELEE = 3; // XB1_RB XB360_RB PS4_R1 PS3_R1
define SHOOT = 4; // XB1_RT XB360_RT PS4_R2 PS3_R2
// define FLAG_RESET = 5; // XB1_RS XB360_RS PS4_R3 PS3_R3
// define GRENADE = 6; // XB1_LB XB360_LB PS4_L1 PS3_L1
define ADS = 7; // XB1_LT XB360_LT PS4_L2 PS3_L2
define SPRINT = 8; // XB1_LS XB360_LS PS4_L3 PS3_L3
define RX_AXIS = 9; // XB1_RX XB360_RX PS4_RX PS3_RX
define RY_AXIS = 10; // XB1_RY XB360_RY PS4_RY PS3_RY
define LX_AXIS = 11; // XB1_LX XB360_LX PS4_LX PS3_LX
define LY_AXIS = 12; // XB1_LY XB360_LY PS4_LY PS3_LY
define DPAD_UP = 13; // XB1_UP XB360_UP PS4_UP PS3_UP
define DPAD_DOWN = 14; // XB1_DOWN XB360_DOWN PS4_DOWN PS3_DOWN
// define DPAD_LEFT = 15; // XB1_LEFT XB360_LEFT PS4_LEFT PS3_LEFT
define DPAD_RIGHT = 16; // XB1_RIGHT XB360_RIGHT PS4_RIGHT PS3_RIGHT
define WEAPON_SWAP = 17; // XB1_Y XB360_Y PS4_TRIANGLE PS3_TRIANGLE
define CROUCH = 18; // XB1_B XB360_B PS4_CIRCLE PS3_CIRCLE
// define JUMP = 19; // XB1_A XB360_A PS4_CROSS PS3_CROSS
define RELOAD = 20; // XB1_X XB360_X PS4_SQUARE PS3_SQUARE
//------------------------------------------------------------------------------
// JUMPER CONTROLLER LAYOUT
/* Jumper is the recommended button layout for Titan Skaters and competitive PvP
Hold D-PAD RIGHT and press PS4 CROSS / XB1 A to toggle between Default and Jumper
Several buttons differ in Destiny's Jumper button layout -
1. D-PAD LEFT (15) = FLAG_RESET
2. SUPER (19) = [] / X
3. MELEE (5) = R3 / RS
4. JUMP (6) = L1 / LB
5. GRENADE (3) = R1 / RB
6. HIGHLIGHT = L1 + R1
!!! NOTE: FLAG_RESET is D-Pad Left in Jumper Layout
*/
//------------------------------------------------------------------------------
// QUICK-SCOPE
define PriScope = 250; // ADS hold time for Primary weapon Quick-scope. e.g 250 for Uni Remote, 700 for No Land Beyond. Perks affect scope speed
define SecScope = 700; // ADS hold time for Special weapon Quick-scope. e.g 250 for primed Plan C or Shotguns, 700+ for Snipers. Perks affect scope speed
define PriShoot = 250; // SHOOT hold time for Primary weapon. e.g 250 for all Primaries
define SecShoot = 750; // SHOOT hold time for Special weapon. e.g 250 for Shotguns & Snipers, 350 for primed Plan C, 750 for non-primed Plan C & other Fusion Rifles
//------------------------------------------------------------------------------
// WEAPON SWAP NO-SCOPE / QUICK-SCOPE
define PriSwap = 300; // Primary weapon swap animation time. Perks affect swap speed
define SecSwap = 300; // Special weapon swap animation time. Perks affect swap speed
//------------------------------------------------------------------------------
// AUTO-MELEE
define NoScopeWait = 110; // Time to wait before MELEE while Shotgun rushing to force Destiny to SHOOT before MELEE
define ScopeWait = 350; // Time to wait before MELEE attack after Quick-scope SHOOT while moving backwards
//------------------------------------------------------------------------------
// SHADESTEP
define ShadeStepDelay = 120; // Time to hold CROUCH before Shadestep triggers. 120ms by default
define ShadeStepWait = 50; // Delay between CROUCH button presses
//------------------------------------------------------------------------------
// WOMBO COMBO
define WomboComboWait = 50; // Delay between MELEE and GRENADE button presses
//------------------------------------------------------------------------------
// RAPID-FIRE
/*
- Rounds per minute (RPM) for Destiny weapons can be found at https://docs.google.com/spreadsheets/d/ ... vASLduPPS4
- Divide RPM by 60 for rounds per second (RPS)
- Divide 1000 (ms) by RPS, for milliseconds per shot (MPS)
- Divide MPS by 2 to find the approximate SHOOT & WAIT times
e.g The Last Word = 225 RPM
225/60 = 3.75 RPS
1000/3.75 = 266 MPS
266/2 = 133 Hold / Rest times
- Adjust Hold & Rest times up & down, and/or tweak the balance of Hold & Rest until the weapon feels right
- For greater recoil control (in addition to Anti-recoil), use Hold and Rest values higher than MPS/2
- Set to 0 to disable Rapid-fire for any mode. For example, fire a Suros Regime in automatic for HIP, but semi-automatic for increased ADS Focused Fire fire-rate
*/
// Primary HIP, Primary ADS, Special HIP and Special ADS following are set to 10 rounds / sec by default (50 Hold +50 Rest = 100 ms)
define Pri_HIP_Hold = 0; // Primary weapon hold SHOOT time. Set to 0 to disable Rapid-Fire in HIP mode to allow Suros Regime to fire full-auto from the HIP
define Pri_HIP_Rest = 0; // Primary weapon release SHOOT time
define Pri_ADS_Hold = 150; // Primary weapon hold SHOOT time e.g 39 for Suros Regime in Focused Fire mode. Set to 133 for The Last Word
define Pri_ADS_Rest = 150; // Primary weapon release SHOOT time e.g 39 for Suros Regime in Focused Fire mode. Set to 30 for The Last Word
define Sec_HIP_Hold = 50; // Special weapon hold SHOOT time
define Sec_HIP_Rest = 50; // Special weapon release SHOOT time
define Sec_ADS_Hold = 50; // Special weapon hold SHOOT time
define Sec_ADS_Rest = 50; // Special weapon release SHOOT time
//------------------------------------------------------------------------------
// RAPID-RELOAD
/* - RELOAD will pause a SPRINT (if active), wait for the pre-defined RELOAD times below, then auto-SPRINT to cancel the RELOAD
- Standing still perform a normal RELOAD, but can be cancelled by pushing the left stick forward to Auto-sprint
- RELOAD wait times vary by weapon. Incorrect timing will prevent the RELOAD
- Reduce wait times to take advantage of the Final Round perk on Shotguns
*/
define PriReloadWait = 2200; // Time to wait for Primary weapon to reload. e.g 2500 for Shotguns, 2200 for Hand Cannons & 1750 for Pulse Rifles. Use fast reload gauntlets for maximum gain
define SecReloadWait = 2200; // Time to wait for Special weapon to reload. e.g 2500 for Shotguns, 1200 for SideArms & Snipers. Use fast reload gauntlets for maximum gain
//------------------------------------------------------------------------------
// AUTO-REVIVE
define ReviveTime = 4000; // Adjust if wearing Crest of Alpha Lupi or Light Beyond Nemesis
//------------------------------------------------------------------------------
// ANTI-RECOIL
/*
- Use values between 0 to 100 to adjust Left and Right X-axis (horizontal) anti-recoil. Use Left or Right, not both
- Use values between 0 to 100 to adjust Y-axis (vertical) anti-recoil
- Know your weapon recoil patterns before entering a match and don't change the load-out without editing these values
- Enter 0 for no anti-recoil or disable all anti-recoil via D-PAD UP + PS4 L2 / XB1 LT
- Xim4 requires values of 12 or higher for X & Y axes to be noticeable
*/
define Pri_Hip_L = 0; // Primary Hip X-axis Left. Range of 0 to 100. Min of 12 to get an AR effect for Xim4
define Pri_Hip_R = 0; // Primary Hip X-axis Right. Range of 0 to 100. Min of 12 to get an AR effect for Xim4
define Pri_Hip_V = 0; // Primary Hip Y-axis Vertical. Range of 0 to 100. Min of to get an AR effect 12 for Xim4
define Pri_ADS_L = 0; // Primary ADS X-axis Left. Range of 0 to 100. Min of 12 to get an AR effect for Xim4
define Pri_ADS_R = 0; // Primary ADS X-axis Right. Range of 0 to 100. Min of 12 to get an AR effect for Xim4
define Pri_ADS_V = 12; // Primary ADS Y-axis Vertical. Range of 0 to 100. Min of 12 to get an AR effect for Xim4
define Sec_Hip_L = 0; // Special Hip X-axis Left. Range of 0 to 100. Min of 12 to get an AR effect for Xim4
define Sec_Hip_R = 0; // Special Hip X-axis Right. Range of 0 to 100. Min of 12 to get an AR effect for Xim4
define Sec_Hip_V = 0; // Special Hip Y-axis. Range of 0 to 100. Min of 12 to get an AR effect for Xim4
define Sec_ADS_L = 0; // Special ADS X-axis Left. Range of 0 to 100. Min of 12 to get an AR effect for Xim4
define Sec_ADS_R = 0; // Special ADS X-axis Right. Range of 0 to 100. Min of 12 to get an AR effect for Xim4
define Sec_ADS_V = 80; // Special ADS Y-axis. Range of 0 to 100. Min of 12 to get an AR effect for Xim4
//------------------------------------------------------------------------------
// RUMBLE
define RumbleStrength = 60; // Change to 0 to disable rumble
//------------------------------------------------------------------------------
// TIGHTER TURNS
/* - Increases sensitivity for faster turns while Sprinting
- Helpful for Shotgunners and Xim 4 / MaxAim users
- TighterTurns values apply a multiplier to right stick X-axis sensitivity, e.g 200 = sensitivity x 2
- MidPoint determines where the effect applies. Use values above 50 for faster external range movement
NOTE: Tweak the SprintThreshold to determine where Tighter Turns kicks in on left stick movement
WA & WD keyboard diagonals register at 84% when both are pressed. Normal SPRINT look mechanics are used until only W is pressed
Change SprintThreshold to 85 to enable Tighter Turns for W key presses
WA & WD diagonals will use Tighter Turns unless A or D are pressed before W
*/
define SprintThreshold = 85; // 70 by default. Left stick position before SPRINT auto-enables
define TighterTurns = 120; // 200 by default. Range of 0 to 327. Increase to 250 for stupid fast turns. Set to 120 if wearing Fr0st-EE5 boots
define TT_MidPoint = NOT_USE; // 75 by default. Range of sensitivity (1-100). Set to NOT_USE to apply the effect to the full range of movement
//------------------------------------------------------------------------------
// SNIPER MODE
/* - Decreases right stick X-axis sensitivity for more accurate aim and experimentally, to enhance Aim Assist lock-on
- SniperMode values apply a multiplier to right stick X & Y sensitivity, e.g 90 = sensitivity x 0.9
- MidPoint determines where the effect applies. Use values below 50 to slow internal range movement
NOTE: When aiming down sights (ADS), hold SPRINT to enable Sniper Mode
More information on Titan One Sensitivity - http://www.consoletuner.com/kbase/i_o_f ... ensitivity
*/
define SteadyAim_X = 70; // 70 by default. Range of 0 to 327. Strength of sensitivity. Values under 100 reduce sensitivity. Values above 100 increase sensitivity. Set to 0 to disable
define SA_MidPoint_X = NOT_USE; // 60 by default. Range of 0 to 100. Set to NOT_USE to apply the effect to the full range of movement
define SteadyAim_Y = 70; // 70 by default. Range of 0 to 327. Strength of sensitivity. Values under 100 reduce sensitivity. Values above 100 increase sensitivity. Set to 0 to disable
define SA_MidPoint_Y = NOT_USE; // 60 by default. Range of 0 to 100. Set to NOT_USE to apply the effect to the full range of movement
//==============================================================================
// LOOK BUT DON'T TOUCH ANYTHING BELOW THIS LINE. YOU BREAK IT, YOU BOUGHT IT!
//==============================================================================
//------------------------------------------------------------------------------
// Persistent Vars
define PVAR_ToggleFlags = SPVAR_1;
//==============================================================================
// VARIABLES
// Store toggle states
int ToggleFlags;
//------------------------------------------------------------------------------
// Function & Combo Variables
int OptionsMenu = 1; // Disables combos for OPTIONS Menu navigation
int NavState;
int ReloadWait;
int MeleeWait;
int RightStick_X = 0;
int RightStick_Y = 0;
int HoldTime, RestTime;
int Timer;
int GunFlags;
int ScopeHold, ShootHold, ScopeSwap;
int FLAG_RESET, MELEE, JUMP, GRENADE, SUPER, DPAD_LEFT;
int SparrowToggle = 0;
int SparrowRide = 0;
//==============================================================================
// INITIALISATION
init
{
// Set initial Gun Flag state
combo_run(SetPrimary);
// Retrieve Toggle States
ToggleFlags = get_pvar(PVAR_ToggleFlags, -32768, 32767, 0);
}
//==============================================================================
// MAIN
main
{
// Repeat main loop every 4ms. Higher values add to T1 CPU load
vm_tctrl(-6);
//------------------------------------------------------------------------------
// BUTTON LAYOUT
// Swap to Jumper layout
if (test_bit(ToggleFlags, 13))
{ FLAG_RESET = 15; MELEE = 5; JUMP = 6; GRENADE = 3; SUPER = 19; }
else
{ DPAD_LEFT = 15; FLAG_RESET = 5; GRENADE = 6; MELEE = 3; JUMP = 19; }
//------------------------------------------------------------------------------
// HAIR TRIGGERS
// Shoot
if (get_val(SHOOT)) { set_val(SHOOT, 100); }
// ADS
if (get_val(ADS)) { set_val(ADS, 100); }
//------------------------------------------------------------------------------
// TOGGLES
// Hold D-PAD UP, click button to the right
/*
- Primary Rapid-fire D-PAD UP + PS4 R2 / XB1 RT, while holding Primary weapon (green LED)
- Special Rapid-fire D-PAD UP + PS4 R2 / XB1 RT, while holding Special weapon (red LED)
- Anti-recoil D-PAD UP + PS4 L2 / XB1 LT
- Rapid-reload D-PAD UP + PS4 SQUARE / XB1 X
- Shadestep D-PAD UP + PS4 CIRCLE / XB1 B
- Super mode D-PAD UP + PS4 CROSS / XB1 A
- Wombo Combo D-PAD UP + PS4 L1 / XB1 LB
- Auto-melee D-PAD UP + PS4 R1 / XB1 RB
- Auto-sprint D-PAD UP + PS4 L3 / XB1 LS
- Auto-revive D-PAD UP + PS4 R3 / XB1 RS
*/
if (get_val(DPAD_UP))
{
// Super Toggle (PS4 CROSS / XB1 A)
if (event_press (19)) { SetToggle (1); }
// Equip Primary weapon and check LED is green before toggling Primary rapid-fire (PS4 R2 / XB1 RT)
if(event_press(4) && test_bit (GunFlags, 1)) { SetToggle(2); }
// Equip Special weapon and check LED is red before toggling Special rapid-fire (PS4 R2 / XB1 RT)
if(event_press(4) && test_bit (GunFlags, 2)) {SetToggle (3); }
// Rapid Reload (PS4 SQUARE / XB1 X)
if(event_press(20)) { SetToggle (4); }
//Auto-revive (PS4 R3 / XB1 RS)
if(event_press (5)) { SetToggle (5); }
// Shadestep (PS4 CIRCLE / XB1 B)
if(event_press(18)) { SetToggle (6); }
// Auto-melee (PS4 R1 / XB1 RB)
if (event_press (3)) { SetToggle (7); }
// Auto-sprint (PS4 L3 / XB1 LS)
if(event_press (8)) { SetToggle (8); }
// Anti-recoil (PS4 L2 / XB1 LT)
if (event_press (7)) { SetToggle (9); }
// Anti-recoil (PS4 L2 / XB1 LB)
if (event_press (6)) { SetToggle (15); }
}
// Hold D-PAD RIGHT, click button to the right
/*
- No Land Beyond D-PAD RIGHT + PS4 SQUARE / XB1 X
- No-scope D-PAD RIGHT + PS R2 / XB1 RT
- Quick-scope D-PAD RIGHT + PS4 L2 / XB1 LT
- Weapon-swap scope-shots D-PAD RIGHT + PS4 R1 / XB1 RB
- Jumper Layout D-PAD RIGHT + PS4 R3 / XB1 R3
*/
if (get_val (DPAD_RIGHT))
{
// No Scope (PS R2 / XB1 RT)
if (event_press (4)) { SetToggle (10); }
// No Land Beyond (PS4 SQUARE / XB1 X)
if (event_press (20)) { SetToggle (11); }
// Quick Scope (PS4 L2 / XB1 LT)
if (event_press (7)) { SetToggle (12); }
// Jumper Button Layout (PS4 R3 / XB1 RS)
if (event_press (5)) { SetToggle (13); }
// Weapon swap no-scope (PS4 R1 / XB1 RB)
if (event_press (3)) { SetToggle (14); }
}
//------------------------------------------------------------------------------
// MENU NAVIGATION
/* - Using the in-game Menu via OPTIONS disables gun flags to prevent accidental flag swaps when changing load-outs
- It's still possible to spawn into a match with the wrong flag if using SWAP WEAPON in Citadel vendor or Invite Friends menus
- Pressing OPTIONS to Open Character then OPTIONS again to Return to Vendor disables the issue in the Citadel
*/
if (event_release (OPTIONS))
{ OptionsMenu = 0; NavState = 1; }
// Pressing CROUCH to exit Menu re-enables gun flags
if (event_release (CROUCH) || get_val (ADS) || get_val (SHOOT) && NavState)
{ OptionsMenu = 1; NavState = 0; }
if (OptionsMenu) { // start OptionsMenu
//------------------------------------------------------------------------------
// WEAPON TRACKING
// Changing weapons automatically updates the gun flags for Primary, Special and Heavy
// Manually reset flags via FLAG_RESET (Default R3, Jumper D-PAD LEFT)
// Swap to Primary from Special on Change Weapon tap or R3 / D-PAD LEFT click (sets a green LED)
if ( (test_bit (GunFlags, 2) || test_bit (GunFlags, 5)) && (event_press (WEAPON_SWAP) || event_press (FLAG_RESET)) )
{ combo_run (SetPrimary); }
//Swap to Special from Primary on change Weapon tap or R3 / D-PAD LEFT click (sets a red LED)
else if ( test_bit (GunFlags, 1) && (event_press (WEAPON_SWAP) || event_press (FLAG_RESET)) )
{ combo_run (SetSpecial); }
// Swap to Heavy from Primary or Special on Change Weapon or R3 / D-PAD LEFT hold (sets a yellow LED)
else if ( (test_bit (GunFlags, 1) || test_bit (GunFlags, 2)) && (event_release (WEAPON_SWAP) && get_ptime (WEAPON_SWAP) > 300) || (event_release (FLAG_RESET) && get_ptime (FLAG_RESET) > 300) )
{ combo_run (SetHeavy); }
// Swap to Primary from Heavy on Change Weapon tap or hold (sets a green LED)
else if ( test_bit (GunFlags, 3) && (event_release (WEAPON_SWAP) || event_release (FLAG_RESET)) )
{ combo_run (SetPrimary); }
// Reset Heavy to Primary while waiting for respawn (sets a green LED) if the left and right sticks are not moving
if (test_bit (GunFlags, 3) && !(get_val(RX_AXIS) || get_val (RY_AXIS) || get_val (LX_AXIS) || get_val (LY_AXIS)) && event_release (RELOAD) && get_ptime (RELOAD) < 200 )
{ combo_run (SetPrimary); }
//------------------------------------------------------------------------------
// SUPERS
// D-PAD UP + PS4 CROSS / XB1 A
if(test_bit (ToggleFlags, 1))
{
// Disable AutoMelee on Super activation to prevent disruption to Golden Gun
if ( get_val (GRENADE) && get_val (MELEE) )
{
if (test_bit (GunFlags, 2))
{
clear_bit (GunFlags, 2); set_bit (GunFlags, 5);
combo_stop (AutoMelee);
LED (0,0,0,1);
}
}
}
//------------------------------------------------------------------------------
// RAPID-FIRE, ANTI-RECOIL & SENSITIVITY
// Hip-fire Settings
if (!get_val (ADS))
{
// Primary HIP
if (test_bit(GunFlags, 1))
{
if (get_val (SHOOT))
{ if (test_bit (ToggleFlags, 2))
{ RapidFireSpeed (Pri_HIP_Hold, Pri_HIP_Rest); } // Rapid-fire
if (test_bit (ToggleFlags, 9))
{ AntiRecoil(Pri_Hip_L, Pri_Hip_R, Pri_Hip_V); } // Anti-recoil
}
}
// Special HIP
if (test_bit(GunFlags, 2) || test_bit (GunFlags, 5))
{
if (get_val (SHOOT))
{ if (test_bit (ToggleFlags, 3))
{ RapidFireSpeed (Sec_HIP_Hold, Sec_HIP_Rest); } // Rapid-fire
if (test_bit (ToggleFlags, 9))
{ AntiRecoil(Sec_Hip_L, Sec_Hip_R, Sec_Hip_V); } // Anti-recoil
}
}
// Tighter turns
if (get_val (SPRINT))
{
sensitivity (RX_AXIS, TT_MidPoint, TighterTurns);
}
}
// Aim Down Sights Settings
if (get_val(ADS))
{
// Primary ADS
if (test_bit(GunFlags, 1))
{
if (get_val (SHOOT))
{ if (test_bit (ToggleFlags, 2))
{ RapidFireSpeed (Pri_ADS_Hold, Pri_ADS_Rest); } // Rapid-fire
if (test_bit (ToggleFlags, 9))
{ AntiRecoil(Pri_ADS_L, Pri_ADS_R, Pri_ADS_V); } // Anti-recoil
}
}
// Special ADS
if (test_bit(GunFlags, 2) || test_bit (GunFlags, 5))
{
if (get_val (SHOOT))
{ if (test_bit (ToggleFlags, 3))
{ RapidFireSpeed (Sec_ADS_Hold, Sec_ADS_Rest); } // Rapid-fire
if (test_bit (ToggleFlags, 9))
{ AntiRecoil(Sec_ADS_L, Sec_ADS_R, Sec_ADS_V); } // Anti-recoil
}
}
// Sniper Mode
if (get_val (SPRINT))
{ set_val (SPRINT, 0); // prevents SPRINT from breaking ADS if moving forward while in Sniper Mode
sensitivity (RX_AXIS, SA_MidPoint_X, SteadyAim_X);
sensitivity (RY_AXIS, SA_MidPoint_Y, SteadyAim_Y); }
}
//------------------------------------------------------------------------------
// SHADESTEP
// Hold CROUCH to Shadestep. Requires Nightstalker class and Graviton Forfeit helmet or Shadestep perk
// Rumble timer for cooldown. Timing allows for normal tap CROUCH or Slide
if (get_val (CROUCH) && get_ptime (CROUCH) > ShadeStepDelay && test_bit(ToggleFlags, 6))
{ combo_run (ShadeStep); combo_run (ShadeCooldown); }
//------------------------------------------------------------------------------
// WOMBO COMBO
// Hold GRENADE to throw the Wombo Combo. Requires Nightstalker class. Holding GRENADE will not trigger Super
if ( event_press (GRENADE) && test_bit (ToggleFlags, 15))
{ combo_run (WomboCombo); }
//------------------------------------------------------------------------------
// AUTO-MELEE
// Hold MELEE to Auto-Melee. Also used for no-scope & quick-scope follow-up Melee attacks and auto-Shoulder Charge
if ( get_val(MELEE) && test_bit(ToggleFlags, 7))
{ combo_run(AutoMelee); }
//------------------------------------------------------------------------------
// AUTO-REVIVE
// Press D-Pad DOWN to Auto-revive
if (get_val (DPAD_DOWN) && test_bit(ToggleFlags, 5))
{ combo_run (AutoRevive); }
//------------------------------------------------------------------------------
// SPARROW MODE
// Prevents Auto-Sprint interference while riding a Sparrow
// Press JUMP or WEAPON SWAP if Auto-Sprint appears to be blocked while not riding a Sparrow
if (event_release (PS4_TOUCH) || event_release (XB1_VIEW)) { SparrowToggle = 1; }
if (SparrowToggle && event_release (RELOAD) && get_ptime (RELOAD) > 1000) { SparrowRide = 1; }
if (SparrowRide && event_press (RELOAD) || event_press (JUMP) || event_press (WEAPON_SWAP)) { SparrowToggle = 0; SparrowRide = 0; }
//------------------------------------------------------------------------------
// AUTO-SPRINT
// Hold left stick forward to SPRINT
// Rapid-reload must be enabled to automatically SPRINT after RELOAD
if( get_val(LY_AXIS) < -SprintThreshold && !(get_val(ADS) || get_val(MELEE) || get_val(JUMP) || get_val(SHOOT) || get_val (CROUCH) || SparrowRide) && test_bit (ToggleFlags, 8))
{ block (SPRINT, 500); set_val (SPRINT, 100); // Block allows for SHOOT to trigger while SPRINT is active. Needed for No-scope Auto-melee
}
//------------------------------------------------------------------------------
// RAPID RELOAD
// Rapid Reload reduces reload animation time with a SPRINT animation cancel
// Auto-sprint must be enabled for Rapid Reload to function
if (event_press (RELOAD) && test_bit(ToggleFlags, 4)) {combo_run (RapidReload); }
//------------------------------------------------------------------------------
// NO LAND BEYOND
// RELOAD animation cancel to shorten reload time and increase fire-rate. Requires No Land Beyond sniper rifle
// NLB fire-rate increase does not apply when no reserve ammo is available
// A timer rumbles two seconds after a shot to alert when NLB is ready to fire
// Apply NLB combo to Primary weapon (green LED)
if ( test_bit (GunFlags, 1) && test_bit(ToggleFlags, 11))
{ if (get_val (SHOOT) )
{ combo_run (NLBCooldown); combo_run(NLB); }
}
//------------------------------------------------------------------------------
// TRICK SHOTS
// NO-SCOPE MELEE - tap SHOOT
// Enable for Shotgunners, disable for Snipers
if (test_bit(ToggleFlags, 10) && test_bit(GunFlags, 2))
{
// MELEE after SHOOT
if ( event_press (SHOOT) && test_bit(ToggleFlags, 7))
{ MeleeWait = NoScopeWait; combo_run (AutoMelee); }
}
// QUICK-SCOPE - tap ADS
// Enable for Snipers, disable for Shotgunners
if (test_bit(ToggleFlags, 12) && test_bit(GunFlags, 2))
{
if ( event_release (ADS) && get_ptime (ADS) < 200)
{
// ADS quick-scope followed by auto-SHOOT and auto-MELEE if moving backwards (Shotgun counter)
if (get_val (LY_AXIS) > 70 )
{ combo_run (QuickScope);
if (test_bit(ToggleFlags, 7)) { MeleeWait = ScopeWait; combo_run (AutoMelee); }
}
// ADS quick-scope only, for strafing in and out of cover
else { combo_run (QuickScope); }
}
}
// WEAPON SWAP NO-SCOPE - double-tap ADS to swap weapons and auto no-scope. Disable for competitive 3v3 PvP
// WEAPON SWAP QUICK-SCOPE - hold ADS, tap RELOAD. Keep holding ADS to swap weapons and auto quick-scope
if (test_bit(ToggleFlags, 14))
{
if (Timer > 0) { Timer = Timer - get_rtime(); }
if (event_release(ADS)) { Timer = 200; } // 200ms to detect double-ADS tap
if ((event_press(ADS) && Timer > 0) || (get_val (ADS) && event_press (RELOAD)))
{
Timer = 0;
if (test_bit(GunFlags, 1)) { combo_run (SetSpecial); }
else if (test_bit(GunFlags, 2) || test_bit (GunFlags, 3)) { combo_run (SetPrimary); }
set_val (ADS, 0); combo_run (SwapQuickScope);
}
}
//------------------------------------------------------------------------------
} // end OptionsMenu
//------------------------------------------------------------------------------
} // end main
//==============================================================================
// COMBOS
combo SetPrimary
{
clear_bit(GunFlags, 2);
clear_bit(GunFlags, 3);
clear_bit (GunFlags, 5);
set_bit(GunFlags, 1); // Sets gun flag to Primary
LED(0, 0, 1, 0); // Green
ScopeHold = PriScope; // Quick-scope ADS
ShootHold = PriShoot; // Quick-scope SHOOT
ScopeSwap = PriSwap; // Weapon-swap quick-scope
ReloadWait = PriReloadWait; // Reload wait
}
combo SetSpecial
{
clear_bit(GunFlags, 1);
clear_bit (GunFlags, 5);
set_bit(GunFlags, 2); // Sets gun flag to Special
LED(0, 1, 0, 0); // Red
ScopeHold = SecScope; // Quick-scope ADS
ShootHold = SecShoot; // Quick-scope SHOOT
ScopeSwap = PriSwap; // Weapon-swap quick-scope
ReloadWait = SecReloadWait; // Reload wait
}
combo SetHeavy
{
clear_bit(GunFlags, 1);
clear_bit(GunFlags, 2);
clear_bit (GunFlags, 5);
set_bit(GunFlags, 3); // Sets gun flag to Heavy
LED(0, 1, 1, 0); // Yellow
}
combo ShadeStep
{
set_val (CROUCH, 0); // Clears first CROUCH
wait(ShadeStepWait);
set_val(CROUCH, 100); // second CROUCH for ShadeStep
wait(ShadeStepWait);
set_val (CROUCH,0);
}
combo ShadeCooldown
{
wait (3200); // Cooldown timer for Shadestep
combo_run (Rumble);
}
combo WomboCombo
{
set_val (GRENADE, 0);
set_val (MELEE, 100); // Toss SMOKE
wait (WomboComboWait);
set_val (MELEE, 0);
set_val (GRENADE, 100); // Toss GRENADE
wait (WomboComboWait);
set_val (GRENADE, 0); // Clearing GRENADE before MELEE prevents Super from triggering
}
combo NLBCooldown
{
wait (2200); // Cooldown timer for NLB when out of reserve ammo
combo_run (Rumble);
}
combo AutoMelee
{
wait(MeleeWait); // wait times before MELEE are different for moving forward or backpeddling
set_val(MELEE, 100);
wait(50); // wait time set to ensure MELEE after SHOOT
set_val(MELEE, 0);
wait(50);
set_val(MELEE, 0);
}
combo AutoRevive
{
set_val (DPAD_DOWN, 0);
set_val(RELOAD, 100);
wait(ReviveTime); // Adjust in DEFINES if wearing fast revive gear
set_val(RELOAD, 0);
}
combo QuickScope
{
set_val(ADS, 100);
wait(ScopeHold); // Adjust in DEFINES. Separate settings for Primary and Special
set_val(SHOOT, 100);
wait(ShootHold); // Adjust in DEFINES. Separate settings for Primary and Special
set_val(ADS, 0);
set_val(SHOOT, 0);
}
combo SwapQuickScope
{
set_val (WEAPON_SWAP, 100);
wait (100);
wait (ScopeSwap); // Adjust in DEFINES. Separate settings for Primary and Special
combo_run (QuickScope);
}
combo Rumble
{
set_rumble (RUMBLE_A, RumbleStrength);
wait(300);
reset_rumble();
}
combo RapidFire
{
set_val(SHOOT, 100);
wait(HoldTime);
set_val(SHOOT, 0);
wait(RestTime);
set_val(SHOOT, 0);
}
combo RapidReload
{
set_val (SPRINT, 0);
wait (ReloadWait); // Adjust in DEFINES. Separate settings for Primary and Special
wait (50);
set_val (SPRINT, 100);
}
combo SprintLoop // SprintLoop prevents random NLB reloads
{
set_val(LY_AXIS, -100);
wait(20);
set_val(SPRINT, 100);
}
combo NLB
{
set_val(SHOOT, 100);
wait(50);
set_val(SHOOT, 100);
set_val(RELOAD, 100);
wait(50);
set_val(SHOOT, 0);
set_val(RELOAD, 100);
wait(50);
set_val(RELOAD, 0);
wait(50); // IMPORTANT! 50 by default
set_val(LY_AXIS, -100);// |
wait(20); // |- do not delete this block
set_val(SPRINT, 100);// |
combo_run (SprintLoop);
wait (160); // IMPORTANT! 200 by default, 160 with SnapShot perk
combo_stop (SprintLoop);
}
//==============================================================================
// FUNCTIONS
//------------------------------------------------------------------------------
// RAPID-FIRE
function RapidFireSpeed (int RF_HoldTime, int RF_RestTime)
{
HoldTime = RF_HoldTime; RestTime = RF_RestTime;
if (HoldTime > 0)
{ combo_run(RapidFire); }
}
//------------------------------------------------------------------------------
// ANTI-RECOIL
function AntiRecoil(int AntiRecoil_L, int AntiRecoil_R, int AntiRecoil_V)
{
// Horizontal anti-recoil parameters
if (get_val(SHOOT) && isqrt(pow(get_val(RX_AXIS), 2) + pow(get_val(RY_AXIS), 2)) <= 25)
{
if(abs(RX_AXIS) <= 25)
{
// Compensate to the RIGHT
RightStick_X = (get_val(RX_AXIS) + AntiRecoil_R);
if (RightStick_X > 100) {RightStick_X = 100;}
set_val(RX_AXIS, RightStick_X);
set_val (TRACE_1, AntiRecoil_R); // debugging
set_val (TRACE_2, RightStick_X); // debugging
// Compensate to the LEFT
RightStick_X = (get_val(RX_AXIS) - AntiRecoil_L);
if (RightStick_X < -100) {RightStick_X = -100;}
set_val(RX_AXIS, RightStick_X);
set_val (TRACE_3, AntiRecoil_L); // debugging
set_val (TRACE_4, RightStick_X); // debugging
// Vertical anti-recoil parameters
RightStick_Y = (get_val(RY_AXIS) + AntiRecoil_V);
if (RightStick_Y > 100) {RightStick_Y = 100;}
else if (RightStick_Y < -100) {RightStick_Y = -100;}
set_val(RY_AXIS, RightStick_Y);
set_val (TRACE_5, AntiRecoil_V); // debugging
set_val (TRACE_6, RightStick_Y); // debugging
}
}
}
//------------------------------------------------------------------------------
// SET TOGGLES
function SetToggle(int FlagLocation) {
if(test_bit(ToggleFlags, FlagLocation)) {
clear_bit(ToggleFlags, FlagLocation);
}
else {
set_bit(ToggleFlags, FlagLocation);
if (RumbleStrength > 0) { combo_run(Rumble); }
}
set_pvar(PVAR_ToggleFlags, ToggleFlags);
}
//------------------------------------------------------------------------------
// LED LIGHTS
function LED(int a, int b, int c, int d) // Make the lights pretty
{
set_led(0, a);
set_led(1, b);
set_led(2, c);
set_led(3, d);
}
//------------------------------------------------------------------------------
// LED DEFINITIONS FOR PS4 LIGHT BAR
// LED(0,0,0,0); // Off
// LED(1,0,0,0); // Blue
// LED(0,1,0,0); // Red
// LED(0,0,1,0); // Green
// LED(0,0,0,1); // Pink
// LED(1,0,1,0); // SkyBlue
// LED(0,1,1,0); // Yellow
// LED(1,1,1,1); // White
-
Stephan - First Sergeant
- Posts: 42
- Joined: Tue Dec 22, 2015 2:22 am
Re: converting titan 1 to Titan 2 scripts
In the function SetToggle(int FlagLocation)
change:
to:
change:
- Code: Select all
set_bit(ToggleFlags, FlagLocation);
to:
- Code: Select all
set_bit(&ToggleFlags, FlagLocation);
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: converting titan 1 to Titan 2 scripts
How do i Turn this Titon 2 script into a Titon one?
#pragma METAINFO("111", 1, 0, "bonefisher")
#pragma METAINFO("111", 1, 0, "bonefisher")
- Code: Select all
#include <display.gph>
#define shot_per_second 12 // adjust fire rate
#define burst 3 // adjust tap burst
bool toggle_rapid;
bool toggle_abuse;
bool toggle_assist;
uint32 tap_fire;
uint32 hold_time;
uint32 rest_time;
uint32 time_counter;
uint32 IND[] = {
_0_, // 0
_1_ // 1
};
init
{
hold_time = 500 / shot_per_second;
rest_time = hold_time;
if(rest_time < 0) rest_time = 0;
tap_fire = burst * 1000 / shot_per_second;
}
main
{
// toggles will show 0 on titan for off and 1 for on.
// left trigger + left d-pad (rapid fire on/off)
if(get_actual(BUTTON_8)) {
set_val(BUTTON_12, 0.0);
if(event_active(BUTTON_12)) {
if(toggle_rapid == 0) {
toggle_rapid = 1;
display (1);
}else if(toggle_rapid == 1) {
toggle_rapid = 0;
display (0);
}
}
}
// left trigger + up d-pad (aim abuse on/off)
if(get_actual(BUTTON_8)) {
set_val(BUTTON_10, 0.0);
if(event_active(BUTTON_10)) {
if(toggle_abuse == 0) {
toggle_abuse = 1;
display (1);
}else if(toggle_abuse == 1) {
toggle_abuse = 0;
display (0);
}
}
}
// left trigger + down d-pad (aim assist on/off)
if(get_actual(BUTTON_8)) {
set_val(BUTTON_11, 0.0);
if(event_active(BUTTON_11)) {
if(toggle_assist == 0) {
toggle_assist = 1;
display (1);
}else if(toggle_assist == 1) {
toggle_assist = 0;
display (0);
}
}
}
if(toggle_rapid == 0) {
if(get_actual(BUTTON_5)) {
set_val(BUTTON_5, 100.0);
}else if(is_release(BUTTON_5) &&
time_active(BUTTON_5) <= tap_fire) {
set_val(BUTTON_5, 100.0);
}
}
if(toggle_rapid == 1) {
if(get_actual(BUTTON_5)) {
combo_run(rapid_fire);
}else if(is_release(BUTTON_5) &&
time_active(BUTTON_5) <= tap_fire) {
combo_run(rapid_fire);
}
}
if(toggle_abuse == 1) {
if(get_actual(BUTTON_8)) {
time_counter += elapsed_time();
if(time_counter >= 540) {
time_counter = 0;
combo_run(aim_abuse);
}
}
}
if(toggle_assist == 1) {
if(get_actual(BUTTON_8) && !get_actual(BUTTON_5)) {
combo_run(ads_assist);
combo_run(strafe);
}else if(get_actual(BUTTON_8) && get_actual(BUTTON_5)) {
combo_run(fire_assist);
combo_run(strafe);
}
}
}
combo rapid_fire
{
set_val(BUTTON_5, 100.0);
wait(hold_time);
set_val(BUTTON_5, 0.0);
wait(rest_time);
set_val(BUTTON_5, 0.0);
}
combo aim_abuse {
set_val(BUTTON_8, 0.0);
wait(30);
}
combo strafe
{
aim_assist(STICK_2_X, 30.0);
wait(16);
aim_assist(STICK_2_X, -30.0);
wait(17);
}
combo ads_assist
{
aim_assist(STICK_1_Y, 30.0);
wait(16);
aim_assist(STICK_1_X, -30.0);
wait(17);
aim_assist(STICK_1_Y, -30.0);
wait(16);
aim_assist(STICK_1_X, 30.0);
wait(17);
}
combo fire_assist
{
aim_assist(STICK_1_Y, 35.0);
wait(16);
aim_assist(STICK_1_X, -35.0);
wait(17);
aim_assist(STICK_1_Y, -35.0);
wait(16);
aim_assist(STICK_1_X, 35.0);
wait(17);
}
void aim_assist(uint8 axis, fix32 recoil)
{
set_val(axis, (recoil * (100.0 - abs(get_val(axis)))) / 100.0 + get_actual(axis));
}
// Display Numbers
void display (uint8 indc)
{
uint8 VIE;
VIE = IND[indc];
display_overlay(VIE, 2000 );
}
-
AutomaticSig - Sergeant First Class
- Posts: 20
- Joined: Wed May 16, 2018 9:39 pm
Re: converting titan 1 to Titan 2 scripts
AutomaticSig wrote:How do i Turn this Titon 2 script into a Titon one?
#pragma METAINFO("111", 1, 0, "bonefisher")
- Code: Select all
#include <display.gph>
#define shot_per_second 12 // adjust fire rate
#define burst 3 // adjust tap burst
bool toggle_rapid;
bool toggle_abuse;
bool toggle_assist;
uint32 tap_fire;
uint32 hold_time;
uint32 rest_time;
uint32 time_counter;
uint32 IND[] = {
_0_, // 0
_1_ // 1
};
init
{
hold_time = 500 / shot_per_second;
rest_time = hold_time;
if(rest_time < 0) rest_time = 0;
tap_fire = burst * 1000 / shot_per_second;
}
main
{
// toggles will show 0 on titan for off and 1 for on.
// left trigger + left d-pad (rapid fire on/off)
if(get_actual(BUTTON_8)) {
set_val(BUTTON_12, 0.0);
if(event_active(BUTTON_12)) {
if(toggle_rapid == 0) {
toggle_rapid = 1;
display (1);
}else if(toggle_rapid == 1) {
toggle_rapid = 0;
display (0);
}
}
}
// left trigger + up d-pad (aim abuse on/off)
if(get_actual(BUTTON_8)) {
set_val(BUTTON_10, 0.0);
if(event_active(BUTTON_10)) {
if(toggle_abuse == 0) {
toggle_abuse = 1;
display (1);
}else if(toggle_abuse == 1) {
toggle_abuse = 0;
display (0);
}
}
}
// left trigger + down d-pad (aim assist on/off)
if(get_actual(BUTTON_8)) {
set_val(BUTTON_11, 0.0);
if(event_active(BUTTON_11)) {
if(toggle_assist == 0) {
toggle_assist = 1;
display (1);
}else if(toggle_assist == 1) {
toggle_assist = 0;
display (0);
}
}
}
if(toggle_rapid == 0) {
if(get_actual(BUTTON_5)) {
set_val(BUTTON_5, 100.0);
}else if(is_release(BUTTON_5) &&
time_active(BUTTON_5) <= tap_fire) {
set_val(BUTTON_5, 100.0);
}
}
if(toggle_rapid == 1) {
if(get_actual(BUTTON_5)) {
combo_run(rapid_fire);
}else if(is_release(BUTTON_5) &&
time_active(BUTTON_5) <= tap_fire) {
combo_run(rapid_fire);
}
}
if(toggle_abuse == 1) {
if(get_actual(BUTTON_8)) {
time_counter += elapsed_time();
if(time_counter >= 540) {
time_counter = 0;
combo_run(aim_abuse);
}
}
}
if(toggle_assist == 1) {
if(get_actual(BUTTON_8) && !get_actual(BUTTON_5)) {
combo_run(ads_assist);
combo_run(strafe);
}else if(get_actual(BUTTON_8) && get_actual(BUTTON_5)) {
combo_run(fire_assist);
combo_run(strafe);
}
}
}
combo rapid_fire
{
set_val(BUTTON_5, 100.0);
wait(hold_time);
set_val(BUTTON_5, 0.0);
wait(rest_time);
set_val(BUTTON_5, 0.0);
}
combo aim_abuse {
set_val(BUTTON_8, 0.0);
wait(30);
}
combo strafe
{
aim_assist(STICK_2_X, 30.0);
wait(16);
aim_assist(STICK_2_X, -30.0);
wait(17);
}
combo ads_assist
{
aim_assist(STICK_1_Y, 30.0);
wait(16);
aim_assist(STICK_1_X, -30.0);
wait(17);
aim_assist(STICK_1_Y, -30.0);
wait(16);
aim_assist(STICK_1_X, 30.0);
wait(17);
}
combo fire_assist
{
aim_assist(STICK_1_Y, 35.0);
wait(16);
aim_assist(STICK_1_X, -35.0);
wait(17);
aim_assist(STICK_1_Y, -35.0);
wait(16);
aim_assist(STICK_1_X, 35.0);
wait(17);
}
void aim_assist(uint8 axis, fix32 recoil)
{
set_val(axis, (recoil * (100.0 - abs(get_val(axis)))) / 100.0 + get_actual(axis));
}
// Display Numbers
void display (uint8 indc)
{
uint8 VIE;
VIE = IND[indc];
display_overlay(VIE, 2000 );
}
try this,
- Code: Select all
define BUTTON_5 = XB1_RT;
define BUTTON_8 = XB1_LT;
define BUTTON_10 = XB1_UP;
define BUTTON_11 = XB1_DOWN;
define BUTTON_12 = XB1_LEFT;
define STICK_1_X = XB1_RX;
define STICK_1_Y = XB1_RY;
define STICK_2_X = XB1_LX;
define STICK_2_Y = XB1_LY;
// adjust fire rate
define shot_per_second = 12; // adjust fire rate
define burst = 3; // adjust tap burst
int toggle_rapid;
int toggle_abuse;
int toggle_assist;
int tap_fire;
int hold_time;
int rest_time;
int time_counter;
init
{
hold_time = 500 / shot_per_second;
rest_time = hold_time;
if(rest_time < 0) rest_time = 0;
tap_fire = burst * 1000 / shot_per_second;
}
main
{
// toggles will show 0 on titan for off and 1 for on.
// left trigger + left d-pad (rapid fire on/off)
if(get_val(BUTTON_8)) {
set_val(BUTTON_12, 0);
if(event_press(BUTTON_12)) {
if(toggle_rapid == 0) {
toggle_rapid = 1;
}else if(toggle_rapid == 1) {
toggle_rapid = 0;
}
}
}
// left trigger + up d-pad (aim abuse on/off)
if(get_val(BUTTON_8)) {
set_val(BUTTON_10, 0);
if(event_press(BUTTON_10)) {
if(toggle_abuse == 0) {
toggle_abuse = 1;
}else if(toggle_abuse == 1) {
toggle_abuse = 0;
}
}
}
// left trigger + down d-pad (aim assist on/off)
if(get_val(BUTTON_8)) {
set_val(BUTTON_11, 0);
if(event_press(BUTTON_11)) {
if(toggle_assist == 0) {
toggle_assist = 1;
}else if(toggle_assist == 1) {
toggle_assist = 0;
}
}
}
if(toggle_rapid == 0) {
if(get_val(BUTTON_5)) {
set_val(BUTTON_5, 100);
}else if(!get_val(BUTTON_5) &&
get_ptime(BUTTON_5) <= tap_fire) {
set_val(BUTTON_5, 100);
}
}
if(toggle_rapid == 1) {
if(get_val(BUTTON_5)) {
combo_run(rapid_fire);
}else if(!get_val(BUTTON_5) &&
get_ptime(BUTTON_5) <= tap_fire) {
combo_run(rapid_fire);
}
}
if(toggle_abuse == 1) {
if(get_val(BUTTON_8)) {
set_val(BUTTON_8, 100);
time_counter = time_counter + get_rtime();
if(time_counter >= 540) {
time_counter = 0;
combo_run(aim_abuse);
}
}
}
if(toggle_assist == 1) {
if(get_val(BUTTON_8) && !get_val(BUTTON_5)) {
combo_run(ads_assist);
combo_run(strafe);
}else if(get_val(BUTTON_8) && get_val(BUTTON_5)) {
combo_run(fire_assist);
combo_run(strafe);
}
}
}
combo rapid_fire
{
set_val(BUTTON_5, 100);
wait(hold_time);
set_val(BUTTON_5, 0);
wait(rest_time);
set_val(BUTTON_5, 0);
}
combo aim_abuse {
set_val(BUTTON_8, 0);
wait(30);
}
combo strafe
{
aim_assist(STICK_2_X, 30);
wait(16);
aim_assist(STICK_2_X, -30);
wait(17);
}
combo ads_assist
{
aim_assist(STICK_1_Y, 30);
wait(16);
aim_assist(STICK_1_X, -30);
wait(17);
aim_assist(STICK_1_Y, -30);
wait(16);
aim_assist(STICK_1_X, 30);
wait(17);
}
combo fire_assist
{
aim_assist(STICK_1_Y, 35);
wait(16);
aim_assist(STICK_1_X, -35);
wait(17);
aim_assist(STICK_1_Y, -35);
wait(16);
aim_assist(STICK_1_X, 35);
wait(17);
}
function aim_assist( axis, recoil)
{
set_val(axis, (recoil * (100 - abs(get_val(axis)))) / 100 + get_val(axis));
}
-
Sillyasskid - Captain
- Posts: 574
- Joined: Sat May 14, 2016 3:07 am
Re: converting titan 1 to Titan 2 scripts
The toggles didn't translate properly in the Destiny script on T2, I think they had to cleared before setting active toggles. I mention that somewhere in the script or Online Library description.
What does the & do here J2K?
J2Kbr wrote:In the function SetToggle(int FlagLocation)
change:
- Code: Select all
set_bit(ToggleFlags, FlagLocation);
to:
- Code: Select all
set_bit(&ToggleFlags, FlagLocation);
What does the & do here J2K?
-
antithesis - Colonel
- Posts: 1912
- Joined: Sat May 28, 2016 10:45 pm
21 posts
• Page 2 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 84 guests