is it possible to make a playerclass gradualy go faster as you hold forward?
- mr fiat
- Frequent Poster Miles card holder
- Posts: 858
- Joined: Tue Jun 05, 2012 3:28 pm
- Location: netherlands
is it possible to make a playerclass gradualy go faster as you hold forward?
as the title says, is it possible to make a playerclass gradualy go faster as you hold forward?
i dug around in the zdoom wiki asked others but i havnt found a suitable soloution yet.
i dug around in the zdoom wiki asked others but i havnt found a suitable soloution yet.
Last edited by mr fiat on Sun Aug 04, 2013 2:53 pm, edited 1 time in total.
- CloudFlash
- Zandrone
- Posts: 1074
- Joined: Mon Jun 04, 2012 5:35 pm
- Location: Wonderland (except not really)
RE: is it possible to make a playerclass gradualy go faster as you hold forward?
Did you try messing with A_ScaleVelocity in their see state?
https://i.imgflip.com/i5tpe.jpg
*Hey, who wants to hear my solution to the modern world's problems? ^Me! %Me! @Me! #Me! *WELL TOO BAD @Did he just stab himself with this butcher knife? %Looks like it ^Hey, the pizza guy arrived! %Pizza! Yey
*Hey, who wants to hear my solution to the modern world's problems? ^Me! %Me! @Me! #Me! *WELL TOO BAD @Did he just stab himself with this butcher knife? %Looks like it ^Hey, the pizza guy arrived! %Pizza! Yey
- mr fiat
- Frequent Poster Miles card holder
- Posts: 858
- Joined: Tue Jun 05, 2012 3:28 pm
- Location: netherlands
RE: is it possible to make a playerclass gradualy go faster as you hold forward?
hmmm il try that. altho i recall having used a similar action that caused some odd effects. (i could be wrong tho)CloudFlash wrote: Did you try messing with A_ScaleVelocity in their see state?
*edit*yes i tried this before and then it didnt work properly as i wanted it. and it still doesnt seem to what i expected it to do, but then i noticed that i only seemed to pick up speed when i was midair (not touching the ground) so i asume this function is mainly intended for projectiles. (or flying enemys?)
Last edited by mr fiat on Sun Aug 04, 2013 3:25 pm, edited 1 time in total.
- CloudFlash
- Zandrone
- Posts: 1074
- Joined: Mon Jun 04, 2012 5:35 pm
- Location: Wonderland (except not really)
RE: is it possible to make a playerclass gradualy go faster as you hold forward?
A_ChangeVelocity?
https://i.imgflip.com/i5tpe.jpg
*Hey, who wants to hear my solution to the modern world's problems? ^Me! %Me! @Me! #Me! *WELL TOO BAD @Did he just stab himself with this butcher knife? %Looks like it ^Hey, the pizza guy arrived! %Pizza! Yey
*Hey, who wants to hear my solution to the modern world's problems? ^Me! %Me! @Me! #Me! *WELL TOO BAD @Did he just stab himself with this butcher knife? %Looks like it ^Hey, the pizza guy arrived! %Pizza! Yey
RE: is it possible to make a playerclass gradualy go faster as you hold forward?
Use ACS. Specifically, GetPlayerInput.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

