A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE Technical / Map Design »Help with script to open door

Author Topic: Help with script to open door (3 messages, Page 1 of 1)
Moderators: Dennis

steven0320
Joined: Jul 30, 2016


Posted: Jul 30, 2016 10:30 PM    Msg. 1 of 3       
Hello, I am currently working on a new map, I decided to make a secret room that is underwater, but I also wanted to place a blast door and be able to lock it from inside. Since I want it to be unlocked at first and then lock it using a switch, I would need to make a script that sets power to 0 at the beginning of the game, and then when someone activates the switch to change the power to 1. I have heard that to do this I need to use scripts that lock/unlock the door itself and another script that syncs it between clients and host. I have tried looking for guides, videos, and tried writing the script myself, but still have not being able to make it work. Could someone show me a basic script to change the power of a device using a switch. Thanks.


Super Flanker
Joined: Oct 5, 2012

The length of your life depends on my aim.


Posted: Jul 31, 2016 07:47 AM    Msg. 2 of 3       


steven0320
Joined: Jul 30, 2016


Posted: Jul 31, 2016 03:22 PM    Msg. 3 of 3       
Hello, thank you for the link, I tried sargejohnson's script but I dont get the "press e" when I stand infront of the switch, it might be missing the trigger volume. I already added the trigger volume but dont know how to add it to the script. This is the script I'm using.
Quote: --- Original message by: sargejohnson
Like this?


(script continuous door
(if
( = (device_get_power door_control) 1)
(device_set_power door_test 1)
)
(if
( = (device_get_power door_control) 0)
(device_set_power door_test 0)
)
)

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 1:32 AM 125 ms.
A Halo Maps Website