ReX Posted September 17, 2000 I have 3 lines, each of which can trigger an earthquake effect. I've set up the lines to be one-time only (i.e., non-repeatable), activated when the player crosses. The quake effect works just fine. Now, I want to set it up so that once the player has crossed any of the 3 lines, the other two lines become inactive. That is, there will be only one quake, regardless of which line the player crosses. Thanks. 0 Share this post Link to post
mechasam Posted September 17, 2000 can u email me the script you used for the quake? the complete script 0 Share this post Link to post
TheProphet Posted September 18, 2000 Let all linedefs trigger a script like this one: <snip> int quake_has_happened; script 100 { if (!quake_has_happened) { quake_has_happened = 1; // do the quake or whatever you want to do } } </snip> By definition the global variable quake_has_happened is initialized as 0. After the script is executed the first time, the quake_has_happened is set to 1, so the script won't run again. Simple as that :-) 0 Share this post Link to post
Wildman Posted September 18, 2000 Another option is to use the clearlinespecial on the lines when any line is crossed. 0 Share this post Link to post
boris Posted September 20, 2000 Don't make the lines trigger the earthquake directly, but make use the "line_setidentification" special to assign an id to the lines (all lines same id). The use an open script and put the line "setlinespecial([idofline], 80, 0, [scripttoexecute], 0);" in "scripttoexecute" write "Radius_Quake (intensity, duration, damrad, tremrad, tid);" also add the line "setlinespecial([idofline], 0, 0, 0, 0);" This will make all lines become inactive once one of them is triggered. At least I hope so :) 0 Share this post Link to post
Recommended Posts