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.

FPSC Classic Scripts / Static and Player X,Y,Z movement by script?

Author
Message
Person99
18
Years of Service
User Offline
Joined: 15th Dec 2005
Location: Good question
Posted: 8th Apr 2007 06:20
Is it possible to get a script to move a player?
Also, is it possible to get an object to always follow the player, or another static entity, with an offset X,Y,Z?

I know this isn't possible in the editor, but is it possible in scripts?

This could make FPSC do some pretty amazing stuff.

Your signature has been erased by a mod
Person99
18
Years of Service
User Offline
Joined: 15th Dec 2005
Location: Good question
Posted: 13th Apr 2007 09:33
I'll take the huge amount of posts as a no?

The true process of evolution, from dumbest to smartest.
Single-cell organism, multi-celled organism, human, dog, rock, (1 septillion things), cat.
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 13th Apr 2007 18:19
The reason you didn't get a response is probably because a simple search of the forums would anser this.

Search "Jetpack" and you will see scripts that associate entity to the player and then effect players movement by moving the associated entity.

Quote: "Is it possible to get a script to move a player?"

Short Answer: YES

Don't forget to visit Conjured Entertainment
Person99
18
Years of Service
User Offline
Joined: 15th Dec 2005
Location: Good question
Posted: 14th Apr 2007 00:20 Edited at: 14th Apr 2007 00:24
Strange, I searched for it for over an hour. I guess I should have googled the website or something, i'll take a look.

Edit: Ah, I have found how to move the player! I tested a simple "Moveup" script with a static entity looking for the player, and it worked!
I still cannot find how to get it to move with the player, or to move the player.

If worse comes to worse, I may have to edit the source with DBPro.

The true process of evolution, from dumbest to smartest.
Single-cell organism, multi-celled organism, human, dog, rock, (1 septillion things), cat.
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 14th Apr 2007 04:52 Edited at: 14th Apr 2007 04:57
It's easy really.
Here's an example.

Use this
for the AIMAIN of a Skull.
( The Skull is a character ... entity>WW2>characters )

Make sure to use the Page-Down key to sit him near the floor but not in it.
Now, if you have that snippet as his AIMAIN, then walk up to it (right next to it) and hit the Enter Key.
You will be pushed forward.

Don't forget to visit Conjured Entertainment
Person99
18
Years of Service
User Offline
Joined: 15th Dec 2005
Location: Good question
Posted: 14th Apr 2007 08:49
Ah, that also works!

I have one more question:

Is the following possible WITHOUT editing the source?

We have a jeep model with an interior, and a player model.

1. If the player presses E, the script moves the player to 0,0,0 at the jeep, which is where the front seat is.

2. The script then removes the player footstep sound, and replaces it with a car sound.

3. If the player moves, the script removes the player movement, and adds car style movement.

4. When the player presses E, the player is moved a few points away from the car, and the normal player movement is restored.

The Person99 awards go to: 1. Jack the Ripper for hardest crime scenes. 2. Peter Petrelli for most powers. 3. Superman for longest flight.
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 16th Apr 2007 06:26 Edited at: 16th Apr 2007 06:30
This is a trick question, and if I say yes then people will flame me saying it ain't so.

However...

Quote: "Is the following possible WITHOUT editing the source?

We have a jeep model with an interior, and a player model.

1. If the player presses E, the script moves the player to 0,0,0 at the jeep, which is where the front seat is.

2. The script then removes the player footstep sound, and replaces it with a car sound.

3. If the player moves, the script removes the player movement, and adds car style movement.

4. When the player presses E, the player is moved a few points away from the car, and the normal player movement is restored."


Forget about doing it where you get inside of a model.
You might not be able to do them exactly how you mention, but...
the answer is ....YES!

1.
plrmoveto=x where x is the name of the seat (if seat is separate entity)

2.
You can "remove" the footstep sound by playing the car sound over it. (car so loud you no hear footsteps)

3.
Have a Hud for the winshield and dash and the player movements will be the car

4.
The model can simply follow the player.
When they hit the key then the dash Hud is removed, and there are out of the vehicle.

Don't forget to visit Conjured Entertainment
Person99
18
Years of Service
User Offline
Joined: 15th Dec 2005
Location: Good question
Posted: 16th Apr 2007 09:36 Edited at: 16th Apr 2007 09:38
Ah, this helps on 1. and 2.

But I specifically want the car's HUD to be real, like I said.

I also want the car being there to actually use car movement, and go faster.

The way you said would work, but it would also mean that if they looked up or down, the car would look up or down.

However, that would work for a mech or something.


Hrmm, maybe if you put this on the car script, translated to FPI, it would work for the forward and backward:
IF W key is pressed: Move player +10 forward, + the normal player movement.
IF S key is pressed: Move player +10 backward, + the normal player movement.

The Person99 awards go to: 1. Jack the Ripper for hardest crime scenes. 2. Peter Petrelli for most powers. 3. Superman for longest flight.

Login to post a reply

Server time is: 2024-11-23 15:38:57
Your offset time is: 2024-11-23 15:38:57