Hello,
Basically, I have this Func_Button trigger that once pressed teleports the player to a spot of an npc and kills that npc. What I want is to have a new npc spawn where the player's last location was.
What I'm trying to do is to have a possesive type gameplay, I'm doing a kind of hack job at it right now, but so far it works for me, all except replacing the last player position with a new npc..
Does this make sense?
Thank you.<html><head><link rel="stylesheet" href="themes/standard.css" type="text/css"></head><body topmargin=2 leftmargin=2>
1
Re: Player Teleport / NPC Spawn
Posted by Campaignjunkie on Wed Oct 4th at 3:57am 2006

Campaignjunkie
member
1309 posts
291 snarkmarks
Registered: Feb 12th 2002
Location: West Coast, USA
Occupation: Student
Posted by Campaignjunkie on Wed Oct 4th at 3:57am 2006
After a bit of thinking, I think I have an idea.
Make a template for the NPC you want to spawn. Parent an env_entity_maker to the activating player (!activator or !player perhaps?). When the button is activated, unparent the env_entity_maker (so it saves the last location of the player), teleport the player away, and then spawn the NPC. Voila!
If this is multiplayer though, I'm not too sure how this would handle.
Make a template for the NPC you want to spawn. Parent an env_entity_maker to the activating player (!activator or !player perhaps?). When the button is activated, unparent the env_entity_maker (so it saves the last location of the player), teleport the player away, and then spawn the NPC. Voila!
If this is multiplayer though, I'm not too sure how this would handle.
Campaignjunkie
member
1309 posts
291 snarkmarks
Registered: Feb 12th 2002
Location: West Coast, USA
Occupation: Student
Re: Player Teleport / NPC Spawn
Posted by kyaranger on Wed Oct 4th at 6:16am 2006
Posted by kyaranger on Wed Oct 4th at 6:16am 2006
Thank you for your reply,
Everything worked except the parenting of the env_entity_maker to the !player or !activator. I tried both and none seemed to work, when i unparented it, the npc would spawn just fine at its entity location.
Do you know of another way to parent an entity to the player?
Thank you!<html><head><link rel="stylesheet" href="themes/standard.css" type="text/css"></head><body topmargin=2 leftmargin=2>
Everything worked except the parenting of the env_entity_maker to the !player or !activator. I tried both and none seemed to work, when i unparented it, the npc would spawn just fine at its entity location.
Do you know of another way to parent an entity to the player?
Thank you!<html><head><link rel="stylesheet" href="themes/standard.css" type="text/css"></head><body topmargin=2 leftmargin=2>
Re: Player Teleport / NPC Spawn
Posted by Campaignjunkie on Wed Oct 4th at 9:38pm 2006

Campaignjunkie
member
1309 posts
291 snarkmarks
Registered: Feb 12th 2002
Location: West Coast, USA
Occupation: Student
Posted by Campaignjunkie on Wed Oct 4th at 9:38pm 2006
Hmm, odd. I guess entities can't be parented on the player? I'm not really sure how to circumvent that, then. You could try using something like a game_zone_player to try to track the player's position - arrange a bunch of game_zone_player's in a grid format and have them trigger when the player is there. That way, you'll know the player's position based on what game_zone_player he triggers. You could also use a trigger_multiple or something similar too.
Some caveats: I'm not sure how memory intensive all those trigger volumes would be on the engine. You'll also have to configure each grid spot by hand, which can be time consuming. But it'll work, even though it's a little hacky and it'll restrict your level design a bit.
Some caveats: I'm not sure how memory intensive all those trigger volumes would be on the engine. You'll also have to configure each grid spot by hand, which can be time consuming. But it'll work, even though it's a little hacky and it'll restrict your level design a bit.
Campaignjunkie
member
1309 posts
291 snarkmarks
Registered: Feb 12th 2002
Location: West Coast, USA
Occupation: Student
1
© Snarkpit.net 2001 - 2023, about us, donate, contact
Snarkpit v6.1.0 created this page in 0.0232 seconds.

Snarkpit v6.1.0 created this page in 0.0232 seconds.

