• Removing Traitor Buttons When Object Breaks?
    3 replies, posted
I'm editing dm_richland to turn the traps into traitor buttons so innocents can't rdm with them. I don't want to completely decompile the map because I've been told that this can kill performance so instead I'm using an entity editor to edit the map in text form. I've added a traitor button in place of the standard button but I wanted to make it so players can break a fake button to disable the trap. I've gotten it to work so breaking the fake button will turn off the trap but I can't get it to remove the traitor button. Does anyone know a way to problematically remove traitor buttons? Heres the code for the fake buttons that innocents can break to disable the trap, see the part that says "OnBreak" SOME_FUNCTION_TO_REMOVE "apt6_basement_tbutton" [CODE] { "model" "*42" "targetname" "apt6_basement_breakable_button" "origin" "531 -228.2 70.5" "spawnflags" "1056" "unlocked_sentence" "0" "locked_sentence" "0" "unlocked_sound" "0" "locked_sound" "0" "wait" "3" "sounds" "17" "lip" "3" "health" "100" "speed" "15" "movedir" "0 0 0" "disablereceiveshadows" "0" "rendercolor" "255 255 255" "renderamt" "255" "rendermode" "0" "renderfx" "0" "classname" "func_breakable" "OnBreak" "apt6_traptrigger,Disable,,0,-1" "OnBreak" "apt6basementlaser1,TurnOff,,0,-1" "OnBreak" "apt6basementlaser2,TurnOff,,0,-1" "OnBreak" SOME_FUNCTION_TO_REMOVE "apt6_basement_tbutton" } [/CODE] The code for the traitor button. [CODE] { "spawnflags" "0" "targetname" "apt6_basement_tbutton" "origin" "531 -228.2 70.5" "description" "Arm the basement trap" "classname" "ttt_traitor_button" "hammerid" "2730" "OnPressed" "apt6_traptrigger,Toggle,,0.2,-1" "OnPressed" "apt6basementlaser1,Toggle,,0,-1" "OnPressed" "apt6basementlaser2,Toggle,,0,-1" } [/CODE]
kill?
[QUOTE=Stiffy360;44695235]kill?[/QUOTE] Apparently I screwed up when I tried doing that last night. This worked perfectly, thank you.
Remember to rename the map and recompile cubemaps, otherwise you'll have conflicting map versions.
Sorry, you need to Log In to post a reply to this thread.