Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
twitchy 624
18
Years of Service
User Offline
Joined: 18th Jul 2006
Location:
Posted: 23rd Apr 2008 04:27
sorry if this has been asked before but...
is there a "sprint script". Press and hold a button to make the player move quicker?
anyone have any ideas of where I would start if I were to try to code this myself?
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 23rd Apr 2008 04:56
Have you ever seen this when building and running a test level?



If you have, did you try it?
twitchy 624
18
Years of Service
User Offline
Joined: 18th Jul 2006
Location:
Posted: 23rd Apr 2008 07:30
hey. Is there a way to make this only usable for a short period of time... and slow it down abit?
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 23rd Apr 2008 07:36
No, I don't believe so because I think it is hard-coded in the engine and I don't believe there is any scripting that can be done for the player. I have been looking at Ply's Mod and it seems like I had seen a scripting command about making the player move faster. I might be mistaken and if Plystire sees this he can tell you for sure. You'd of course have to get his mod.
twitchy 624
18
Years of Service
User Offline
Joined: 18th Jul 2006
Location:
Posted: 23rd Apr 2008 08:03
Ply's Mod
twitchy 624
18
Years of Service
User Offline
Joined: 18th Jul 2006
Location:
Posted: 23rd Apr 2008 08:05
Im guessing it would be pretty easy to make a script that says something like when shift is pressed the player cant shoot. Right? r would plys mod be needed to. anyway ill look into that
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 23rd Apr 2008 09:24 Edited at: 23rd Apr 2008 09:50
This is the script that I was thinking of in Ply's mod. I haven't used it yet but I will check it out. It looks like this should speed the player up? Isn't that what velocity means?



The interesting thing is that it can effect the player's 3d Coordinates. That's what's confusing to me.

I will do a quick test on this and see what happens.

Addendum:

I tried it and those commands have nothing to do with the players speed. I'm not sure as yet what they're for. I set up a trigger zone and I assumed that when the player entered it the velocity (thinking speed) would increase. This command has a very different effect. If I use the y coordinate, the player "hits" the trigger zone and will rise up the value of x. I used "200" and he seemed to actually walk on top of the trigger zone. Using x coordinate, the player "hit" the trigger zone but would not go through it but would quickly move to the left or right of it until there was no longer the zone and then would continue straight. Using Z the player would just "stop" when he collides with the trigger zone and if positioned just right would go sideways along the side of the trigger zone.

So, I don't think we have an option of making the player go any faster except for pressing the shift key. The person who is playing the game has that choice whenever they want to make the player go a little faster, as if they were running. You can't stop it or start it. There is very little one can do with the player. Most of the scripting is for the entities. Especially in v1.x by TGC.
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 23rd Apr 2008 16:53 Edited at: 23rd Apr 2008 17:02
I found a way to use Ply's Mod for what you sorta want to do. My test code is as follows:



This is just test code and it can easily be modified.

I simply set up an area of ground segment. Place a player marker on one end of it and in front of the player a trigger zone.

State=0 - waits for player to enter zone and changes state to 1
state=1 - waits for user to press the "F" key, Once pressed changes state to 5
state=5 - sets the syncrate to 100 and state to 10
state=10 - waits for user to press the RIGHT-SHIFT key, once pressed changes syncrate to 40 and changes state back to 0

Player has to reenter zone to be able to use these keys again. Also a timer can be used to reset the syncrate.

This would require Plystire's mod. If you should decide to try it, be sure to copy the original FPSC-Game.exe and even change the name of it so you have two copies before placing Ply's mod into the FPSC folder. It's as simple as that. If you don't like it then rename his mod (FPSC-Game-plystire.exe) and copy the original exe file into the FPSC folder.

Because of the scripting design and a bare minimum of commands, you cannot hold down a key to do an action. The has to be pressed and released. Also, the assigned value of the key pressed is stored and a key cannot be easily re-used so if you want a reverse action you need to select another key to do this. Also, certain keys have their own use to the engine such as "w,a,s,d,c,r,space" and etc. So you have to be careful making key assigments. So "r" for run would not work as that would force the player to reload.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Apr 2008 00:14
Nice use of the syncrate, Flatlander.

If I had timerbased system put in, that wouldn't have worked.


There isn't a direct way to alter the player's running speed. But I'll throw that in real fast for the next release. Along with walk speed.

You seemed a little confused with the "moveplr" commands. Here's a short description of what's actually happening.

When the player moves in FPSC, he doesn't move a set distance, he actually has a "velocity" that gets set in the physics engine. These commands will force the player to have an instant change in velocity on a certain axis. For understanding purposes of non-coders reading this: X-Axis = West/East, Y/Axis = Up/Down, Z-Axis = North/South.

Also, once the command gets set, the player will have an INSTANT increase in velocity and then the value will no longer effect the player. If the command is constantly called, then the player will most likely be accelerated instead of just being bumped in a direction.

I made these commands as a way to manipulate player movement, perhaps for a HalfLife-like cutscene or something.


Thanks for the idea for more scripting commands, I'll be sure to take a note of it.


The one and only,
~PlystirE~

Login to post a reply

Server time is: 2024-11-24 08:12:23
Your offset time is: 2024-11-24 08:12:23