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 / Teleport/Jump to player

Author
Message
Serious Sam P
16
Years of Service
User Offline
Joined: 6th Nov 2008
Location:
Posted: 22nd Nov 2008 19:37
Hi,
I am trying to create a simple script for a character to follow the player and jump to next to the player if the player is more than 600 away. Here is the script.


Any help would be appreciated,
Sam.
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 22nd Nov 2008 22:52
You can't freeze and animate the entity. Also, settarget isn't a condition.......

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 23rd Nov 2008 00:58
"movetotarget" will not make him teleport to the target, it will make him rotate to and move towards the target.


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.
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 23rd Nov 2008 01:33 Edited at: 23rd Nov 2008 01:49
So, let me get this straight...

You have a character following the player, and
if the player gets X distance away from the character, then you want the character to teleport to the player?

So in other words, if the charater gets hung on an obstacle, then he would get teleported out of it.

Just do it backwards...
Have the character following the player like he should.
Then if he gets X distance away, then move the player back to get him unhung. (by leading him clear of obstacle)
As long as the distance was not a large number, then you wouldn't set the player back far at all.
It would be better than getting on the other side of the map and discovering you lost them only having to backtrack the whole map.



Hopefully the player will run clear of obstacles in the first place.
If not, then they soon will after getting called back a few times.

You could get fancy and display a HUD when moving the character explaining that the follower got lost, but thats up to you.

Don't forget to visit Conjured Entertainment

Serious Sam P
16
Years of Service
User Offline
Joined: 6th Nov 2008
Location:
Posted: 23rd Nov 2008 02:31
Thanks for all your help.

Quote: "
So in other words, if the charater gets hung on an obstacle, then he would get teleported out of it.
"


I am creating a system where the character is a "Virtual" helper who can just appear next to the player.

Quote: "
"movetotarget" will not make him teleport to the target, it will make him rotate to and move towards the target.
"


How can I make him teleport?

Thanks for your help people,
SAM.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 23rd Nov 2008 04:07
Quote: "How can I make him teleport?"


Hmmmmmmmm.....

[deep thought]
..................
[/deep though]

Yeah, that might work...


Okay, this may be a bit of a haphazard solution, but try this one out:

Replace the "movetotarget" in your script with


This will, theoretically, make the player "pick up" the entity and put it into their inventory, then immediately DROP the entity from their inventory at their location... producing a sort of "teleport" effect that moves the entity instantly to the player's position.


Yup, that's the best I can come up with


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.

Login to post a reply

Server time is: 2024-11-24 16:27:59
Your offset time is: 2024-11-24 16:27:59