PDA

View Full Version : NEED HELP



HellBane
10th May 17, 00:57
I really just needed some advice on how to make a script were I can Turn a single button into a short combo. WHAT I mean by this is not by what we are all aware of known as combo scripts. Where you activate a full combo by pressing a button. To me, that doesn't seem very intriguing, and makes the game slightly boring ;). Now my idea for example would be for me to push the circle button on injustice and then the character only does one move. THEN, if I push CIRCLE again in rapid succession, It initiates the Triangle button, then by pushing circle again, it triggers the Square button. Is there any possible way to set this up? I want to turn a complicated fighter game into something very simple. If you guys have played any hack and slash game, thats the option I'm looking for. A set up such as Devil May Cry, where Mashing the Circle butting performs a full combo as long as you press the button in rapid succession. I DON'T WANT TO PRESS ONE BUTTON, ONE TIME, THAT PULLS OFF A FULL COMBO. THATS TOO EASY. I need to feel like I'm actually doing something.

The other thing I wanted to ask is, DOES anyone know the simple scripting for using two buttons to activate one action or 1 script. For example, If I had a combo that I want to activate, it would only activate if I pressed the required buttons at the same time. Such as R1, AND X. :thumbsup::thumbsup:

Swizzy
10th May 17, 02:07
It's a matter of logic really...

You need 2 variables to achieve what you asked for without a combo construct... the second one is litterally just a conditional and...

HellBane
10th May 17, 02:11
PLEASE, I WOULD LOVE TO LEARN MORE. injustice 2 is coming out and I need to learn how to code something like this. I have coded many times but nothing like this.

Swizzy
10th May 17, 06:22
This example shows how to execute a combo only when you press 2 buttons at the same time (NOTE: "button1", "button2" and "cmb" should be replaced with whatever matches):

if (get_val(button1) && get_val(button2)) { combo_run(cmb); }


the other part would be done something like this:


int executeTimeCount;
int executeStep;
int executeCombo;
int executeTimer;
main {
if (event_press(PS4_CROSS)) { // Increment step only when you press PS4_CROSS
executeStep = executeStep + 1; // Increment step
executeCombo = TRUE; // Enable sending the next button in the sequence
executeTimeCount = 0; // Reset the timer used to reset
}
if (executeCombo) {
if (executeStep == 1) {
// Implement first action here
}
if (executeStep == 2) {
// Implement second action here
}
if (executeStep == 3) {
// Implement third action here
}
if (executeStep == 4) {
// Implement fourth action here
}
// Add more if (executeStep == #) { ... } here for more steps
executeTimer = executeTimer + get_rtime();
if (executeTimer >= 100) { // It'll hold the next button for 100ms then it stops
executeTimer = 0; // Reset hold timer
executeCombo = FALSE; // Don't press again
}
}
executeTimeCount = executeTimeCount + get_rtime();
if (executeTimeCount >= 300) { // you must press the button again within 300ms or it resets
executeTimer = 0; // Reset hold timer
executeCombo = FALSE; // Don't press again
executeStep = 0; // Reset steps to beginning
}
}

HellBane
10th May 17, 09:58
Thank you so much man. I really appreciate it it. I'm not to sure I understand how it works but I'm gonna test it =)

HellBane
10th May 17, 10:23
Wow,I thought I would know how to set this up but im stuck lol. Can you please show me what it would look like if you placed the circle button to activate X, THEN TRIANGLE, then SQUARE if i was to press the circle button continuously. I did the first script you made me. But I just don't know how to set up the second one. Its completely new to me.

HellBane
10th May 17, 11:36
This is how I have it set up, BUT NO MATTER WHAT I DO, It always runs executestep 1. It never runs the next button in line which is executestep 2. It just remaps Circle to X. If I press the X button it should run Circle then Right analog stick. But it just runs circle to entire time. I can't fix it. Its been over an hour trying to fix it.

