turning func_invisible_user off


(mazdaplz) #1

hi im using a func_invisible_user linked to a target_smoke

when i press the button the smoke comes out and its great.
however the smoke doesnt stop until i press the button again

i want the smoke to go on for a few secs and then stop. how could i do that??? thanks in advance


(kamikazee) #2

I think you can do it script or entity based.

Here’s how you could do it entity based, though I have not tested it:
-Give the func_invisible_user a “delay” key/value, take 4 seconds.
-Give it a “target” key with value “smoketargets”
-Give the target_smoke a key “targetname” with value “smoke”
-Add a target_delay and a target_relay, give them both a “targetname” key with value “smoretargets”
-Give them both a “target” pointing to “smoke”
-Give the target_delay a “wait” key whose value is 1 smaller than the f_i_u’s “delay” value, here “3”.

Now it might work. The f_i_u triggers both entities. The target_relay immediately starts the smoke. 3 seconds later, the target_delay will turn it off again.

If you want to do it with scripting (which allows you to change the smoke duration from 1 spot), I’ll need to write another explanation.

If you prefer script, just shout.


(nUllSkillZ) #3

You could try to use “wait TIME_IN_MILLISECONDS” and then “alertentity TARGETNAME”.
You should also check if the smoke is on already with an accum.


(mazdaplz) #4

amazing! i tried scripts but they didnt work…

then i tried kamikazes solution and it worked GREAT! you rule man :smiley:
thanks so much


(murka) #5

with script you can go beyond your dreams. like if you want short puffs of smoke make a simple script.

name the smoke entity targetname smoke
link the button to a target_script_trigger.
give the target_script_trigger scriptname smoker and target activate
that all for radiant part

now scripty


smoker
{
    spawn
    {
        accum 1 set 0
    }

    trigger activate
    {
        accum 1 abort_if_equal 1
        accum 1 set 1
        alertentity smoke
        wait 25
        alertentity smoke
        wait 300
        alertentity smoke
        wait 25
        alertentity smoke
        accum 1 set 0
    }
}

simple as that. now u can experiment with it and change delays. make even more smoke entities, just give a targetname and in the script if u write alertentity and the targetname it will trigger it on/off


(DerSaidin) #6

This may sound stupid, but you only have 2 posts…
Do you have a script_multiplayer for the game_manager?

murka10’s way is the best, imo, and you’ll need to learn how to script sooner or later :stuck_out_tongue:


(murka) #7

every map needs 1 and only 1 script_multiplayer. that needs a scriptname game_manager. in the script you define the respawn times, gametime etc