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 / Move object to player

Author
Message
dumpus
16
Years of Service
User Offline
Joined: 1st Jan 2008
Location: Canada, eh?
Posted: 24th Feb 2009 05:35 Edited at: 24th Feb 2009 05:35
I apologize if this has been posted before. I tried searching, but the stupid search function only allows phrases instead of key words.

Is it possible via scripting to instantly transport an object (not character) to right in front of the player? This is not possible by just spawning the object, because the character may be in different places. Any help would be greatly appreciated.

*This post will self-destruct in 10 seconds.*
Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 24th Feb 2009 07:54
I don't see an easy way to do this, but I think there may be a work around! I don't know if this will work, but its worth a try:

Trigger Zone:

:plrwithinzone=1:activateifused=1

Entity:

:plrdistfurther=20:followplr

I have no idea if this will work (i seriously doubt it will), Plystire should be on the case soon.

Migration Discussion Thread: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
Piracy Discussion Thread:
http://forum.thegamecreators.com/?m=forum_view&t=142774&b=21
DarthBasicVader
18
Years of Service
User Offline
Joined: 28th Nov 2005
Location: Cyberspace
Posted: 24th Feb 2009 09:40
Quote: "I tried searching, but the stupid search function only allows phrases instead of key words. "


Actually you can use keywords ...
Try
--> %transport%
The search util it's not stupid, it's something like .. not immediate

Riccardo
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 25th Feb 2009 00:46
The problem with teleporting anything in FPSC is that it messes with the physics. You'll want to give the illusion that the object teleported there when it really didn't.

This would be easier if the player could only be in certain locations when the teleportation occurs. Then you could set up a spawned entity in front of zones where each zone will spawn the corresponding entity while also deactivating the other zones to keep them from spawning their entities.


The one and only,


dumpus
16
Years of Service
User Offline
Joined: 1st Jan 2008
Location: Canada, eh?
Posted: 25th Feb 2009 01:25
Ahh, I figured that...thanks guys.

*This post will self-destruct in 10 seconds.*
X10 User
15
Years of Service
User Offline
Joined: 21st Jan 2009
Location:
Posted: 26th Feb 2009 03:03 Edited at: 26th Feb 2009 03:11
just spitballing but might i suggest you may be looking at this from the wrong angle?

im pretty new but whats striking me is

could you not use to movetotarget command? and simply set the player as the target?

or get the entity to rotatetoplr,and movefore to cover the distance and edit the velocity and speed of the entity to make it seem instantaneous?

could you turn off the entities physics so it can pass through walls? i achieved this by accident the other day when playing around with my rc script but am unable to recreate it with any degree of reliability, i noticed while it was being controlled by me all interior physics (i was using a wheelchaire from corepak 1) disappeared and it quite comfortably passed through the walls, all you would need to do is work out the scenario you want this to happen, how you want it to be triggered specifically and then just time it accordingly for example to the movetotarget command can be entered into any random state in the fpi as long as you set the target first and you just switch to that state at the given time, plr using switch, entity dying, trigger zone, timer reaching a certain point etc and set the entities speed or spawn velocity accordingly

i played around with the spawn velocity and when spawning objects from trigger zones they got flung around quite spectacularly

im using it to recreate a sort of evil dead moment where if you dont achieve the level end in time a ghostly demonic thing comes tearing through the walls after you

admittedly its not working 100% of the time

or am i missing what your trying to achieve?

- Why is everyone on here so rude? -
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 26th Feb 2009 21:30
Quote: "could you not use to movetotarget command?"


No, you cannot. That command is designed to make the entity move towards to the target, not instantaneously appear on it.

Technically, you can turn off the physics by simply using "coloff", but from my experience, the entity will on occassion retain collision with segments.


The one and only,


Login to post a reply

Server time is: 2024-11-24 20:48:31
Your offset time is: 2024-11-24 20:48:31