Wed May 19, 2021 8:26 am
Thu May 20, 2021 9:31 pm
Thu May 27, 2021 2:24 pm
Thu May 27, 2021 9:15 pm
WeaponFunction:
"####" "#" 0 A_JumpIf(GetPlayerInput(MODINPUT_SIDEMOVE)>0,"State1") //Move Left
"####" "#" 0 A_JumpIf(GetPlayerInput(MODINPUT_SIDEMOVE)<0,"State2") //Move Right
"####" "#" 0 A_JumpIf(!GetPlayerInput(MODINPUT_SIDEMOVE)!=0 && GetPlayerInput(MODINPUT_FORWARDMOVE)>0,"State3") //Move forward
"####" "#" 0 A_JumpIf(!GetPlayerInput(MODINPUT_SIDEMOVE)!=0 && GetPlayerInput(MODINPUT_FORWARDMOVE)<0,"State4") //Move backwards
Sat May 29, 2021 12:00 pm
Wed Jun 09, 2021 5:44 pm
Dr_Cosmobyte wrote:Small idea for mods with lots of weapon commands:
Make it so you have only one key called "Weapon Function".
Create a token for the weapons to check and define it on the gun states that:
Weapon Function + W (or your moving forward key) = Function 1
Weapon Function + S (or your moving backwards key) = Function 2
Weapon Function + A (or your moving left key) = Function 3
Weapon Function + D (or your moving right key) = Function 4
phantombeta brought an interesting point: the player might hit the wrong keys during stress, so it could be possible to add a delay that, if the player don't hold the keys for a short period of time, it goes back to idle.
In DECORATE, i achieved something like that with my Spawn: Path to Damnation mod. It goes like this:
- Code:
WeaponFunction:
"####" "#" 0 A_JumpIf(GetPlayerInput(MODINPUT_SIDEMOVE)>0,"State1") //Move Left
"####" "#" 0 A_JumpIf(GetPlayerInput(MODINPUT_SIDEMOVE)<0,"State2") //Move Right
"####" "#" 0 A_JumpIf(!GetPlayerInput(MODINPUT_SIDEMOVE)!=0 && GetPlayerInput(MODINPUT_FORWARDMOVE)>0,"State3") //Move forward
"####" "#" 0 A_JumpIf(!GetPlayerInput(MODINPUT_SIDEMOVE)!=0 && GetPlayerInput(MODINPUT_FORWARDMOVE)<0,"State4") //Move backwards
instead of binding 4 keys, making 4 tokens to check, 4 ACS types, 4 differently named states to be mentioned, etc etc etc...
I usually would put these in a master weapon every other weapon inherits from. It might be much cleaner to redirect and understand (and the player might access them much easier, which is important).
Have fun.
Wed Jun 09, 2021 9:18 pm
Thu Jun 10, 2021 7:07 am
Fri Jun 11, 2021 3:06 pm
Dr_Cosmobyte wrote:I am glad you saw some use for it! Your Malice mod is a hell of an experience, hope this will be useful for you.
EDIT: I forgot to specify how i achieved this code too; the core of it was made by willkuer in his Demon Slayer 1887 mod; it was originally used for a short dodge-strafe move for the fists. And i thought that was awesome.
EDIT 2: Hang on, don't take it as a direct mention! I just wanted to simplify stuff for modders
Sat Jun 12, 2021 1:21 pm
Fri Jun 18, 2021 5:27 pm
Graf Zahl wrote: GZDoom's weapon system is generic and generally has no interactions between different weapons. This "easy option" would add a considerable amount of mess to it.
Nash wrote:Could probably be added as part of a weapons mod.
Spoiler:
Fri Jun 18, 2021 11:50 pm
Sat Jun 26, 2021 10:40 pm
Sun Jul 04, 2021 9:12 pm
Thu Jul 08, 2021 4:10 pm