Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

trigger question

Page: 1 of 1
 vas_zag
04-04-2004, 11:48 AM
#1
is it possible that i can make it so when i walk into the triger brush it fires the target and when i come out of the brush it fires the target again?
 mslaf
04-05-2004, 7:17 AM
#2
You can do it but you need two triggers and target_activate and target_deactivate entities.

Create the first trigger to work when you're inside and the second one around it. Set an inactive flag in the second trigger.

Connect (target) the first one to target_activate and connect the target_activate to the second trigger: The second trigger will be activated when you're inside the first trigger.

Then connect the second trigger to target_deactivate and target_deactivate back to the second trigger: The second trigger will spawn targets and disable itself.
 WadeV1589
04-05-2004, 11:55 AM
#3
^ That will only work if no-one else can comes near you otherwise they could trigger the second trigger.
 mslaf
04-05-2004, 12:26 PM
#4
Yes it's a trick that will work in SP but not necessarily in MP. I think, you can't do it in MP because there's no way to assign entities (like a trigger) to particular players.
 WadeV1589
04-05-2004, 12:58 PM
#5
Actually maybe...my Icarus is still in the raw stage so I'm not sure but can you use the "SET_PARMx" on a player? If so you could set one of the parameters to "1" or something and check for that on the exterior trigger.
 mslaf
04-05-2004, 1:19 PM
#6
It will not work with Icarus because of the same reason it doesn't work with the standard triggers. To make it work the Icarus should support a kind of "private/local" variables separate for all players. Unfortunately it doesn't and all the variables are global.
 vas_zag
04-06-2004, 6:02 PM
#7
hmm wellill try and explain what im trying to do:
basically theres a dance floor (MP map) made up of medium size colured squares, for each square i have 2 func_useables, one covered with a normal colour texture and the other covered in the same colour but it is a glowing shader.
what i want is when teh player walk over a sqaure it 'lights' up and when the player moves off it goes off
kinda like in that micheal jackson music video 'billie jean' i think...
anyway is it possible at all?
:confused:
 WadeV1589
04-07-2004, 7:44 AM
#8
Not all parameters are global in Icarus, SET_PARM1-8 is there to allow you to store/get data on a per-entity basis.
 mslaf
04-07-2004, 9:46 AM
#9
I think they're created to allow to pass non static arguments to more generic scripts rather that supporting the local variables. It'd be on overcomplicated mess, nevertheless it could work.

Coming back to the main problem: the "dancing" floor. I'd do it with a transpadent/nonsolid door in the middle of each square instead of a trigger. That door will spawns the func_usable when you're close enough and spawns again when you're off. If it doesn't work you can leave the trigger above the square and target the trigger on the door and the door on func_usable:

-When you're inside the trigger, it will spawn the door (it will be spawning all the time) then the door will spawn the func_usable.

-When you're off the trigger it will not spawn the door and the door will spawn itself the “closetarget”ed func_static.
 vas_zag
04-07-2004, 12:14 PM
#10
:confused: confusing hope it works
do i have to set a wait value for the door i mean will it just go back into place once ive moved out of its way?
 mslaf
04-07-2004, 6:46 PM
#11
do i have to set a wait value for the door i mean will it just go back into place once ive moved out of its way?

The solution is not perfect. Set a wait time to 1 or 0 - not sure if "0" works.
 vas_zag
04-07-2004, 7:19 PM
#12
the solution is near perfect:D
i set the wait time to 0 and i still takes a small time to move back once ive moved off the square but it looks pretty nifty none the less, thanks a bunch
now i cant get the glowing texture to work :confused:
here an example of the shader code for one of the squares...

textures/vas_party/disco_purple_glow
{
qer_editorimage textures/vas_party/gradient3
surfaceparm nomarks
surfaceparm trans
q3map_nolightmap
{
map textures/vas_party/gradient3
glow
rgbGen const ( 0.501961 0.000000 0.501961 )
tcMod stretch noise 1 0.1 0 1
}
}

is there a reason why it shouldnt glow cos i dont see it glowing..
 WadeV1589
04-08-2004, 12:06 PM
#13
The glow command is to make the shader glow if you do r_dynamicglow 1 in the console.
 vas_zag
04-08-2004, 8:12 PM
#14
ah that must of been the problem i think my .cfgs keeping messing about with me
anyway thanks a bunch guys:p
Page: 1 of 1