entity & gunsparks


(Igloo) #1

Hello,

I need to know which entity can repeat the sparks routine? I tried to use the func_timer connected with gunsparks, but it seems to be wrong.

Frequency: 0.4 seconds

Anyone? :smiley:

Greetings,
Igloo


(S14Y3R) #2

Hi, before you try the target_script_trigger, is your func_timer set to ā€œstart onā€? it might just be that its not on.

I think you need to use a target_script_trigger with ā€œtarget runā€ key. target your func_timer to the target_script_trigger, then the target_script_trigger will alert your gunsparks in script.


gun_sparker //target_script_trigger
{
    trigger run
    {
        alertentity gunsparks_targetname
    }
}

that should work. gl.


(Igloo) #3

Hmm, doesn’t work… Hmm I need it, it’s really urgent. If you would check it yourself and share with a working solution. [no effects/no errors I mean]

Thanks anyway.

Greetings,
Igloo


(S14Y3R) #4

k, I just tested a func_timer targetting a props_gunsparks and it does work.
After I turned on my wolfparticles that is… doh.

seta cg_wolfparticles ā€œ1ā€ needs to be on to see the sparks
also make sure your timer is set to ā€œstart_onā€.

this is what I just tested, map:


// entity 1
{
"classname" "props_gunsparks"
"origin" "128 48 -96"
"health" "30"
"speed" "50"
"targetname" "spark"
}
// entity 2
{
"spawnflags" "1"
"target" "spark"
"origin" "128 -72 -96"
"classname" "func_timer"
}

So no worries, your wolfparticles are probably just off. 8)


(Igloo) #5

Cool, works. Don’t know what I was doing wrong, but nvm.

The only case is to let sparks be displayed not from the beginning, but a chosen moment. And after some period stop the activity. I tried, but I have no alternatives more for that - haven’t ever experimented so much… :confused:

Thanks!

Greetings,
Igloo

// edit: maybe it’s possible to hide/show the func_timer [setstate]? I keep thinking still…


(S14Y3R) #6

ye, cg_wolfparticles is usually the first thing turned off for fps improvement.

Obviously, don’t have it ā€œstart_onā€ and ā€œalertentityā€ the func_timer to switch it on later. Lots of noob tutorials in the sticky on how to go about it.


(Igloo) #7

I am not a noob in mapping. \o/
It’s all I wanted to know, thx. I could manage with rest.

Greetings,
Igloo