resetting func_button Created 19 years ago2004-06-09 16:51:11 UTC by niellennium niellennium

Created 19 years ago2004-06-09 16:51:11 UTC by niellennium niellennium

Posted 19 years ago2004-06-09 16:51:11 UTC Post #31869
Hey kids !
I was juss wondering; I've created a square floor, which is divided in, say, 16 squares (kindda like a lightning 80's dancefloor). Each of the 16 divisions, holds a func_button. When the player enters one of the squares, he activates the button, which starts a series of events (never mind what for now). What I want 2 achieve, is that when the player enters a square and just stays on one of the floorbuttons, the event is triggered once, then when the player leaves the floorbutton, the button is reset, so it will activate the events again if player retriggers the button. The problem is that when the player stays on the button, it keeps retriggering - of course I could mess around with the crappy "delay before triggering" thing, but that's just not good enough. The player should be able to stay there 4ever if he so desires. Anyone has some thoughts on that - it'd be much appreciated.
-Another question by the way; Does the TE_DLIGHT script, work better than the ordinary lights (on/off switch), does it make brushes cast shadows ? I mean, those ordinary "dynamic" lights looks pretty dull, me thinks.....!? :|
Posted 19 years ago2004-06-09 16:51:55 UTC Post #31870
Kids? I'm not a kid
m0p m0pIllogical.
Posted 19 years ago2004-06-10 01:36:45 UTC Post #31931
TE_DLIGHT script?

Anyway: maybe set the button to "toggle"? Surround it with triggers?
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 19 years ago2004-06-10 02:56:02 UTC Post #31950
'kids'... yeah right...

As for the resetting of the trigger, Spirit features a trigger_inout wich may be just what you need here, but it's possible with plain HL too. Although it's a bit complex... :)

Let the floorbutton trigger a multimanager, wich triggers the serie of events you want. But that multimanager also has to trigger an env_global that sets the master of that floorbutton to off, so the button doesn't work anymore. You should set this master to on again only when the player has left the floorbutton, e.g. you place a trigger around this button so that the player goes trough it when he leaves the button. This trigger activates an env_global that sets the master of the floorbutton to on. This would set the button to useable again so when you go back you trigger the events again.

I just tested it out and it worked, 6 entities to get one floorbutton operational. You may need to tweak it a bit but it'll do it.

Oh, and TE_DLIGHT does not cast shadows.
Posted 19 years ago2004-06-10 04:14:09 UTC Post #31957
Hey thanks for the, as allways in this wonderful forum, fast replies.... Sorry m'bout the kids stuff....Looks like I may have unintentionally provoked the pride of the powerful men/women that roam this forum. All I can say is: What makes a man, is it the power in his hands - is it his quest for glory.......Is it the way he fights every day - so that we can know his story....?:)

I'll check out the Captain P way of doing things - sounds like a logic way to go about it.... Does Spirit have better lightning options than the regular HL ?
Posted 19 years ago2004-06-10 05:04:06 UTC Post #31965
Seems you just have to tweak your lighting. Remember that HL uses a 5-years old engine, based on the old Quake engine. Dynamic shadows aren't quite possible. Well, maybe you can fake some things but that's always to some extend.

As for the kids stuff, it's just not a good idea to insult people that can help you. After all, we don't have to help you... :)
Posted 19 years ago2004-06-10 05:51:13 UTC Post #31967
Aiight - just installed the spirit mod, it seems to hold some rather amazing new entity possibilities (at least that I wasn't aware of). The trigger_inout works like a charm. Thanks Captain P - and again, I can't stress enough how sorry I am about - U know what ! It'll never happen again - and I sure appreciate the help I recieved !!! :)
Posted 19 years ago2004-06-10 06:09:09 UTC Post #31969
Spirit is amazing yes, the only trouble is the lack of tutorials on the net. However, their forums are great so join if you need help.
AJ AJGlorious Overlord
Posted 19 years ago2004-06-10 15:10:56 UTC Post #32084
Ah, no problem, niellennium. :)
You must be logged in to post a response.