Return objects to their spot?

Return objects to their spot?

Re: Return objects to their spot? Posted by DrGlass on Wed Dec 15th 2004 at 1:34am
DrGlass
1825 posts
Posted 2004-12-15 1:34am
DrGlass
member
1825 posts 632 snarkmarks Registered: Dec 12th 2004 Occupation: 2D/3D digital artist Location: USA
I know about the prop respawn, but lets say I have a map with a deep
hole, and I dont want all my props sitting at the bottom of the hole
the whole map, but I also dont want them to dissapear if they are NOT
at the bottom of the hole.

So, do you think there is a way to teleport objects back to their
original position if and only if they fall into this hole? I was
thinking about a teleport system (in the fist part of HL2 there was a
mini teleport that would move props) but that would only be able to zap
them to one point...

any other ideas?
Re: Return objects to their spot? Posted by Nanodeath on Wed Dec 15th 2004 at 1:42am
Nanodeath
356 posts
Posted 2004-12-15 1:42am
356 posts 66 snarkmarks Registered: Nov 11th 2004 Occupation: Student - Bioengineering Location: Seattle, WA, USA
If only there was some way to fire the OnUser1 of whatever fell into the hole this could be so easy...
Re: Return objects to their spot? Posted by Vahn on Wed Dec 15th 2004 at 2:23am
Vahn
8 posts
Posted 2004-12-15 2:23am
Vahn
member
8 posts 1 snarkmarks Registered: Nov 22nd 2004
<DIV>couldnt u set a trigger in the hole wich triggered the objects that fell in the hole to respawn again outside the whole ? maybe with a little delay time ....</DIV>
<DIV> </DIV>
<DIV>im not sure i understand what u want exactly :smile: </DIV>
<DIV> </DIV>
<DIV> </DIV>
Re: Return objects to their spot? Posted by DrGlass on Wed Dec 15th 2004 at 2:34am
DrGlass
1825 posts
Posted 2004-12-15 2:34am
DrGlass
member
1825 posts 632 snarkmarks Registered: Dec 12th 2004 Occupation: 2D/3D digital artist Location: USA
ok, I want my prop_physics, for example a barrle to return or respawn
to its original position only when it falls into an area of my map that
is unreachable by the player.

the example is, a player shoots the barrel over the edge of a cliff
into water. There is no way for that barrle to be retraived by a
player becuase if they go off the cliff they will die.

the use of respawnable props would make this possible, only problem I dont want them to respawn unless they fall off the cliff.
Re: Return objects to their spot? Posted by Nanodeath on Wed Dec 15th 2004 at 2:38am
Nanodeath
356 posts
Posted 2004-12-15 2:38am
356 posts 66 snarkmarks Registered: Nov 11th 2004 Occupation: Student - Bioengineering Location: Seattle, WA, USA
You could give the barrels like 10,000 life, and have a trigger hurt that only affected physics objects and do...1000 damage/sec? 10000 dmg/sec?
Re: Return objects to their spot? Posted by Rof on Wed Dec 15th 2004 at 5:47am
Rof
210 posts
Posted 2004-12-15 5:47am
Rof
member
210 posts 41 snarkmarks Registered: Dec 3rd 2004
How about something like this:

Put a trigger_multiple at the bottom of the cliff. Set it's "physics
objects" flag. On the output tab, set it to output: OnTrigger, target:
!activator, input: Break . ("!activator" is a special name which
sends an input to whatever activated the trigger).

Now when a prop_physics_respawnable falls into the trigger, it will be
destroyed and respawn. This method means that you don't have to have
the prop damagable by any other means.

If you want to get more fancy, you could use a filter_ ent to make sure
the trigger_multiple only fires when a certain type or named object
hits it.

If you're not using a prop_physics_respawnable as your object (say your
using a func_physbox instead), you could use a similar setup with the
addition of a point_template and env_entity_maker as a way of respawing
any entity. (Set the entity's "OnBreak" output to ForceSpawn the
env_entity_maker so it can be respawned after being destroyed by the
trigger.)
Re: Return objects to their spot? Posted by Nanodeath on Wed Dec 15th 2004 at 5:49am
Nanodeath
356 posts
Posted 2004-12-15 5:49am
356 posts 66 snarkmarks Registered: Nov 11th 2004 Occupation: Student - Bioengineering Location: Seattle, WA, USA
That's extremely handy...how did you figure out !activator?
Re: Return objects to their spot? Posted by genesisrage on Wed Dec 15th 2004 at 6:35am
genesisrage
33 posts
Posted 2004-12-15 6:35am
33 posts 3 snarkmarks Registered: Dec 12th 2004
and is there any other little tricks like that you know?
Re: Return objects to their spot? Posted by Rof on Wed Dec 15th 2004 at 7:30am
Rof
210 posts
Posted 2004-12-15 7:30am
Rof
member
210 posts 41 snarkmarks Registered: Dec 3rd 2004
That's extremely handy...how did you figure out !activator?
I've been browsing through the entities used in Valve's maps (try
opening a bsp in a text editor and searching for "worldspawn"), and
they use it quite a lot.
Re: Return objects to their spot? Posted by Nanodeath on Wed Dec 15th 2004 at 7:34am
Nanodeath
356 posts
Posted 2004-12-15 7:34am
356 posts 66 snarkmarks Registered: Nov 11th 2004 Occupation: Student - Bioengineering Location: Seattle, WA, USA
Very nice, I'll have to do that sometime. In the meantime if you find anything particularly useful you're more than welcome to post it :biggrin:
Re: Return objects to their spot? Posted by DrGlass on Wed Dec 15th 2004 at 12:21pm
DrGlass
1825 posts
Posted 2004-12-15 12:21pm
DrGlass
member
1825 posts 632 snarkmarks Registered: Dec 12th 2004 Occupation: 2D/3D digital artist Location: USA
wow! I'll try that. The map is comming along now so I'll give that a try and report back.
Re: Return objects to their spot? Posted by Rof on Wed Dec 15th 2004 at 6:36pm
Rof
210 posts
Posted 2004-12-15 6:36pm
Rof
member
210 posts 41 snarkmarks Registered: Dec 3rd 2004
The only other special targetname I've found is "!player", which presumably targets the player (for single player only?)

