Game Modding | Call of Duty: Black Ops 3 | Radiant
iamKxcper:
I'm making a zombies map and i'm not really that good in scripting, does anyone know how i can make multiple triggers where i have to press my interaction button and when I've pressed all of them a door opens/disappears?
Also is it possible to make it that when i press the button it plays a sound?
Spiki:
Didn't test but should work. Something like this: button_trig is the targetname of the triggers button_door -targetname of the doors (!!!script models/brushmodels!!!)
threadbuttons();functionbuttons(){buttons=GetEntArray("button_trig","targetname");doors=GetEntArray("button_door","targetname");level.door_buttons=0;foreach(butinbuttons)butthreadbutton_logic();while(level.door_buttons<buttons.size)//wait untill all buttons are pressed{wait1;}foreach(doorindoors){//what to do to all doorsdoorConnectPaths();//for zombie pathingdoorDelete();}}functionbutton_logic()//self = trigger{selfSetHintString("Press &&1 to activate");selfSetCursorHint("HINT_NOICON");selfwaittill("trigger");level.door_buttons++;}
iamKxcper:
Didn't test but should work. Something like this: button_trig is the targetname of the triggers button_door -targetname of the doors (!!!script models/brushmodels!!!)
threadbuttons();functionbuttons(){buttons=GetEntArray("button_trig","targetname");doors=GetEntArray("button_door","targetname");level.door_buttons=0;foreach(butinbuttons)butthreadbutton_logic();while(level.door_buttons<buttons.size)//wait untill all buttons are pressed{wait1;}foreach(doorindoors){//what to do to all doorsdoorConnectPaths();//for zombie pathingdoorDelete();}}functionbutton_logic()//self = trigger{selfSetHintString("Press &&1 to activate");selfSetCursorHint("HINT_NOICON");selfwaittill("trigger");level.door_buttons++;}
thanks! i'll try it out right now :)
iamKxcper:
okay so.. i had a problem for a second but i fixed the problem finally, after that i press the button the trigger is still there, do you know how i can make it disappear ? let's say that if button is pressed it deletes itself.
Spiki:
okay so.. i had a problem for a second but i fixed the problem finally, after that i press the button the trigger is still there, do you know how i can make it disappear ? let's say that if button is pressed it deletes itself.
functionbutton_logic()//self = trigger{selfSetHintString("Press &&1 to activate");selfSetCursorHint("HINT_NOICON");selfwaittill("trigger");selfdelete();level.door_buttons++;}
iamKxcper:
functionbutton_logic()//self = trigger{selfSetHintString("Press &&1 to activate");selfSetCursorHint("HINT_NOICON");selfwaittill("trigger");selfdelete();level.door_buttons++;}
Thank you so much for the help, this means a lot! :)