RE: is it possible to make a playerclass gradualy go faster as you hold forward?
A_ChangeVelocity should be able to do it, if you use it as you are supposed to
Inventory items solves all your shit:
Note though that you are supposed to exppiriment with this code to make it fit your liking, and that it is not some plugin that you can just throw in your project.
I am aware of what the CarSpeed actors inhert from, and what the wiki says, you should look at this page if you want to know more about the PowerSpeed actor.
Inventory items solves all your shit:
Note though that you are supposed to exppiriment with this code to make it fit your liking, and that it is not some plugin that you can just throw in your project.
I am aware of what the CarSpeed actors inhert from, and what the wiki says, you should look at this page if you want to know more about the PowerSpeed actor.
Spoiler: This is not small (Open)If you got any questions regarding my code or if it dun work, just let me know.
Last edited by Lollipop on Sun Aug 04, 2013 4:27 pm, edited 1 time in total.
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there
- mr fiat
- Frequent Poster Miles card holder
- Posts: 858
- Joined: Tue Jun 05, 2012 3:28 pm
- Location: netherlands
RE: is it possible to make a playerclass gradualy go faster as you hold forward?
yea i already asumed it was going to involve acs, however im a total acs nab so i need help with that. :sÆnima wrote: Use ACS. Specifically, GetPlayerInput.
RE: is it possible to make a playerclass gradualy go faster as you hold forward?
A_Recoil(Negativevaluehere) and custominventory to control the recoil amount.. there you go!
[][][][][][][][][][][][][][][]
Nothing to see here
[][][][][][][][][][][][][][][]
Nothing to see here
[][][][][][][][][][][][][][][]
- mr fiat
- Frequent Poster Miles card holder
- Posts: 858
- Joined: Tue Jun 05, 2012 3:28 pm
- Location: netherlands
RE: is it possible to make a playerclass gradualy go faster as you hold forward?
hmmm il try that but i have no clue what i should do with custom inventory.Cruduxy wrote: A_Recoil(Negativevaluehere) and custominventory to control the recoil amount.. there you go!
RE: is it possible to make a playerclass gradualy go faster as you hold forward?
Try what I wrote, that way you can control it.mr fiat wrote:hmmm il try that but i have no clue what i should do with custom inventory.Cruduxy wrote: A_Recoil(Negativevaluehere) and custominventory to control the recoil amount.. there you go!
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there
RE: is it possible to make a playerclass gradualy go faster as you hold forward?
Use an inventory (Ammo,inventory,custom whatever one you find most fit) with jump states and you can have the player accelerate faster (more a_recoil) per inventory.. the more you are moving the more you are accelerating.. I persume this is for your cars mod so sidestep isnt a matter since cars DONT MOVE SIDEWAY UNLESS SPECIAL WHEELS
[][][][][][][][][][][][][][][]
Nothing to see here
[][][][][][][][][][][][][][][]
Nothing to see here
[][][][][][][][][][][][][][][]
RE: is it possible to make a playerclass gradualy go faster as you hold forward?
Would be nice with a car that could drive sideways though :P
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there
RE: is it possible to make a playerclass gradualy go faster as you hold forward?
What about
I am not completely sure with DECORATE part, though...
Well, the drawback is, it won't work properly when one gets shot or shoots (pain, missile, etc)
Code: Select all
//ACS part
script 666 (int running)
{
if(running) {
SetActorProperty(0,APROP_SPEED,GetActorProperty(0,APROP_SPEED)+0.1)
if(GetActorProperty(0,APROP_SPEED)>10.0) SetActorProperty(0,APROP_SPEED,10.0);
} else SetActorProperty(0,APROP_SPEED,0.0)
//DECORATE part
states {
spawn:
PLAY A 0 ACS_ExecuteAlways(666,0)
PLAY A 1
goto spawn+1
see:
PLAY ABCD 2 ACS_ExecuteAlways(666,1)
loop
}
Well, the drawback is, it won't work properly when one gets shot or shoots (pain, missile, etc)
Last edited by Klofkac on Sun Aug 04, 2013 6:40 pm, edited 1 time in total.
𝕂𝕝𝕠𝕗𝕜𝕒𝕔
RE: is it possible to make a playerclass gradualy go faster as you hold forward?
Yeah, the decorate part is kinda broken in your example because you don't want to put any action on the spawn state on the very first line, it also doesn't help to make it go to spawn+1 as it will always ignore the command anyway.
Honestly, everyone here has given good suggestions. You can control recoil with items (very much in the way Jitterskull works in GvH, except without control items) or simply use all ACS, hell you can use both! It's really not too hard to use ACS if you have any examples to look at, and there are plenty of those around.
Honestly, everyone here has given good suggestions. You can control recoil with items (very much in the way Jitterskull works in GvH, except without control items) or simply use all ACS, hell you can use both! It's really not too hard to use ACS if you have any examples to look at, and there are plenty of those around.
Last edited by Ivan on Sun Aug 04, 2013 7:00 pm, edited 1 time in total.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===
- CloudFlash
- Zandrone
- Posts: 1074
- Joined: Mon Jun 04, 2012 5:35 pm
- Location: Wonderland (except not really)
RE: is it possible to make a playerclass gradualy go faster as you hold forward?
Why would cars be in pain state anyway? You aren't doing Mario Kart in Doom engine, are you? ._.
https://i.imgflip.com/i5tpe.jpg
*Hey, who wants to hear my solution to the modern world's problems? ^Me! %Me! @Me! #Me! *WELL TOO BAD @Did he just stab himself with this butcher knife? %Looks like it ^Hey, the pizza guy arrived! %Pizza! Yey
*Hey, who wants to hear my solution to the modern world's problems? ^Me! %Me! @Me! #Me! *WELL TOO BAD @Did he just stab himself with this butcher knife? %Looks like it ^Hey, the pizza guy arrived! %Pizza! Yey
RE: is it possible to make a playerclass gradualy go faster as you hold forward?
Ok, I got a much better code this time and it does not rely on DECORATE, just pure ACS.
You can tweak the acceleration by changing 0.1 to other number, same with max speed.
Don't take the script numbers seriously, change them
Oh and I wrote it quickly from scratch without even testing...
Or, just apply very low friction
Code: Select all
script 1337 ENTER
{
int speedMul = 0.0;
while(GetActorProperty(0,APROP_Health)) //It MUST stop when player dies
{
if(!GetActorVelX(0)&&!GetActorVelY(0)&&!GetActorVelZ(0)) SpeedMul=0.1; //Le player crashed or stopped, reset acceleration!
else if(GetPlayerInput(-1,INPUT_FORWARDMOVE)) // GAMEPAD COMPAT! GTFO BUTTONS!
{
SpeedMul+=0.1;
if(SpeedMul>20.0) SpeedMul=20.0; //You don't want that car go infinitely fast, don't you?
} else {
SpeedMul-=0.5;
if(SpeedMul<0.1) SpeedMul=0.1; //Negative speed multiplier? NOPE!
}
SetActorProperty(0,APROP_SPEED,SpeedMul); //Apply da multiplier!
Delay(1);
}
}
script 9001 RESPAWN
{
ACS_ExecuteAlways(1337,0); //Start dat again.
}
Don't take the script numbers seriously, change them
Oh and I wrote it quickly from scratch without even testing...
Or, just apply very low friction
Last edited by Klofkac on Mon Aug 05, 2013 4:10 pm, edited 1 time in total.
𝕂𝕝𝕠𝕗𝕜𝕒𝕔
RE: is it possible to make a playerclass gradualy go faster as you hold forward?
Yes, this is the way I recommended doing it. But for some reason I was ignored and you guys continued to suggest very hacky DECORATE methods ... :argh:Klofkac wrote: Ok, I got a much better code this time and it does not rely on DECORATE, just pure ACS.
You can tweak the acceleration by changing 0.1 to other number, same with max speed.Code: Select all
script 1337 ENTER { int speedMul = 0.0; while(GetActorProperty(0,APROP_Health)) //It MUST stop when player dies { if(!GetActorVelX(0)&&!GetActorVelY(0)&&!GetActorVelZ(0)) SpeedMul=0.1; //Le player crashed or stopped, reset acceleration! else if(GetPlayerInput(-1,INPUT_FORWARDMOVE)) // GAMEPAD COMPAT! GTFO BUTTONS! { SpeedMul+=0.1; if(SpeedMul>20.0) SpeedMul=20.0; //You don't want that car go infinitely fast, don't you? } else { SpeedMul-=0.5; if(SpeedMul<0.1) SpeedMul=0.1; //Negative speed multiplier? NOPE! } SetActorProperty(0,APROP_SPEED,SpeedMul); //Apply da multiplier! Delay(1); } } script 9001 RESPAWN { ACS_ExecuteAlways(1337,0); //Start dat again. }
Don't take the script numbers seriously, change them
Oh and I wrote it from scratch without even testing...
Or, just apply very low friction
Klofkac's code does need some refining though. I'd post my script for the Mercenaries jeep (which even includes different gears) but I can't find where I put it. D:
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

RE: is it possible to make a playerclass gradualy go faster as you hold forward?
I was not agreeing with hacky DECORATE stuff, actually. Looked unnessecarilly complicated.Ænima wrote: Yes, this is the way I recommended doing it. But for some reason I was ignored and you guys continued to suggest very hacky DECORATE methods ... :argh:
Looking through topic...
Well, you could write it more detailed back then, like posting an example.Ænima wrote: Use ACS. Specifically, GetPlayerInput.
Ænima wrote: Klofkac's code does need some refining though.
Ofc it needs refining.Klofkac wrote: Oh and I wrote quickly it from scratch without even testing...
Last edited by Klofkac on Mon Aug 05, 2013 4:10 pm, edited 1 time in total.
𝕂𝕝𝕠𝕗𝕜𝕒𝕔
- mr fiat
- Frequent Poster Miles card holder
- Posts: 858
- Joined: Tue Jun 05, 2012 3:28 pm
- Location: netherlands
RE: is it possible to make a playerclass gradualy go faster as you hold forward?
when i replied to your first comment i wasnt sure how to reply because you mentioned some acs functions which didnt realy tell me that much because as i said im a tottal acs nab (aka i cant do anything aside from some print messages with allot of reference :S)Ænima wrote:Yes, this is the way I recommended doing it. But for some reason I was ignored and you guys continued to suggest very hacky DECORATE methods ... :argh:Klofkac wrote: Ok, I got a much better code this time and it does not rely on DECORATE, just pure ACS.
You can tweak the acceleration by changing 0.1 to other number, same with max speed.Code: Select all
script 1337 ENTER { int speedMul = 0.0; while(GetActorProperty(0,APROP_Health)) //It MUST stop when player dies { if(!GetActorVelX(0)&&!GetActorVelY(0)&&!GetActorVelZ(0)) SpeedMul=0.1; //Le player crashed or stopped, reset acceleration! else if(GetPlayerInput(-1,INPUT_FORWARDMOVE)) // GAMEPAD COMPAT! GTFO BUTTONS! { SpeedMul+=0.1; if(SpeedMul>20.0) SpeedMul=20.0; //You don't want that car go infinitely fast, don't you? } else { SpeedMul-=0.5; if(SpeedMul<0.1) SpeedMul=0.1; //Negative speed multiplier? NOPE! } SetActorProperty(0,APROP_SPEED,SpeedMul); //Apply da multiplier! Delay(1); } } script 9001 RESPAWN { ACS_ExecuteAlways(1337,0); //Start dat again. }
Don't take the script numbers seriously, change them
Oh and I wrote it from scratch without even testing...
Or, just apply very low friction
Klofkac's code does need some refining though. I'd post my script for the Mercenaries jeep (which even includes different gears) but I can't find where I put it. D:
also klof's code works like it should now, after he fine adjusted it.
-
Scott_Minikhiem
- New User
- Posts: 14
- Joined: Mon Nov 19, 2012 12:46 am
RE: is it possible to make a playerclass gradualy go faster as you hold forward?
I have a script that changes the players speed to simulate him being tired... It works but it crashes could it be because the script(s) are still running on the dead player? Specifically it crashes on respawn
