for a project for class, I am making a machine that constantly spawns items one at a time, at which point the player presses one of two buttons that push the item aside or destroys it.
To differentiate the items, I would like to know how to color a prop using entities. Just to give it a red or green tint.
The colors need to be randomized being either red or green, which I imagine isn’t too difficult, and disposed of as soon as they reach a brush based trigger. I’m thinking it would probably be best for there to be 3-4 items visible at all times.
Also, how would I go about making the movement of these items like a conveyor belt? So they stop and start moving every time an item is in the selection range. I don’t really want to rely on a func_push because that would look a bit ugly and awkward looking.
Also, is it possible to adjust the level of light from a source when triggered? So if I wanted a light’s intensity to be reduced by 1/3 on the fly, would that be possible?
You will probably have to make a skin for each colour, then fire the skin via the skin parameter
func_remove will remove any items in it’s boundaries
func_push is your only way of making it work properly. You could do something with func_traintrain entities and paths, but it could end up taking ages and being a little dubious if it works properly. Mate a texture for your convayor, give it an ice surface property, and use func_push to move objects on it.
Math_counter will help keep track of how many objects are spawned of each colour, and stop spawning if the counter maxes our or whatever.
You may have a single dynamic light in a source level. Other that that, the only controls you can have are light on, or light off.
For that one, you could also just use a trigger_multiple and had an output for: OnTriggered > !activator > Color > [R,G,B]. Replacing [R,G,B] with the required RGB values e.g. 255 0 0 would give you a deep red.
I’ve used this method in my cube map for coloring stuff, and although crude, is probably easier.
I like that idea, as it would definitely save on engine strain I think, but you will also be able to go down to the houses, where some information will also be made available.
Actually, is it possible to make the texture on a prop emit light, like a glow? Because I may just model window frames with an ‘on’ skin and an ‘off’ skin. Although will that also make the frame glow, or just the glass?
[editline]11th April 2012[/editline]
Also, is there a way to change the skin of a static or physics model?
Doesn’t seem like there is a name to refer to it.
I’m trying to change the Ep 2 white monitor’s off skin to the green glowy text ‘on’ skin.
I’ll use a dynamic prop for now, but I would prefer to use the other model.
I’m trying to get a trigger_multiple to randomly choose between coloring a physics prop red or coloring it green.
What I would have had so far would have been to put both choices in a logic_case so that when the paper goes through the trigger_multiple the logic_case would randomly decide if the trigger colored it:
255 0 0 or
0 255 0
What I hoped to achieve was this:
On Triggered - logic_case -pick random shuffle
OnCase1 - Trigger_multiple- Color - with an override of 255 0 0
OnCase2 - Trigger_multiple- Color - with an override of 0 255 0
But this does not seem possible. Any other way to do this? I have another idea, but it will involve two trigger multiples, one being disabled and then enabled again.
For example, If I have one red item spawn from the red spawner, I want to unlock the red button and lock the green button.
Likewise, if a green item spawns from the green spawner, I want to lock the red and unlock the green.
[editline]15th April 2012[/editline]
Ah, I see. Is there a way to do it with less entities? Right now I have 2 templates and spawners, one for each color.
[editline]16th April 2012[/editline]
Alright, well I ‘figured it out’ again, but I feel like a big goofy jackass, because I just used two different logic_cases with one case in each.
I’m not all that familiar with entities so I would appreciate it if someone could point me in the direction of a better method/entity set so I don’t feel like an idiot with a million logic_cases floating around.
It helps if you think about it logically from start to end.
So…you have a trigger to start an event. That causes a prop of a random colour to spawn.
So, trigger linked to ONE logic_case. Each case is linked to a point_template, each is spawning a named crate (red_crate, green_crate). You can use the onspawned entry in the point_template to change the colour of each crate. Also in the case for the spawn of each item, you can run your locking and unloacking of buttons. You can have multiple entries per case.
All right, I’ll keep that in mind when I look at it again this morning.
On a slightly unrelated note, how do I make my own soundscapes? Or how do I play a single sound that is not looped? For example, I have the voice recordings of someone who was interviewed that I want to be played when the player hits a button.
What is involved in importing your own soundscapes?
OK, I have a question about setting a timed cycle in motion where each start is initiated by the player.
So for example;
The player hits a button. Then like 2 seconds later a light goes on and a few events happen, and then 2 seconds later a similar event happens in another spot, and then after another 2 seconds another thing happens.
The cycle runs ONCE, until the player hits a button. I’m thinking I need logic_timers. Although I have a sneaking suspension this could also just be accomplished via delaying the output.
So that when something happens the receiving entity would have to wait 2 seconds before it could do something with the information.