Acceleration
Moderator: Core Staff
Acceleration
Is there any way to add a trigger that accelerates a player's velocity on contact?
Re: Acceleration
Acceleration is a change in velocity. If you change direction then technically you are accelerating, as acceleration is a vector not a scalar.


Re: Acceleration
Guess what Soviet, I've got good news, bad news and maybe news.
Good news is, you can change a players velocity through scripting.
Bad news is, it's single player only.
The maybe news is, you could look in the SP files, see if you can find that bit of code, and just copy and paste it into mp and thus recreate the velocity editing function in your gsc.
Good news is, you can change a players velocity through scripting.
Bad news is, it's single player only.
The maybe news is, you could look in the SP files, see if you can find that bit of code, and just copy and paste it into mp and thus recreate the velocity editing function in your gsc.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
Re: Acceleration
where is that code used?
Re: Acceleration
No idea, I've never looked into the cod4 files. Just try searching around.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Acceleration
*POP*Pedsdude wrote:Acceleration is a change in velocity. If you change direction then technically you are accelerating, as acceleration is a vector not a scalar.
Take cover, his head just imploded.
CoD4 scripts are in the RAW file you downloaded with the tools.
Try
self SetMoveSpeedScale( 1.5 );

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: Acceleration
I just tried to look at the IW Script documentation to see what "setmovespeed" does. Those bastards took it down! 

Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
Re: Acceleration
it appears that that command is used to set the speed a player moves with a certain weapon. So, not sure it can be used with mapping scripting.
edit: after some research, I think that will increase a player's speed, however, I want it just to increase velocity, not speed permanently. So, I think the command SetVelocity would be more applicable, would you agree drof/nm?
edit: after some research, I think that will increase a player's speed, however, I want it just to increase velocity, not speed permanently. So, I think the command SetVelocity would be more applicable, would you agree drof/nm?
Re: Acceleration
Yes, that's what I said to use at the beginning...
Thing is, it's SP only, so you will have to find that function and paste the thing in your gsc.
Thing is, it's SP only, so you will have to find that function and paste the thing in your gsc.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
Re: Acceleration
What do you mean by find the function? Where should I look for it?
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Acceleration
if the above command works, why not just use a loop to make it seem like acceleration?
Code: Select all
i = 1;
while(i < maximumSpeed)
{
player SetMoveSpeedScale(i);
i=+0.1;
wait 0.1;
}
player SetMoveSpeedScale(1);

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Acceleration
http://www.zeroy.com/script/Nightmare wrote:I just tried to look at the IW Script documentation to see what "setmovespeed" does. Those bastards took it down!

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Acceleration
I noticed after my post, sue me >.>KillerSam wrote:double post zomg! And he acknowledged that link in another topic somewhereDrofder2004 wrote:http://www.zeroy.com/script/Nightmare wrote:I just tried to look at the IW Script documentation to see what "setmovespeed" does. Those bastards took it down!

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: Acceleration
I'm fine with instantaneous acceleration, I just want realistic deceleration. I want it to work kind of like a human cannonball. I'm going to mess around with the movegravity command when I get a chance, but if you can think of a way to use movespeedscale to replicate realistic deceleration that would be great.
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Acceleration
If the person is flying through the air, then just use attach the player to a script_model and use move gravity.
A deceleration script would be the same as the above script, except start at MAXSPEED and count downwards...
i = MAXSPEED;
A deceleration script would be the same as the above script, except start at MAXSPEED and count downwards...
i = MAXSPEED;
Code: Select all
while(i > 1)
{
player SetMoveSpeedScale(i);
i=-0.1;
wait 0.1;
}
player SetMoveSpeedScale(1);

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Who is online
Users browsing this forum: No registered users and 4 guests