Gunrock Posted April 10, 2020 I want to make a fountain that can be turned on an off through a simple switch on a wall. How can I make this decorate blood fountain activate and deactivate via a simple switch? ACTOR FountainBlood 13002 { Radius 2 Height 2 Scale 0.75 RenderStyle Translucent Alpha 0.75 +NOBLOCKMAP +MOVEWITHSECTOR States { Spawn: BFOU ABCD 3 Loop } } 0 Share this post Link to post
Nevander Posted April 10, 2020 (edited) What I would do is give it a SpawnID and then make the switch run a script. The script will simply toggle which action it should do. Make a variable which checks if the fountain is on, if so, remove the actor. If it's off, spawn the actor at a MapSpot. Example: int fountainState = 0; script "ToggleFountain" (void) { if(fountainState == 0) { //spawn at mapspot with a tid fountainState = 1; } else if(fountainState == 1) { //remove with the tid fountainState = 0; } Delay(1); } 0 Share this post Link to post
Jaska Posted April 10, 2020 (edited) There is also another way. You can use this as an example. https://www.realm667.com/index.php/en/prop-stop-mainmenu-163-64831/technical-mainmenu-164-44115/852-switchable-tech-lamp Spoiler ACTOR TechLampOff : SwitchableDecoration 90 { //$Category Light Radius 16 Height 80 +SOLID +USESPECIAL Activation THINGSPEC_Switch States { Active: TLMP A 0 A_PlaySound("switches/normbutn") // Fall through Lit: TLMP ABCD 4 Bright Light(BIGLAMP) Loop Inactive: TLMP E 0 A_PlaySound("switches/exitbutn") // Fall through Spawn: TLMP E -1 Stop } } ACTOR TechLampOn : TechLampOff 91 { //$Category Light Activation THINGSPEC_Switch|THINGSPEC_Deactivate States { Spawn: Goto Super::Lit } } Then use switch with action 130 "Activate thing" with a same tag with your fountain. Or deactivate it with action 131 "Deactivate thing" So here it is ACTOR FountainBloodOff : SwitchableDecoration 13002 { Radius 2 Height 2 Scale 0.75 RenderStyle Translucent Alpha 0.75 +MOVEWITHSECTOR +NOBLOCKMAP +USESPECIAL Activation THINGSPEC_Switch States { Active: BFOU A 0 // Fall through TurnOn: BFOU ABCD 3 Loop Inactive: TNT1 A 0 // Fall through Spawn: TNT1 A -1 Stop } } ACTOR FountainBloodOn : FountainBloodOff 13003 //assuming doomednum 13003 is unused { Activation THINGSPEC_Switch|THINGSPEC_Deactivate States { Spawn: Goto Super::TurnOn } } 0 Share this post Link to post
Gunrock Posted April 10, 2020 It worked.... flawlessly!!! Thank you!!! You guys are amazing! 0 Share this post Link to post
Gez Posted April 10, 2020 Note that in Jaska's example, you can activate/deactivate the fountain by directly using it. See Activation property and USESPECIAL flag. 0 Share this post Link to post
Jaska Posted April 11, 2020 12 hours ago, Gez said: Note that in Jaska's example, you can activate/deactivate the fountain by directly using it. See Activation property and USESPECIAL flag. That's true, so remove "+usespecial" flag. However, "+NOBLOCKMAP" flag seems to prevent use actions anyway. 0 Share this post Link to post