int executeTimeCount;
int executeStep;
int executeCombo;
int executeTimer;
main {
if (event_press(PS4_CROSS)) { // Increment step only when you press PS4_CROSS
executeStep = executeStep + 1; // Increment step
executeCombo = TRUE; // Enable sending the next button in the sequence
executeTimeCount = 100; // Reset the timer used to reset
}
if (executeCombo) {
if (executeStep == 1) {
set_val(PS4_CIRCLE, 100);


}
if (executeStep == 2) {
set_val(PS4_RX, -100);
}
if (executeStep == 3) {
// Implement third action here
set_val(PS4_RX, -90);
}
if (executeStep == 4) {
// Implement fourth action here
}
// Add more if (executeStep == #) { ... } here for more steps
executeTimer = executeTimer + get_rtime();
if (executeTimer >= 100) { // It'll hold the next button for 100ms then it stops
executeTimer = 0; // Reset hold timer
executeCombo = FALSE; // Don't press again
}
}
executeTimeCount = executeTimeCount + get_rtime();
if (executeTimeCount >= 300) { // you must press the button again within 300ms or it resets
executeTimer = 0; // Reset hold timer
executeCombo = FALSE; // Don't press again
executeStep = 0; // Reset steps to beginning
}

HellBane
10th May 17, 12:03
Never mind, thanks again lol

HellBane
11th May 17, 02:13
First I do want to thank you for helping me out with that script. But I have an issue that I can't seem to solve. I'm trying to basically Add another Button that would allow me to place more combos in the script. Like using the R1 button to activate the rest of the buttons. Right now, I can only use one. Not sure why but when I try to add other activation buttons the prevous combination stops working and everything gets all messed up. But when I only have one, it works fine. Pretty sure I'm not adding the activation buttons correctly or in the right location. Could you please help me once again?

HellBane
11th May 17, 09:51
First I do want to thank you for helping me out with that script. But I have an issue that I can't seem to solve. I'm trying to basically Add another Button that would allow me to place more combos in the script. Like using the R1 button to activate the rest of the buttons. Right now, I can only use one. Not sure why but when I try to add other activation buttons the prevous combination stops working and everything gets all messed up. But when I only have one, it works fine. Pretty sure I'm not adding the activation buttons correctly or in the right location. Could you please help me once again?


THIS IS THE CODES HERE. I COMPILED IT AND EVERYTHING IS GOOD. But when I run it, it doesn't work properly. The first one was working perfectly fine until I added the second one. Then it just gets messed up. THIS CODE IF IS FOR BATMAN'S COMBO IN INJUSTICE. SQUARE, TRIANGLE, CROSS.


int executeTimeCount;
int executeStep;
int executeCombo;
int executeTimer;
main {
if (event_press(PS4_SQUARE)) { // Increment step only when you press PS4_SQUARE
executeStep = executeStep + 1; // Increment step
executeCombo = TRUE; // Enable sending the next button in the sequence
executeTimeCount = 100; // Reset the timer used to reset
}
if (executeCombo) {
if (executeStep == 1) {
set_val(PS4_L3, 100);
}
if (executeStep == 2) {
set_val(PS4_SQUARE, 0);
set_val(PS4_TRIANGLE, 100);
}

if (executeStep == 3) {
set_val(PS4_SQUARE, 0);
set_val(PS4_CROSS, 100);
}
}

// Add more if (executeStep == #) { ... } here for more steps
executeTimer = executeTimer + get_rtime();
if (executeTimer >= 1000) { // It'll hold the next button for 100ms then it stops
executeTimer = 0; // Reset hold timer
executeCombo = FALSE; // Don't press again
}

executeTimeCount = executeTimeCount + get_rtime();
if (executeTimeCount >= 650) { // you must press the button again within 300ms or it resets
executeTimer = 0; // Reset hold timer
executeCombo = FALSE; // Don't press again
executeStep = 0; // Reset steps to beginning

}
if (event_press(PS4_SQUARE)) { // Increment step only when you press PS4_SQUARE
executeStep = executeStep + 1; // Increment step
executeCombo = TRUE; // Enable sending the next button in the sequence
executeTimeCount = 100; // Reset the timer used to reset
}
if (executeCombo) {
if (executeStep == 1) {
set_val(PS4_L3, 100);
}
if (executeStep == 2) {
set_val(PS4_SQUARE, 0);
set_val(PS4_TRIANGLE, 100);
}

if (executeStep == 3) {
set_val(PS4_SQUARE, 0);
set_val(PS4_CROSS, 100);
}
}

// Add more if (executeStep == #) { ... } here for more steps
executeTimer = executeTimer + get_rtime();
if (executeTimer >= 1000) { // It'll hold the next button for 100ms then it stops
executeTimer = 0; // Reset hold timer
executeCombo = FALSE; // Don't press again
}

executeTimeCount = executeTimeCount + get_rtime();
if (executeTimeCount >= 650) { // you must press the button again within 300ms or it resets
executeTimer = 0; // Reset hold timer
executeCombo = FALSE; // Don't press again
executeStep = 0; // Reset steps to beginning

}
}

HellBane
11th May 17, 10:05
=

HellBane
11th May 17, 10:14
-

HellBane
11th May 17, 10:25
First I do want to thank you for helping me out with that script. But I have an issue that I can't seem to solve. I'm trying to basically Add another Button that would allow me to place more combos in the script. Like using the R1 button to activate the rest of the buttons. Right now, I can only use one. Not sure why but when I try to add other activation buttons the previous combination stops working and everything gets all messed up. But when I only have one, it works fine. Pretty sure I'm not adding the activation buttons correctly or in the right location. Could you please help me once again?


THIS IS THE CODES HERE. I COMPILED IT AND EVERYTHING IS GOOD. But when I run it, it doesn't work properly. The first one was working perfectly fine until I added the second one. Then it just gets messed up. THIS CODE IS FOR BATMAN'S COMBO IN INJUSTICE. SQUARE, TRIANGLE, CROSS.


int executeTimeCount;
int executeStep;
int executeCombo;
int executeTimer;
main {
if (event_press(PS4_SQUARE)) { // Increment step only when you press PS4_SQUARE
executeStep = executeStep + 1; // Increment step
executeCombo = TRUE; // Enable sending the next button in the sequence
executeTimeCount = 100; // Reset the timer used to reset
}
if (executeCombo) {
if (executeStep == 1) {
set_val(PS4_L3, 100);
}
if (executeStep == 2) {
set_val(PS4_SQUARE, 0);
set_val(PS4_TRIANGLE, 100);
}

if (executeStep == 3) {
set_val(PS4_SQUARE, 0);
set_val(PS4_CROSS, 100);
}
}

// Add more if (executeStep == #) { ... } here for more steps
executeTimer = executeTimer + get_rtime();
if (executeTimer >= 1000) { // It'll hold the next button for 100ms then it stops
executeTimer = 0; // Reset hold timer
executeCombo = FALSE; // Don't press again
}

executeTimeCount = executeTimeCount + get_rtime();
if (executeTimeCount >= 650) { // you must press the button again within 300ms or it resets
executeTimer = 0; // Reset hold timer
executeCombo = FALSE; // Don't press again
executeStep = 0; // Reset steps to beginning

}
if (event_press(PS4_TRIANGLE)) { // Increment step only when you press PS4_SQUARE
executeStep = executeStep + 1; // Increment step
executeCombo = TRUE; // Enable sending the next button in the sequence
executeTimeCount = 100; // Reset the timer used to reset
}
if (executeCombo) {
if (executeStep == 1) {
set_val(PS4_L3, 100);
}
if (executeStep == 2) {
set_val(PS4_SQUARE, 0);
set_val(PS4_TRIANGLE, 100);
}

if (executeStep == 3) {
set_val(PS4_SQUARE, 0);
set_val(PS4_CROSS, 100);
}
}

// Add more if (executeStep == #) { ... } here for more steps
executeTimer = executeTimer + get_rtime();
if (executeTimer >= 1000) { // It'll hold the next button for 100ms then it stops
executeTimer = 0; // Reset hold timer
executeCombo = FALSE; // Don't press again
}

executeTimeCount = executeTimeCount + get_rtime();
if (executeTimeCount >= 650) { // you must press the button again within 300ms or it resets
executeTimer = 0; // Reset hold timer
executeCombo = FALSE; // Don't press again
executeStep = 0; // Reset steps to beginning

}
}

HellBane
11th May 17, 12:39
^^^^THERE IS ONE ABOVE THIS ONE, I JUST WANT TO SHOW YOU THE OTHER THINGS I HAVE TIRED.^^^^ NOTHING WORKS. WHEN I ADD A SECOND ACTIVATION EVERYTHING JUST STOPS WORKING RIGHT WHEN I ADD ANOTHER EVENT_PRESS FUNCTION.

int executeTimeCount;
int executeStep;
int executeCombo;
int executeTimer;
main {
if (event_press(PS4_SQUARE)) { // Increment step only when you press PS4_CROSS
executeStep = executeStep + 1; // Increment step
executeCombo = TRUE; // Enable sending the next button in the sequence
executeTimeCount = 0; // Reset the timer used to reset
}
if (executeCombo) {
if (executeStep == 1) {
set_val(PS4_L3, 100);
set_val(PS4_SQUARE, 0);
}
if (executeStep == 2) {
set_val(PS4_TRIANGLE, 100);
set_val(PS4_SQUARE, 0);
}
if (executeStep == 3) {
set_val(PS4_CROSS, 100);
set_val(PS4_SQUARE, 0);
}
if (executeStep == 4) {
set_val(PS4_L3, 0);
set_val(PS4_SQUARE, 0);
}
}
if (event_press(PS4_CIRCLE)) { // Increment step only when you press PS4_CROSS
executeStep = executeStep + 5; // Increment step
executeCombo = TRUE; // Enable sending the next button in the sequence
executeTimeCount = 0; // Reset the timer used to reset
}
if (executeCombo) {
if (executeStep == 5) {
set_val(PS4_L3, 100);
}
if (executeStep == 6) {
set_val(PS4_TRIANGLE, 100);

}
if (executeStep == 7) {
set_val(PS4_CROSS, 100);

}
if (executeStep == 8) {
set_val(PS4_L3, 0);
}

// Add more if (executeStep == #) { ... } here for more steps
executeTimer = executeTimer + get_rtime();
if (executeTimer >= 100) { // It'll hold the next button for 100ms then it stops
executeTimer = 0; // Reset hold timer
executeCombo = FALSE; // Don't press again
}
}
executeTimeCount = executeTimeCount + get_rtime();
if (executeTimeCount >= 300) { // you must press the button again within 300ms or it resets
executeTimer = 0; // Reset hold timer
executeCombo = FALSE; // Don't press again
executeStep = 0; // Reset steps to beginning
}
}

HellBane
12th May 17, 00:07
IVE BEEN WORKING ON THIS FOR THE PAST 24 HOURS AND HAVE GOTTEN NO WHERE. NO SLEEP JUST STRESS, AT THIS POINT I JUST FEEL LIKE BASHING MY HEAD IN A WALL.

Swizzy
12th May 17, 00:59
IVE BEEN WORKING ON THIS FOR THE PAST 24 HOURS AND HAVE GOTTEN NO WHERE. NO SLEEP JUST STRESS, AT THIS POINT I JUST FEEL LIKE BASHING MY HEAD IN A WALL.

TAKE A CHILL PILL AND REALIZE THAT YOU ARE NOT THE ONLY ONE ON THESE FORUMS REQUESTING HELP, AND THAT SOME OF US HAVE JOBS, AND THESE FORUMS ARE INTERNATIONAL!!

You are acting like a hyperactive kid, multiple postings within a few hours, it's really not that hard, your problem has to do with your logic, take your time and read the manual if you are having trouble understanding the code, and try to understand what it's actually doing, i commented my example code for you, try reading those aswell, they explain what each part does...

HellBane
12th May 17, 01:07
Sorry about that, man. I just dont understand this thing

KS212
13th May 17, 08:18
@Swizzy
Thanks for your example, I was actually looking for something like this. Your example for combo steps is perfect.

@HellBane
To make your life easier, you may want to consider each 'step' as a full combo and define it as such. That way within the execute steps, you only need to call the combo as opposed to trying to call multiple inputs. I'd personally find that a lot easier as the combo (or steps within the combo, you may consider say a qcf+HP or what not to be 1 step but that is still 3 inputs...)

Define your combo first with:

combo Hadoken {
set_val(PS4_DOWN, 100);
wait(20);
set_val(PS4_RIGHT, 100);
set_val(PS4_DOWN, 100);
wait(20);
set_val(PS4_RIGHT, 100);
set_val(PS4_R1, 100);
wait(20);
}




Then call it within the Execute loop with:


if (executeCombo) {
if (executeStep == 1) {
set_val(PS4_R1, 100); //Assuming close HP
}
if (executeStep == 2) {
combo_run(Hadoken); //Runs defined combo
}
<rest of code here, combos have to go under this naturally>

Defining 'single hits' allows you to manually drag out your delay, but for predefined specials you have to already have them with predefined delays. It looks like what you are trying to do is define multiple inputs WITH a predefined delay within the execution step... I have a feeling it doesn't work that way. (Swiz correct me if I'm wrong).