[Submission] Impaler Gauntlet
- Blue Shadow
- Administrator
Less
More
- Posts: 1129
2 months 1 day ago #11
by Blue Shadow
Replied by Blue Shadow on topic [Submission] Impaler Gauntlet
This should fix it:
If you want, you can use this alternatively. It's a compact, one-line version of the above:
Code:
IGAE G 5
{
int buttons = GetPlayerInput(INPUT_BUTTONS); // You were using the ACS version of this function, not the ZScript/DECORATE one.
if(buttons & BT_ATTACK)
{
return A_Jump(256, "SwingL2"); // You need to return the result of the function, which is the state to jump to.
}
return State(null); // A return is needed here too. Returning 'null' tells the engine to continue to the next state.
}
If you want, you can use this alternatively. It's a compact, one-line version of the above:
Code:
IGAE G 5 A_JumpIf(GetPlayerInput(INPUT_BUTTONS) & BT_ATTACK, "SwingL2");
Please Log in or Create an account to join the conversation.
- doomedarchviledemon
- Topic Author
- Pain Elemental
Less
More
- Posts: 251
2 months 1 day ago #12
by doomedarchviledemon
Replied by doomedarchviledemon on topic [Submission] Impaler Gauntlet
Updated
I went with the more condensed version, but I did have a follow up question. Could this be used to make a string combo input?
Like if I wanted to implement this into the Ready state and the player pressed Left, then Right, then Attack, it would jump to a super punch state or something. Is that possible using GetPlayerInput?
No plans to implement something like this in this particular weapon. But I do have some ideas for future weapons if this is possible.
I went with the more condensed version, but I did have a follow up question. Could this be used to make a string combo input?
Like if I wanted to implement this into the Ready state and the player pressed Left, then Right, then Attack, it would jump to a super punch state or something. Is that possible using GetPlayerInput?
No plans to implement something like this in this particular weapon. But I do have some ideas for future weapons if this is possible.
Please Log in or Create an account to join the conversation.
- Blue Shadow
- Administrator
Less
More
- Posts: 1129
1 month 4 weeks ago #13
by Blue Shadow
Replied by Blue Shadow on topic [Submission] Impaler Gauntlet
I don't see why not. Do bear in mind though, GetPlayerInput doesn't override player's input, so if the player uses left and right for turning, player still turns if pressing those keys, even if you're reading the player's input with the function.Could this be used to make a string combo input?
Like if I wanted to implement this into the Ready state and the player pressed Left, then Right, then Attack, it would jump to a super punch state or something. Is that possible using GetPlayerInput?
Please Log in or Create an account to join the conversation.
- doomedarchviledemon
- Topic Author
- Pain Elemental
Less
More
- Posts: 251
1 month 2 weeks ago #14
by doomedarchviledemon
Replied by doomedarchviledemon on topic [Submission] Impaler Gauntlet
Updated with Nash's ultra widescreen arms for the main punches.
That should be fine. As long as the string of inputs isn't to long I don't think it will have that great of a negative impact. I'll be mindful of that aspect because I'd like them to be quick and easy inputs with minimal movement impacts. I just need to figure out how to make it read a string. I don't know what symbol to put in the code to make it read one input to another in a set order, and if the order is broken to stop listening.
Like, putting 'A_JumpIf(GetPlayerInput(INPUT_BUTTONS) & BT_LEFT & BT_RIGHT & BT_ATTACK, "PunchyMcPunchers"); doesn't work. I can probably ask on the ZDoom forums and see if I can get help there also. Again, not for this weapon, but for others later on perhaps.
I don't see why not. Do bear in mind though, GetPlayerInput doesn't override player's input, so if the player uses left and right for turning, player still turns if pressing those keys, even if you're reading the player's input with the function.
That should be fine. As long as the string of inputs isn't to long I don't think it will have that great of a negative impact. I'll be mindful of that aspect because I'd like them to be quick and easy inputs with minimal movement impacts. I just need to figure out how to make it read a string. I don't know what symbol to put in the code to make it read one input to another in a set order, and if the order is broken to stop listening.
Like, putting 'A_JumpIf(GetPlayerInput(INPUT_BUTTONS) & BT_LEFT & BT_RIGHT & BT_ATTACK, "PunchyMcPunchers"); doesn't work. I can probably ask on the ZDoom forums and see if I can get help there also. Again, not for this weapon, but for others later on perhaps.
Please Log in or Create an account to join the conversation.
- Gothic
- Moderator
Less
More
- Posts: 1259
1 month 1 week ago #15
by Gothic
Replied by Gothic on topic [Submission] Impaler Gauntlet
Please Log in or Create an account to join the conversation.
- doomedarchviledemon
- Topic Author
- Pain Elemental
Less
More
- Posts: 251
2 weeks 6 days ago #16
by doomedarchviledemon
Replied by doomedarchviledemon on topic [Submission] Impaler Gauntlet
Updated
These sprites are awesome btw! Thank you very much for the polish, Gothic!
These sprites are awesome btw! Thank you very much for the polish, Gothic!
Please Log in or Create an account to join the conversation.
- Gothic
- Moderator
Less
More
- Posts: 1259
2 weeks 5 days ago #17
by Gothic
Replied by Gothic on topic [Submission] Impaler Gauntlet
Please Log in or Create an account to join the conversation.