It's used a lot in AI related stuff, e.g. ai_relationship and
npc_antlion_template_maker, to make something friendly to the player or
to follow him.
Re: Return objects to their spot? Posted by Nanodeath on Wed Dec 15th 2004 at 8:19pm
Nanodeath
356 posts
Posted 2004-12-15 8:19pm
356 posts 66 snarkmarks Registered: Nov 11th 2004 Occupation: Student - Bioengineering Location: Seattle, WA, USA
Hmm, I thought this was just player? At least when I was testing it in HL2 DM. Maybe it's either? For that matter, maybe just activator works too.
Re: Return objects to their spot? Posted by W01f on Sun Dec 19th 2004 at 3:18am
W01f
20 posts
Posted 2004-12-19 3:18am
W01f
member
20 posts 12 snarkmarks Registered: Dec 19th 2004 Location: Canada
I tried this method, but the thing is that my prop_physics_respawnables
don't respawn! Any idea why, and how to fix this problem?
Re: Return objects to their spot? Posted by Joe-Bob on Sun Dec 19th 2004 at 3:54am
Joe-Bob
180 posts
Posted 2004-12-19 3:54am
Joe-Bob
member
180 posts 77 snarkmarks Registered: Dec 3rd 2004
Take a look at dm_lockdown, this is the method I used. You're
pretty much naming a group of objects the same thing, making a
point_template to reflect it, and then use a math_counter to spawn a
new set when all of them are gone.

As I said, take a look at how Valve does it.
Re: Return objects to their spot? Posted by W01f on Sun Dec 19th 2004 at 7:32am
W01f
20 posts
Posted 2004-12-19 7:32am
W01f
member
20 posts 12 snarkmarks Registered: Dec 19th 2004 Location: Canada
But that's not what I want. I want each individual object to respawn
once it is "broken" by the trigger on its own, not as a group.
Re: Return objects to their spot? Posted by Joe-Bob on Sun Dec 19th 2004 at 7:35am
Joe-Bob
180 posts
Posted 2004-12-19 7:35am
Joe-Bob
member
180 posts 77 snarkmarks Registered: Dec 3rd 2004
I'm not sure, then... maybe you could make a seperate template for each, and forcespawn on break.
Re: Return objects to their spot? Posted by W01f on Mon Dec 20th 2004 at 3:08am
W01f
20 posts
Posted 2004-12-20 3:08am
W01f
member
20 posts 12 snarkmarks Registered: Dec 19th 2004 Location: Canada
Well I kinda solved the problem with teleporters, though the items
don't return to their original spot which might be sorta weird...but
whatever. Unless there is some way to get each item to be teleported
back to their original spot...?
Re: Return objects to their spot? Posted by Lan on Tue Dec 21st 2004 at 3:47am
Lan
30 posts
Posted 2004-12-21 3:47am
Lan
member
30 posts 13 snarkmarks Registered: Dec 13th 2004 Occupation: evil genius Location: usa
yes please, anymore ideas? tried them, didnt seem to work.
Re: Return objects to their spot? Posted by XenNetwork on Sat Jan 29th 2005 at 7:36am
XenNetwork
58 posts
Posted 2005-01-29 7:36am
58 posts 66 snarkmarks Registered: Jan 25th 2005 Location: USA
Is there a way to make it so when a jeep falls it will respawn?
Re: Return objects to their spot? Posted by tantoedge on Tue Feb 22nd 2005 at 11:25pm
tantoedge
3 posts
Posted 2005-02-22 11:25pm
3 posts 210 snarkmarks Registered: Feb 17th 2005 Occupation: General Graphic Services Location: Canada
Create an output where upon break, a template fires after a delay. Thus you get the same object spawning after a set period of time, after it has been broken.