Troubleshooting a Func_Invis_User/Script_Trigger


(Ifurita) #1

I’m trying to make a panel, where, when activated, setstate defaults a trigger_hurt

Entities


// entity 939
{
"scriptname" "sd_reset_script_trigger"
"origin" "1318 1408 404"
"classname" "target_script_trigger"
"targetname" "sd_reset_script_trigger"
"target" "sd_reset"
}
// entity 940
{
"classname" "func_invisible_user"
"cursorhint" "hint_button"
"target" "sd_reset_script_trigger"
"targetname" "sd_fiu"
"scriptname" "sd_fiu"
"delay" "1"
// brush 0
{
( 1304 1188 318 ) ( 1284 1168 318 ) ( 1284 1168 388 ) common/trigger 36 32 0 0.500000 0.500000 0 0 0
( 1242 1206 318 ) ( 1234 1214 318 ) ( 1234 1214 388 ) common/trigger 36 32 0 0.500000 0.500000 0 0 0
( 1274 1254 318 ) ( 1280 1248 318 ) ( 1274 1254 388 ) common/trigger 36 32 0 0.500000 0.500000 0 0 0
( 1220 1268 318 ) ( 1226 1274 318 ) ( 1226 1274 388 ) common/trigger 36 32 0 0.500000 0.500000 0 0 0
( 1184 1164 420 ) ( 1184 1260 420 ) ( 1312 1260 420 ) common/trigger -15 -35 0 0.500000 0.500000 0 0 0
( 1324 1262 318 ) ( 1196 1262 318 ) ( 1196 1166 318 ) common/trigger -15 -35 0 0.500000 0.500000 0 0 0
}
}
// entity 941
{
"scriptname" "sd_reset"
"classname" "trigger_hurt"
"targetname" "sd_reset"
"dmg" "5"
// brush 0
{
( 1264 1680 320 ) ( 1168 1680 320 ) ( 1168 1584 320 ) common/trigger 33 33 0 0.500000 0.500000 0 7 0
( 1168 1584 448 ) ( 1168 1680 448 ) ( 1264 1680 448 ) common/trigger 33 33 0 0.500000 0.500000 0 7 0
( 1164 1632 528 ) ( 1260 1632 528 ) ( 1260 1632 304 ) common/trigger 32 31 0 0.500000 0.500000 0 7 0
( 1396 1588 528 ) ( 1396 1684 528 ) ( 1396 1684 304 ) common/trigger -32 31 0 0.500000 0.500000 0 7 0
( 1264 1696 528 ) ( 1168 1696 528 ) ( 1168 1696 304 ) common/trigger 32 31 0 0.500000 0.500000 0 7 0
( 1152 1680 528 ) ( 1152 1584 528 ) ( 1152 1584 304 ) common/trigger -32 31 0 0.500000 0.500000 0 7 0
}
}

Script. I see the hint icon, but never get any indication that the script_trigger ever fires.


/Supply Depot Reset

sd_reset_script_trigger
{
	spawn
	{
		wait 200
		trigger self startup
	}

	trigger sd_reset
	{
		setstate sd_reset default
		wait 500
		wm_announce "button pushed, hurt brush activated  - text prompt"
		trigger self sd_ready
	}

	trigger sd_ready
	{
		setstate sd_reset invisible
		wm_announce "hurt brush invisible - text prompt"
	}

	trigger startup
	{
		setstate sd_reset invisible
	}
}

Any ideas?


(G0-Gerbil) #2

I can only hypothesise, but have you considered changing the targetname of the target_script_trigger so it differs from it’s scriptname key?
I can’t see why it would cause problems, but…

The basic set up you have should work, I just did exactly the same thing today in a test map (fiu triggering a script that hides the fiu and does something else).
What’s the output in the console with debugging on?


(Ifurita) #3

I don’t think it’s logging anything from using the FIU.

FWIW, I copied and pasted the F_I_U and S_T from another control panel that has been working fine. I setstated the trigger_hurt default and invisible thru another routine (for testing) and that worked fine. Just nothing when I put everything together


(Ifurita) #4

I don’t think it’s logging anything from using the FIU.

I do get a stream of


85850 : (n/a) GScript event: activate 
85850 : (n/a) GScript event: activate 
85850 : (n/a) GScript event: activate 
85850 : (n/a) GScript event: activate 
85850 : (n/a) GScript event: activate 
85850 : (n/a) GScript event: activate 
85850 : (n/a) GScript event: activate 
85900 : (n/a) GScript event: activate 
85900 : (n/a) GScript event: activate 

but I think that’s from other script multiples + timers I have in the arenas

FWIW, I copied and pasted the F_I_U and S_T from another control panel that has been working fine. I setstated the trigger_hurt default and invisible thru another routine (for testing) and that worked fine. Just nothing when I put everything together.


(LowLife) #5

Try to change the scriptname and targetname of the trigger_hurt to something else, as its the same as the target_script_trigger’s target. :smiley:


(EB) #6

I had a similiar problem: I solved mine by removing the second firing entity’s scripting from the main targeting script and placed it within it’s own scripting brackets. Then as a setup option for the invisible status, I setstate invisible at spawn instead of triggering the setup through spawn…I hope this made sense.


(Ifurita) #7

no luck yet. I’ll try EB’s suggestion tomorrow.


(zl1corvette) #8

I kinda doubt this is it but in your script you have a / instead of // for your comment.


(TFate) #9

Methinks he accidently missed copying one of the slashes.


(Ifurita) #10

Arrrrgh!!!

So I went retro. I used a small test map, really just a box, made a brand new func_invisible_user, brand new target_script_trigger, and a brand new hurt_brush. Wrote the script, compiled, and everything works the way I want it to. However, when I import the same three entities + script into my map, nothing. The func_invisible_user is not overlapping any other brushes or entities. I’m wondering if maybe there is a hard limit to the number of func_invisible users or something (like TOIs) that I’m butting up against.

Any thoughts?


(CptnTriscuit) #11

I can’t seem to find any info regarding a limit to func_invisible_user entities - how many do you have in your map?

Are those entities’ scriptnames/targetnames being referenced by any other routines in your script by accident? Try importing the new entities from your test map into earlier versions of the map thats messing up - perhaps you can isolate the problem that way.

btw - I put the entities and script from your first post into a test map and it worked fine. :S


(Ifurita) #12

Very odd.

It’s not an entity limit. I currently have 13 func_invisible users, the problematic one is #13. I tried deleting one of the other FIUs, still no luck. Then, I tried moving the 3 entities (FIU, TST, and Trigger Hurt) to my staging area - everything works as expected. Next, I moved the 3 entities out of the staging area and to the Frostbite arena - no luck, then to a different spot in the Supply Depot arena - no luck, then to a spot in the warehouse arena, no luck, then back to the staging area - works.

When the three entites are in the staging area, they work as planned and as they did in the test map.


(CptnTriscuit) #13

Wow…that is screwey. :confused: