Something not explained in simple Dyno obj tutorial


(=SC=Beef) #1

What im afer is you blow obj X and when its blown, both the obj and brush Y, that in this case represents a garage door dissappears or blows up

On another note, i want a satchable destruction so i added constructible_class 2 to the script instead of constructible_class 3 for dyno…
is that wrong? because you can destroy it by guns and the track still shows when your near it =/

another Q, i have given a brush an entity, but i want to remove it now…how?


(Loffy) #2

About the first problem: I would let the death of the dynamitable objective trigger a script that basically says “hide Y”. I.e. “setstate invisible”.
For this to work, Y has to be a so called script_mover, complete with an origin bush (script_mover always needs an origin brush).

//Loffy


(Flippy) #3

What im afer is you blow obj X and when its blown, both the obj and brush Y, that in this case represents a garage door dissappears or blows up

Turn brush Y into a script - script_mover entity and give it a scriptname and targetname (both the same)
Then in the script where the death function of obj X is called do:
setstate [scriptname_brush_y] invisible
you may want to add a wait too but im not sure if this is needed…

So assuming Brush y target/scriptname is “brushY” your death function will look like this:


death
{
        wm_announce "Obj X has been destroyed!"
        wait 20
        setstate brushY invisible
}

Be sure to include a brush with the “common/origin” texture in the script_mover tho, else it wont work
(select the origin brush AND the garage door and turn them both into a script_mover at the same time)

On another note, i want a satchable destruction so i added constructible_class 2 to the script instead of constructible_class 3 for dyno…
is that wrong? because you can destroy it by guns and the track still shows when your near it =/

Constructible_class 2 is indeed for satchel, so it should not be destroyable by guns afaik…
maybe you have set a health key or something? i dunno…

another Q, i have given a brush an entity, but i want to remove it now…how?

Select it, rightclick in 2D window, select “Turn into worldspawn” (or something like that, i think its below “Make structural and Make detail”)


(FireFly) #4

What im afer is you blow obj X and when its blown, both the obj and brush Y, that in this case represents a garage door dissappears or blows up

Well, you can turn the garage door into a Script_mover and have it dissappear with the setstate command in the script. Put in a target_effect and alert it when the garage doors dissapear to get a nice exploding effect…

On another note, i want a satchable destruction so i added constructible_class 2 to the script instead of constructible_class 3 for dyno…
is that wrong? because you can destroy it by guns and the track still shows when your near it =/

constructible_class 2 in the script should work: Have a look at the 3 mg42’s in the goldrush map: all three of them are satchable…

another Q, i have given a brush an entity, but i want to remove it now…how?

If it contains a targetname you can use “kill <targetname>” within the script…


(FireFly) #5

I’m must be getting old because every time a reply to a topic lately 2 or 3 people already posted the answer…sigh


(]UBC[ McNite) #6

another Q, i have given a brush an entity, but i want to remove it now…how?

If you are asking for
a) how to remove a brush out of an entity: select the brush >> right click >> move into worldspawn
b) how to make an entity a no-entity #1: select entity >> right click >> ungroup entity (be careful you don’t have your terrain selected when you use this…)
c) how to make an entity a no-entity #2: select entity >> right click >> make it a func_group (they are entities in radiant and at compile time only, so it doesn’t matter for the bsp wether they are func_group or just brushes)

You see, it is vital that you are precise in describing what you did and what you want :smiley:

What im afer is you blow obj X and when its blown, both the obj and brush Y, that in this case represents a garage door dissappears or blows up

If you just want to let teh door disappear and never come back again, make it part of the func_explosive. Then it blows up within the explosion and is gone afterwards. You need it as a separate entity with script and stuff ONLY when you want to make it appear again, for example as a constructible.