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 / Player and Entity Actions/Conditions/Variables

Author
Message
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 14th Oct 2008 16:07
Got a quick question that I am hoping someone can answer. I have looked through the community guide, as well as the manual, and I can't find the answer to this. Maybe my eyes are just buggy right now?

Anyhow, I have a few questions regarding player and entity positioning that I am hoping can be answered:

1. What variables give the players' current position in a level? For example, say the player is on floor 6, at x 27/y 15. Which variables tell us where exactly this is?

2. What variable gives us where the player is looking? Obviously, looking at the ceiling gives us a different z number than, say, looking at the floor. Which variable tells us this?

3. Which variables control entity movement? I saw MoveFore, MoveUp, and all of the Force actions. But I am not sure that these can be used to distinctly tell an entity to move to a specific location and then stop, and then move again under certain conditions, and then stop, and then rotate, and so on.

If you cannot tell by now, I want to get an entity to move in conjunction with the player. The premise here is to have an object viewable, but not touchable, until something else has happened. But the effect I want to create is that the object moves away from the player when they attempt to go near it. I also want it constantly in the players' vision when they are in a specific room (to drive players batty).

I don't want a solution from anyone - I just want to know which variables are responsible (as per the question above). If someone can tell me which variables, I think I can take it from there.
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 14th Oct 2008 18:51
First, thanks for providing enough information so the question can be answered. As dumb as that sounds, it does seem to be a problem some times. I can't speak for any engine MOD since I don't use any, but I'll give you my take on the question, and it's only my take.

The variables you seek are not available to the player. They are hard coded into the engine and we can't see where the player is or where he is looking. Actually, I don't think where he is looking is even tracked at all.

In order for an entity to move the way you want, it will have to be made into a character. It's nearly if not impossible to move entities on the fly. Characters however, can be moved by the commands you referenced above. Turning an entity into a character can be as easy as adding IsCharacter = 1 into the entities FPE file. Using the condition plrdistwithin in conjunction with the movement commands for entities should allow for at least some of what you seek.

Best.

Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 14th Oct 2008 20:03
@xplosys:

Thanks for the answer. And bummer. I was hoping to be able to be able to at least get the players' coordinates (not set - only get) and use them to allow for true movement of an entity based on the player.

I wanted to use them to try and create a real flashlight script. I know - I tried the one that's out here. Doesn't work properly imo. It's good, but the light doesn't move. If we had access to the player's movement and line of sight variables, we could write a script to tell a light marker to move with and be in the line of sight of the player. Then when you press the correct key, voila! The light turns on. And when you move, it follows you.

Oh well. Maybe in a future release?
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 14th Oct 2008 21:04
The player position variables are available in Ply's Mod, also, there are tonnes more commands involve entity and player movement control.....

Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 14th Oct 2008 22:33
But Ply's mod only works up to V 1.07, right? I use 1.09, which means Ply's mod wouldn't work for me. Meaning I still can't get at the player movement variables.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 15th Oct 2008 00:27
Many people have used Ply's Mod with V1.09 of FPSC with great success.

The official additions to V1.08 and V1.09 won't be in the game anymore, but you will have the V1.09 Editor


May I ask why you use V1.09, anyway?


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 15th Oct 2008 00:33
I\'m confused - is he asking for people to work on this with him?
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 15th Oct 2008 00:34
Quote: "May I ask why you use V1.09, anyway?"

Because when I installed 1.12 it lost all of my information about registration. I tried the userdetails file trick, and that didn't work. So I uninstalled, reinstalled, and then went to v 1.09. That works just fine.

Anyhow, seeing as you are stating it works with 1.09 I will download and see if I can create a flashlight that works with the player location variables. Should be interesting, and I'll keep you posted on progress.

Sorry for the double post - apparently a response I was trying to attach to a different post ended up here.

Login to post a reply

Server time is: 2024-11-24 14:10:50
Your offset time is: 2024-11-24 14:10:50