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 / plrmoveto command

Author
Message
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 16th Mar 2007 20:11
I saw the following posted by uman in an old thread. It is locked.

Quote: "Does anyone have experience of successful working player move commands?"


I'm not sure if his question was finally answered or not but it wasn't in the life of the thread at any rate.

My question deals with moving the player to another location. You use one entity that has the "moveto" command in it and another entity that will be used to move the player to the proximity of said entity. Both entities need to be set to dynamic to work.

It does work to a degree. However, it seems to continue to run the script over and over and over again not allowing the player to move around from there. He is virtually stuck in a time warp.

Has anybody else used this and found the same thing or have you gotten it to work correctly. Or, maybe nobody has even used it.



As opposed to Highlander.
Slayer Simon
18
Years of Service
User Offline
Joined: 11th Oct 2006
Location:
Posted: 16th Mar 2007 21:15
I,v gotten it to work correctly. I used a zone though.

The thing that doesn't work for me is the player move east west north and south commands. Maybe I just don't know how to use them.

I aplogise fr tge Abve. I mite hav mshpeled a cuple tings.
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 16th Mar 2007 21:47 Edited at: 16th Mar 2007 21:48
Thanks slayer. I did try the zone and same thing happens. The result is that the player cannot move anywhere after being moved. He is stuck. If you ever watched "Groundhog Day" it is like that except you keep repeating the move over and over again.

So, since I knew that it worked for you I continued investigating the possibilities. By simply adding the action "destroy", after the move action solved the problem. I assume you had done that as well. If not, there must be another work around, however, I am satisfied with destroying either the entity or zone so I can use this. It is going to be very effective and quite a surprise to the unware player. bwaaa haaa haaa ha.

As far as the other commands here is what I had found in another thread that had been locked.

@ uman

Quote: "Does anyone have experience of successful working player move commands?

i.e. plrmovedown =X
plrmoveeast =X

and so on?

I am looking for confirmation that the player move commands are working as I have not been able to get them to do so up until now.

What I would like to do is get the player to be forced in the direction I require within the parameters offered when in proximity to an entity or preferably when the player enters a triggerzone area - so that the player be forced away/out from it.

Has anyone got this or similar to work?

I will keep trying to see if I can find a solution.

Thank you"


The following response by Les Horribres indicates he must have looked at the source code (which I still would love to have but cannot find).

Quote: "I looked into it... apearantly either lee has some trick going on, or it ignores the memovingy# variables compleatly.

Okay, got it. Lee is a do later guy. You know what he does with all the plr move commands?

if memovingx#<>0.0
memovingx#=0.0
endif
if memovingy#<>0.0
memovingy#=0.0
endif
if memovingz#<>0.0
memovingz#=0.0
endif
lol. "


Apparently the engine's hard-code will not allow for these commands to work. Have you tried them under the newer versions? IE, 1.04 or 1.05 (I hadn't tried). If they still don't work, I hope that the developers have not forgotten about them and will make sure they work in what I would assume would be in version, 2.0. Version 1.x seems to be their test versions until they work out all the bugs. That's ok by me but it does take more time that I would have wanted to take by discovering the things that work and the things that don't work.

As opposed to Highlander.
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 16th Mar 2007 21:58 Edited at: 16th Mar 2007 21:59
F l a t l a n d e r,

I have used the plrmoveto command quite a bit and never had that problem. The only reason I can think of for that would be if both entites had the same name or you created a loop in the script.

This is the script from my site. You might look and see how it differs from yours.

Quote: ";Artificial Intelligence Script
; by xplosys

; Place 2 dynamic entities in your level, one where the player moves from
; and another where the player will move to. Make sure the move to entity
; is on the floor and has enough room for the player. Sending the player
; to an entity on a wall could cause problems.

; Use this script as the From entities AI Main and replace your To entity
; name below where is says Your_to_entinty_name. Be sure there is only
; one entity with that name.

;Header

desc = Player move to... (entity)

;Triggers

:state=0,plrdistwithin=50:state=1
:state=1:plrmoveto=Your_to_entinty_name

;end of script

"


Best.

I'm sorry, my answers are limited. You must ask the right question.

vorconan
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 17th Mar 2007 16:10
can't you just use the teleporter scripts?

evil lies within all of us...we just don't know it yet
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 17th Mar 2007 21:39
@ xplosys and @ vorconan

In a previous post I mention that I did get it to work within the parameters I needed. However, I decided to do some more testing as the teleportexit script uses the plrmoveto. However, I couldn't get the script as indicated by xplosys to work properly as written. xplosys, you still know a heck of a lot more about this than I do. It is actually getting rather interesting and challenging to experiment with these commands. I remember when I started my education in computer science back in 1974 I remember being told that part of learning anything regarding computers and computer programming is by trial and error. I think it is still that way. Well anyway here is what I had found out.


Quote: ";Artificial Intelligence Script

;Header

desc = test

;Triggers

;============Works====================
;modified from transportexit script - just took sound out and changed entity name
;================================

:state=0:rundecal=2,coloff
:state=0,plrhigher=10,plrdistwithin=50:state=1,plrmoveto=board_1
:state=1,plrdistfurther=55:state=0

-----------------------------------------

;Triggers

;============Does not work=========
;For some reason the script continues after player has moved.
;therefore state=1 will continue to repeat and therefore the
;moveto will continue forever. unless something is done.
;Destroying the entity will work in which I do because that
;was what I wanted to do anyway. Of course, destroying the
;entity will stop the script.
;================================

:state=0,plrdistwithin=50:state=1
:state=1:plrmoveto=board_1

;-----------------------------------------

;Triggers

;============Works====================
;Added the destroy action
;================================

:state=0,plrdistwithin=50:state=1
:state=1:plrmoveto=board_1,destroy

;-----------------------------------------


;Triggers

;============Works====================
;So even this line which is in the simplest form will work.
;As long as the player is not within 50 units from the
;entity the plrmove will not perform its action.
;================================

state=0,plrdistwithin=50:plrmoveto=board_1

;End of Script"


As opposed to Highlander.

Login to post a reply

Server time is: 2024-11-23 13:32:53
Your offset time is: 2024-11-23 13:32:53