Help for newcomer - Simple Script example

GPC1 script programming for Titan One. Code examples, questions, requests.

Help for newcomer - Simple Script example

Postby Lonewolf » Sun Jun 10, 2018 3:26 am

Hi guys, im new with titan one programming, i bought one used to a friend a couple of weeks ago, so i was wondering if someone could help me to code this simple script for try something with my brother (maybe against him xD) but just for get started to coding scripts for titan one.

I know to program in js if its helpful, but for research purposes all i want to do for now, its the following

An script for do the sequence below, when i press LB in my dualshock 4

→ ↘ ↓ ↙ ← → X

Ill appreciate all the help in order to start coding with this.
Thanks.
An amateur programmer.
User avatar
Lonewolf
Private First Class
Private First Class
 
Posts: 3
Joined: Sun Jun 10, 2018 3:20 am

Re: Help for newcomer - Simple Script example

Postby Prototype » Sun Jun 10, 2018 7:54 am

Hi, here is your code:
Code: Select all
main {
    if(event_press(PS4_L1)) {
        combo_run(Mycombo);
    }
}
 
combo Mycombo {
    set_val(PS4_RIGHT, 100);
    wait(50);
    set_val(PS4_DOWN, 100);
    set_val(PS4_RIGHT, 100);
    wait(50);
    set_val(PS4_DOWN, 100);
    wait(50);
    set_val(PS4_DOWN, 100);
    set_val(PS4_LEFT, 100);
    wait(50);
    set_val(PS4_LEFT, 100);
    wait(50);
    set_val(PS4_RIGHT, 100);
    wait(50);
    set_val(PS4_CROSS, 100);
    wait(50); wait(50);
}
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic! :smile0517:
User avatar
Prototype
Major General
Major General
 
Posts: 3251
Joined: Sun Dec 16, 2012 1:43 pm

Re: Help for newcomer - Simple Script example

Postby Lonewolf » Sun Jun 10, 2018 3:03 pm

Wow, thanks a lot, i tried other script today, and im starting to get how this works, thanks a lot for your help.

Its quite interesting code for this, i remember my highschool classes with Assembler when im coding this, but with a better IDE Jajjajaja

thanks again!
User avatar
Lonewolf
Private First Class
Private First Class
 
Posts: 3
Joined: Sun Jun 10, 2018 3:20 am

Re: Help for newcomer - Simple Script example

Postby J2Kbr » Mon Jun 11, 2018 12:28 pm

lol, just created the same script here (without see prototypes code first):
viewtopic.php?p=65593#p65593
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 64 guests