Respawning objects Created 19 years ago2005-04-17 16:00:07 UTC by crysist crysist

Created 19 years ago2005-04-17 16:00:07 UTC by crysist crysist

Posted 19 years ago2005-04-17 16:00:07 UTC Post #104512
Lo All. I'm working on a firing range map to mess around with the different weapons in the game. My question: Is it possible to make a breakable object that respawns after say 5 to 10 seconds? For instance you shoot the target and it breaks then a few seconds later it respawns so that you don't have to restart the map after destroying all the targets.

Thanks in advance.

PS: working with Counter-Strike: Condition Zero
Posted 19 years ago2005-04-17 16:19:57 UTC Post #104518
Unless they added anything special in CZ, I can't say I can see how this would be possible without code.
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 19 years ago2005-04-17 16:22:11 UTC Post #104519
oh well thanks anyways. Guess i'll just have to not be lazy and restart the map from time to time heh
Posted 19 years ago2005-04-17 16:32:32 UTC Post #104524
You could make object a 'shootable' func_door--set health field to something > 0--, that would rotate or slide out of view when shot. Then, just set the 'Delay before reset to' field to 5-10 seconds.

It's not breakable exactly, but all i can think of atm.
Posted 19 years ago2005-04-17 18:42:30 UTC Post #104544
rowleybob, I think you would want an env_shooter to simulate gibs, too.
Posted 19 years ago2005-04-17 18:45:06 UTC Post #104546
Awsome idea! This is getting interesting...I'm envisioning an old penny arcade shoot 'em up gallery.
Posted 19 years ago2005-04-17 18:47:35 UTC Post #104548
Maybe an accompanying ambient general too...
Posted 19 years ago2005-04-17 20:00:39 UTC Post #104559
Decompile cs_italy.
Posted 19 years ago2005-04-17 20:09:51 UTC Post #104561
He wants the targets to re materialize every 5-10 seconds not every round...
Posted 19 years ago2005-04-18 01:19:21 UTC Post #104588
Plus, WCD, I think los pollos were monsters, in fact.
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 19 years ago2005-04-18 08:51:34 UTC Post #104620
i like the door idea and might have something that'll work. I'll post the results
Posted 19 years ago2005-04-18 08:56:58 UTC Post #104621
I did an example map for this a while ago, with only a bull's eye being counted. Click my name and look at My Maps at the bottom and you can find it. Just if that'd be helpful.
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 19 years ago2005-04-18 09:10:43 UTC Post #104624
ok I made a func_door_rotating and set it to rotate on the y axis. Then i placed a duplicate brush in front of it and set it as func_button and health 1 and target the func_door. when you shoot the button the door rotates perfectly and closes itself after 4 seconds. Now all i need is a transparent texture which i have no idea how to do.
Posted 19 years ago2005-04-18 09:30:53 UTC Post #104633
Use the {INVISIBLE texture, and set the button's render mode to Solid and FX Amount to 255.
Posted 19 years ago2005-04-18 10:36:56 UTC Post #104638
thanks
Posted 19 years ago2005-04-18 12:36:42 UTC Post #104647
It'd be 100% more economical (literally) to use NULL instead. You don't need to adjust the render settings when using NULL.
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 19 years ago2005-04-18 18:47:11 UTC Post #104708
Isnt it a func_guntarget entity or something, i think i have seen it (Not sure though) ;)
Posted 19 years ago2005-04-18 18:48:04 UTC Post #104709
That was standard hl1 when i think :confused:
Posted 19 years ago2005-04-18 19:05:37 UTC Post #104711
That's interesting Seventh, I didn't know you could do that, but it makes sense.

Also I apologize for not mentioning that you needed the func_button to go with it. Actually, I thought it would work without it, but I just tried it, and no joy without func_button, with flags "don't move" and "touch activates" checked. If you don't check "don't move" flag, there is a delay for the item to 'break.'

