How To "choose 3 Of 5 Hives"
tommy14
Join Date: 2002-11-15 Member: 8839Members
<div class="IPBDescription">about randomizing a map</div> i was planning to do a 3 out of 5 random choose for hives. the thing is, how do i get rid of the extra 2 hive entitys? (<i>i want to keep the res nodes there, just get rid of the extra hives.</i>)
i tried to KILL them, that did not work.
i suppose i could put a door/momentary wall that could cover them, but i do not like that. what if the engine decided to pick that hive to start with anyway?
i haven't tried to de-render yet, but i was wondering if anyone else had any ideas?
<i>it seems easier to get rid of an extra cc than it is to get rid of an extra hive....</i>
i tried to KILL them, that did not work.
i suppose i could put a door/momentary wall that could cover them, but i do not like that. what if the engine decided to pick that hive to start with anyway?
i haven't tried to de-render yet, but i was wondering if anyone else had any ideas?
<i>it seems easier to get rid of an extra cc than it is to get rid of an extra hive....</i>
Comments
Use some trigger_relay , multisource, env_global:
For locking areas choose func_door or a toggleable func_wall + trigger_once
The biggest problem is that hive and Command Console entities have no names , so you cant kil lthem with triggers <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad.gif' border='0' valign='absmiddle' alt='sad.gif'><!--endemo-->
<b>Solution one: let the aliens choose by build, automatic close:</b>
Now you have the possible Hives: A B C D E
and the simple rule is, that if 3 hives are up, the hives that are not build will get unbuildable.
"unbuildable" is just possible by a door that locks the hive. (important that this door kills anything below so you cant keep the door open.
Now theres the small problem...; if the locking door does not close fast enough and you build 5 hives at the same time.
Simply make a trigger_hurt field in the locked area. inside this trigger_hurt area, are all spawn points of this hive, so if you use this exploit you will just get aliens that die at their spawn point.
But there MUST be a weld to open button that opens ANY hive locking door /or/ a window you can shoot but not walk through -- to prevent the exploit of building hives at same time -> making senseless hives (you die in spawn field) but this hive would not be destroyable.
no more exploit problems, back to triggering.
You must do it from the view of the possible hives:...
Each hive must be lockable and this must be triggered when 3 of the other hives are build.
complicate but realizeable...
<b>Solution 2, let anyone choose by closed door, automatic open:</b>
same as above, but here each hive is locked from the beginning and you can open each hive from inside (or outside).
If 3 hive doors are opened you cant open the other 2 hives anymore.
advantages:
You dont need a trigger hurt or killing, door here. Whole triggering is simpler and easy...
Disadvantages:
Marines can open (and so trigger-close the other) hives, too. prevent this by placing the open button were just jetpacks and aliens reach to.
<b>Solution 3 trigger_random chooses, lock (and open).</b>
make doors that do not close automatically (delay b4 close = -1) and let some trigger randoms close 2 of them at game start.
Problem: IF the start hive is one of the random-closed hives:
Make an button (trigger_once ?) inside of each locked hive section, that opens this hive from inside and closes one of the other open hives (randomly) therefore.
wich one do you want?
maybe i do a demo file for Valve.HE.
Avoid trying to block hives and all the exploits that opens up, make the hives not even exist until they're created after the map is loaded on the server, but most likely before any players can even spawn into the map.
Brute-force construction detail that'll chew up around 30 entities:
Requires five 'gates' like I described in another post, but will detail again here:
Build a small hollow box outside the level somewhere, place two buttons at one end that are both triggered by 1 point of damage.
At the other end of the box, lined up with each of the buttons and pointed at them, place two shooters, the kind you could use to make traps, not the kind the player can normally control. :-) Put the same targetname on them both, so they'll be triggered together.
Now, in the middle of the box, place a small door that covers one of the buttons, and if it's triggered, covers the other button. Make the door toggleable, and forever waiting.
Next, the buttons and how to tag them. You're going to use three random-target-pickers to trigger this chaos, but stagger the timings so they don't trigger at the same time, using delays and such-not.
Assuming you layed out the boxes from top to bottom, and named the shooters Hive1, Hive2, Hive3, Hive4, and Hive5, with the topmove button being REVEALED inside the box when the map starts:
SpawnHive1
Hive2
SpawnHive2
Hive3
SpawnHive3
Hive4
SpawnHive4
Hive5
SpawnHive5
Hive1
Now, what this does, is let you have all three of the trigger-random's simply pick a hive, truly, at random. If that hive has already been spawned in once, the 'box' will know this, and try to spawn the next one in sequence in instead. Make sense? :-)
Best part is, while it's a little tricky to set up and chews up around 30 entities, it's exploit-proof since the other hives truly don't exist. And in fact, you can use the SpawnHive keys to make parts of the level fall away or change with far more reliability than the built-in OnHiveSpawn and what-not keys. :-)
<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
HOW do you "spawn in" or create a hive spawn entity AFTER the map has loaded? like Ollj says, hive spawn entitys do not have names?
(and where has this been "shown"?)
this is info i REALLY would like to know - it is MUCH easier to control a build than to kill a hive spawn entity, i would think. unless i am misunderstanding you, WolfWings?
<i>i must have missed the discussions/tutorials about "SpawnHive" and "OnHiveSpawn" and other keys....</i> <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad.gif' border='0' valign='absmiddle' alt='sad.gif'><!--endemo-->
btw, <b>thanks very much to both of you for replying. </b> <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' valign='absmiddle' alt='smile.gif'><!--endemo-->
to clarify, i do not need help with the randomizer - i was going to use a method similar to WolfWing's, although i had considered Ollj's letting aliens choose method.
the crux problem was the actual control of how to build a *specific* hive, or how to kill it WITHOUT allowing map exploiting that using door type blockages might lead to.
<i>btw, i tested: de-renders do not work, due to the lack of hive names. duh!</i>
In each of the hive there is a trigger once. The trigger once targets the door for that hive. The door opens.
This door is then killtargeted so it cannot be triggered again.
So you have one open hive area and 4 closed ones.
Then have it trigger 2 of those trigger random things, now i do not know how these work as i've never done anything ns mapping related.
First one then other.
And set it so say it triggers door3. those door opens, it killtargets the trigger once so that it cannot close the doors.
And then it does the same again for the other hive.
Thinking about that though that wouldn't work. I wonder if there is a reduncay tag, or something that could be used as it. If it tries to target something, but it cannot, as it has been removed, then instead it tries to target the next thing, with that it would be easy to get multiple hives into a game.
Um... that's a big pile of hard-to-read English, isn't it? :-) I'll make it simpler, try the monster spawner, or any other entity that can spawn another entity by type, and use that.
If that works, you can possibly let the aliens pick their second two hives from the four remaining and just pick the first one from the five positions at random.