PDA

View Full Version : [PS3] Disable certain buttons when a button is pressed?



JonaQuinn
8th December 14, 14:23
This is for PS3, what I'm looking for is a script that can do this:

When L1 is pressed, the manual inputs from SQUARE, TRIANGLE, CROSS & CIRCLE are disabled (So the buttons original action does not interfere with the combos I want to run).

Basically I want to start combos by using L1 in combination with SQUARE/TRIANGLE/CROSS/CIRCLE but the original buttons action gets in the way.

Example:
I want to be able to press SQUARE & get original button action, punch, shoot, whatever

& then I want to be able to run a combo when I press L1 & SQUARE at the same time without the original button action happening when I press the SQUARE button while L1 is pressed


On another note, slightly related, how do you disable a buttons actions completely so that it only does the combo you set for it, not the original button press?

Thanks :)

KittyDawn
8th December 14, 14:27
There is a couple of ways of doing it. It depends how your script is written. Try one of these;


if(combo_running(<yourcombo>){
set_val(17,0);
set_val(18,0);
set_val(19,0);
set_val(20,0);
}

//Or you can do this

if(get_val(6)){
set_val(17,0);
set_val(18,0);
set_val(19,0);
set_val(20,0);
}

As for the second question, same as above;


if(get_val(6)){
//Do something
set_val(6,0);
}

JonaQuinn
8th December 14, 14:32
Thanks, I'll have a little play around with that now :D

edit - That appears to disable SQUARE, TRIANGLE, CROSS & CIRCLE completely when L1 is pressed down. The combos (L1 && SQUARE etc) don't run. How would I disable ONLY the original button input but not the buttons use to start a combo? Thanks

EDIT: So basically I want to disable a buttons original game use while still having it valid for use to start a combo?

LEX LOST
8th December 14, 14:59
That appears to disable SQUARE, TRIANGLE, CROSS & CIRCLE completely when L1 is pressed down. The combos (L1 && SQUARE etc) don't run. How would I disable ONLY the original button input but not the buttons use to start a combo? Thanks

EDIT: So basically I want to disable a buttons original game use while still having it valid for use to start a combo?


TRY IN THIS WAY


main {

if (get_val(PS3_L1) && get_val(PS3_SQUARE)) {combo_run(YOUR_COMBO);}
if(combo_running(YOUR_COMBO)) {set_val(PS3_SQUARE, 0);}

if (get_val(PS3_L1) && get_val(PS3_TRIANGLE)) {combo_run(YOUR_COMBO);}
if(combo_running(YOUR_COMBO)) {set_val(PS3_TRIANGLE, 0);}

if (get_val(PS3_L1) && get_val(PS3_CROSS)) {combo_run(YOUR_COMBO);}
if(combo_running(YOUR_COMBO)) {set_val(PS3_CROSS, 0);}

if (get_val(PS3_L1) && get_val(PS3_CIRCLE)) {combo_run(YOUR_COMBO);}
if(combo_running(YOUR_COMBO)) {set_val(PS3_CIRCLE, 0);}
}

JonaQuinn
8th December 14, 15:02
Cool, I'll try that :) Thanks

KittyDawn
8th December 14, 15:10
That's way more than you need. Just put the combo start before the bit I posted.

LEX LOST
8th December 14, 15:22
That's way more than you need. Just put the combo start before the bit I posted.

It's the same, I think he has 4 combos to run

JonaQuinn
8th December 14, 15:46
That's way more than you need. Just put the combo start before the bit I posted.

What exactly do you mean "put the combo start before the bit I posted"? How would it be written? I'm nearing the bytecode limit so anything I can do to reduce my code would be good :)

LEX's code works to some degree, the game jumps in with the button press at the start still. It's a bit too quick for the code to catch, unfortunately :/

Any other ideas? :)

KittyDawn
8th December 14, 16:03
post what you have and I'll sort it out for you

JonaQuinn
8th December 14, 17:48
I thank you for your offer but I'm kinda enjoying learning it myself. I'll get to optimising it once I have a good idea of what is & isn't possible. What works, what doesn't.

Q1 - Is there a way to differentiate between input coming from the button & input coming from the code/script/CronusMax?

Q2 - Is there a way to turn off the controllers native button input & have Cronusmax handle ALL the button input instead? (that way the code could be in charge of what had priority etc)

KittyDawn
8th December 14, 18:01
There isn't any input coming from the code.

The code runs in a virtual machine.

The virtual machine takes the inputs, does whatever it is being told to by the code and then outputs the results to the console.

It doesn't matter if you have any scripts running, the virtual machine handles all inputs and outputs.

madebyroyalty
9th December 14, 03:56
I'm new here, but I also have the same request. The game I'm playing is for the PS3 and It's called Naruto Ultimate Ninja Storm Revolution. I want to be able to run a combo by holding 'R1' and pressing 'X', or holding 'R1' and pressing 'O', but the original button function gets in the way. I'm new to forums in general, so I'm not sure if I should have posted this here-- forgive me if I screwed up.

I also have been trying to find a way to start a combo using the left or right stick.
Example: Right, Right, (on the left stick) = Combo Tilt

This is my first post so be gentle :)

KittyDawn
9th December 14, 04:05
It's quite simple once you get into it. Most people tend to over think when they first start out. You just have to remember that GPC is quite basic really;


main{

//Start Combo but block button
if(get_val(3)){//3=RB/R1
if(event_press(17)){//17=Y/Triangle
combo_run(combo1);
}
if(event_press(18)){//18=B/Circle
combo_run(combo2);
}
if(event_press(19)){//19=A/Cross
combo_run(combo3);
}
if(event_press(20)){//20=X/Square
combo_run(combo4);
}
//Block button output to console when RB/R1 pressed
set_val(17,0);
set_val(18,0);
set_val(19,0);
set_val(20,0);
//OPtional if you want to always block RB/R1 from being sent
set_val(3,0);
}

//Start Combos with RS
if(get_val(9) >90){//9=RS X-Axis, >90 = Right
combo_run(combo5);
}
if(get_val(9) <-90){//9=RS X-Axis, <-90 = Left
combo_run(combo6);
}
}
combo combo1 {
//Do something
}
combo combo2 {
//Do something
}
combo combo3 {
//Do something
}
combo combo4 {
//Do something
}
combo combo5 {
//Do something
}
combo combo6 {
//Do something
}

madebyroyalty
9th December 14, 04:20
Omg! Thank you. You my friend are amazing. I will try this out as soon as possible.

Edit - I tried it out and it works perfectly, thank you for your help, but do you have a script for starting combos with the Left Stick? The idea I have in mind, is to press RIGHT, LEFT, UP, or DOWN twice on the LS to initiate a combo. Each direction initiates a different combo.

KittyDawn
10th December 14, 04:23
Take a look here and you can change the code from right to left stick - http://cronusmax.com/manual/i_o_functions.htm#identifiers

A double tap is a little more complicated though. Take a look in the CoD AW threads, people have already done work on a stick double tap for that game.

madebyroyalty
10th December 14, 04:35
Oh okay, thanks. Can you still add Right Stick Up and Down to start a combo like you did for Left and Right?