What's also interesting is you can make the button really big, or really small, to require a direct hit for your 'breakable' item.
Posted 19 years ago2005-04-18 19:07:07 UTC Post #104712
Nisse: probalby, but I haven't tested it. func_button works fine, with flags set. I will try the func_guntarget though.
Posted 19 years ago2005-04-18 19:24:59 UTC Post #104713
I tried func_guntarget, but couldn't get it to work in the short time I tried, so I'd recommend using a func_button, because it's more straightforward imo.

Also, after looking at Seventh's example, noticed that "touch activates" flag is not necessary for it to work properly.
Posted 19 years ago2005-04-18 20:50:55 UTC Post #104715
func_button works well because i'm setting one for the torso and another for the head. I may be overstepping my abilities since this is my first map but i plan to set up an env_global to keep score. Each button will target a mult_manager to add to the global counter based on torso or head shot (1 point or 2) and i'll have a scorecard on the wall just for fun. The multi_manager will trigger the door.
Posted 19 years ago2005-04-18 20:52:56 UTC Post #104716
one more question. Trying to set up "equipment stations" and i can't seem to find the game_player_equip entity inside hammer

basically i'm setting up a room with a bunch of buttons that strip your current weapon and give you the new weapon.
Posted 19 years ago2005-04-18 21:36:46 UTC Post #104718
Game_player_equip and env_globals goes beyond what I know about HL entities. If I get a chance, I'll mess around with it. Pretty sweet Idea, you and a friend can target practice for points!
Posted 19 years ago2005-04-19 01:31:50 UTC Post #104723
ok got the game_playerequip working finally. Hit a button and it strips your weapons and gives you a full load of m4a1's. Now i have a problem with players spawning and the multi_manager going off. Any ideas how to stop it on a spawn?
Posted 19 years ago2005-04-19 12:44:35 UTC Post #104770
Againe, goes beyond my knoweldge... Perhaps putting this map in the 'problem maps' section with a brief, detailed description of what your trying to do, and what's going wrong, we can recruit some more help for this one. :)
Posted 19 years ago2005-04-19 14:25:29 UTC Post #104804
actually i figured it out finally. I had to set the flag "use only" on the game_playerequip entity and now its working fine. Players spawn and get stripped of all weapons then must hit a button (actually trying to find a weapon rack model) to get all the various weapons in the game.
Posted 19 years ago2005-04-19 16:14:19 UTC Post #104816
Awsome. Did you batton down the scoring aspect? I can't wait to try this. :)
Posted 19 years ago2005-04-19 22:25:43 UTC Post #104841
I havn't tested this yet but this is my idea on scoring:

each target will have two invisible buttons in front of it.
button_torso and button_head
each will point to its own multi_manager that will trigger the door to open and trigger a game_score entity to add either 1 or 2 points respctivly.

if that works well i'll then start messing around with placing text on screen and keeping track of scroes with env_globals but i want to go the simple route first.
Posted 19 years ago2005-04-19 23:46:54 UTC Post #104844
uploaded what i have so far if anyone is interested in seeing how the buttons work. Be finishing up the Armory Room and working on the actual target range thursday and friday.

Thanks for all the help
Posted 19 years ago2005-04-20 03:21:56 UTC Post #104861
I just found a tutorial by BJ that involves a 'counter' that may be useful for your map, but i've not looked at it yet, so can't be sure.
Posted 19 years ago2005-04-20 11:23:19 UTC Post #104925
cool let me know
Posted 19 years ago2005-04-23 03:12:23 UTC Post #105415
Sorry to bring up an old thread but I read this, written by 7th:
Plus, WCD, I think los pollos were monsters, in fact.
No they aren't. I ripped cs_italy for my server. The chickens are no more than a good combonation of func_breakables, ambient_generics, and env_shooters(for the feathers).
Posted 19 years ago2005-04-23 04:10:50 UTC Post #105420
I see. Ah well, they're gone now, anyway.
Seventh-Monkey Seventh-MonkeyPretty nifty
You must be logged in to post a response.