Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Possible to teleport entities to player location upon death?
Streetboat Offline
Posting Freak

Posts: 1,099
Threads: 40
Joined: Mar 2011
Reputation: 56
#1
Possible to teleport entities to player location upon death?

Hi everyone, I was wondering idly if perhaps it would be possible to teleport or activate an entity at the player's location upon a scripted death (i.e. not necessarily needing to detect when it happens, but where)? I know the newest update for HPL2 had a doozy of cool new scripts that were used in AMFP, such as the ability to locate entities and play particle effects there, instead of just a script area. Or maybe that wasn't even that new. Anyways, would this be possible? Or is that still beyond the reaches of HPL2?

[Image: signature-2.png]
(This post was last modified: 07-23-2015, 01:07 AM by Streetboat.)
07-23-2015, 01:07 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Possible to teleport entities to player location upon death?

If you have patch 1.3 it sounds fairly easy.
If the biggest problem is to move them it should be like this:

SetEntityPos("Entity", GetPlayerPosX(), GetPlayerPosY(), GetPlayerPosZ());

Trying is the first step to success.
07-23-2015, 02:58 AM
Find
Spelos Away
Banned

Posts: 231
Threads: 19
Joined: Sep 2014
#3
RE: Possible to teleport entities to player location upon death?

Yes, but what exactly would be the trigger.
Now I didn't check, but I don't remember there being anything like OnDeath.
Maybe I'm wrong, tho. Huh
07-23-2015, 10:26 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#4
RE: Possible to teleport entities to player location upon death?

CheckPoint("", "PlayerStartArea_checkpoint", "", "Dead", "Dead");

You know how these work?
Check the WIKI page.

OR try IfPlayerHealth is less then 1 (some things will happen) Not srue if this work, The checkpoint will.
07-23-2015, 11:32 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#5
RE: Possible to teleport entities to player location upon death?

(07-23-2015, 11:32 PM)DnALANGE Wrote: OR try IfPlayerHealth is less then 1 (some things will happen) Not srue if this work, The checkpoint will.

This is too clumsy.
Just use checkpoints.

Trying is the first step to success.
07-24-2015, 12:24 AM
Find
Streetboat Offline
Posting Freak

Posts: 1,099
Threads: 40
Joined: Mar 2011
Reputation: 56
#6
RE: Possible to teleport entities to player location upon death?

Like I said, I was just worried about the where, not the when.

It's pretty easy to teleport a scriptarea to the player location, kill the player, then teleport a character to that first scriptarea.

I'm assuming that scriptareas, since they need to have unique names, can be teleported, of course...

EDIT: And yes, I'm familiar with CheckPoints.

[Image: signature-2.png]
(This post was last modified: 07-24-2015, 01:11 AM by Streetboat.)
07-24-2015, 01:10 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#7
RE: Possible to teleport entities to player location upon death?

Yup, that sounds possible.

Trying is the first step to success.
07-24-2015, 03:19 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#8
RE: Possible to teleport entities to player location upon death?

I've never seen Script Areas be moved, though I have no big reason to believe it doesn't work. You should try it. I'm interested to know.

07-24-2015, 11:03 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#9
RE: Possible to teleport entities to player location upon death?

(07-24-2015, 11:03 AM)Mudbill Wrote: I've never seen Script Areas be moved, though I have no big reason to believe it doesn't work. You should try it. I'm interested to know.

I can confirm it works.
I helped a guy make a script area follow a monster, with a timer calling every 0.5 second.

Trying is the first step to success.
07-24-2015, 12:17 PM
Find




Users browsing this thread: 1 Guest(s)