Search the Community
Showing results for tags 'puzzle script'.
-
I've been having a lot of trouble with a script for a "combination lock" puzzle. Perhaps I've over-complicated it, but the idea is that depending on what pipe is open, different placeable water levels are enabled/disabled. E.g. When the highest pipe is open, the higher water will be enabled and all the lower water objects will be disabled. scn EFWaterControlCheck ; call refs for doors ref RhT ; highest pipe door ref RhL ; one of two medium pipe doors ref RhR ; one of two medium pipe doors ref RhB ; lowest pipe door ref RlB ; water exit pipe door ; call refs for placeable water tiles ref L1a ref L1b ref L1c ref L1d ref L2a ref L2b ref L2c ref L2d ref L3a ref L3b ref L3c ref L3d ref L3e ref L4a ref L4b ref L4c ref L4d ref L4e begin OnActivate ; Electrical Switch Activator ; define refs set RhT to IDoorHighRoomTop set RhL to IDoorHighRoomLeft set RhR to IDoorHighRoomRight set RhB to IDoorHighRoomBottom set RlB to IDoorLowRoomBottom set L1a to EFWaterL1a set L1b to EFWaterL1b set L1c to EFWaterL1c set L1d to EFWaterL1d set L2a to EFWaterL2a set L2b to EFWaterL2b set L2c to EFWaterL2c set L2d to EFWaterL2d set L3a to EFWaterL3a set L3b to EFWaterL3b set L3c to EFWaterL3c set L3d to EFWaterL3d set L3e to EFWaterL3e set L4a to EFWaterL4a set L4b to EFWaterL4b set L4c to EFWaterL4c set L4d to EFWaterL4d set L4e to EFWaterL4e if RhT.GetOpenState == 1 ; if highest pipe is open, set water level to highest level (4) L4a.Enable L4b.Enable L4c.Enable L4d.Enable L4e.Enable L3a.Disable L3b.Disable L3c.Disable L3d.Disable L3e.Disable L2a.Disable L2b.Disable L2c.Disable L2d.Disable L1a.Disable L1b.Disable L1c.Disable L1d.Disable elseif RhT.GetOpenState == 0 && RhL.GetOpenState == 1 ; if middle pipe is open, set water level to High level (3) L4a.Disable L4b.Disable L4c.Disable L4d.Disable L4e.Disable L3a.Enable L3b.Enable L3c.Enable L3d.Enable L3e.Enable L2a.Disable L2b.Disable L2c.Disable L2d.Disable L1a.Disable L1b.Disable L1c.Disable L1d.Disable elseif RhT.GetOpenState == 0 && RhR.GetOpenState == 1 ; if alt.middle pipe is open, set water level to high L4a.Disable L4b.Disable L4c.Disable L4d.Disable L4e.Disable L3a.Enable L3b.Enable L3c.Enable L3d.Enable L3e.Enable L2a.Disable L2b.Disable L2c.Disable L2d.Disable L1a.Disable L1b.Disable L1c.Disable L1d.Disable elseif RhT.GetOpenState == 0 && RhR.GetOpenState == 0 && RhL.GetOpenState == 0 && RhB.GetOpenState == 1 ; if low pipe open, set water level to medium L4a.Disable L4b.Disable L4c.Disable L4d.Disable L4e.Disable L3a.Disable L3b.Disable L3c.Disable L3d.Disable L3e.Disable L2a.Enable L2b.Enable L2c.Enable L2d.Enable L1a.Disable L1b.Disable L1c.Disable L1d.Disable elseif RhT.GetOpenState == 0 && RhR.GetOpenState == 0 && RhL.GetOpenState==0 && RhB.GetOpenState==0 && RlB.GetOpenState==1 ; if only exit pipe open, disable all water L4a.Disable L4b.Disable L4c.Disable L4d.Disable L4e.Disable L3a.Disable L3b.Disable L3c.Disable L3d.Disable L3e.Disable L2a.Disable L2b.Disable L2c.Disable L2d.Disable L1a.Disable L1b.Disable L1c.Disable L1d.Disable elseif RhT.GetOpenState == 0 && RhR.GetOpenState == 0 && RhL.GetOpenState == 0 && RhB.GetOpenState == 0 ; if L4a.Disable L4b.Disable L4c.Disable L4d.Disable L4e.Disable L3a.Disable L3b.Disable L3c.Disable L3d.Disable L3e.Disable L2a.Disable L2b.Disable L2c.Disable L2d.Disable L1a.Enable L1b.Enable L1c.Enable L1d.Enable endif end The trouble doesn't come from the GECK not saving the script or not running it... In fact, if you take the aforementioned example and run the script when the highest pipe is open, the water level changes as it should. However, NONE of the other pipe configurations work. I've been working on this for a day now, and I've gone over the script carefully (in different fonts, even), but I have yet to solve this issue. The only potential issue I can see would have something to do with my use of the && logic operator, but I can't find anything wrong with that... Any help would be hugely appreciated. Thanks in advance. P.S. If anybody can tell me how to disable this godawful colour striping in the code block I'll fix that ASAP
- 6 replies
-
- scripting
- troubleshooting
-
(and 5 more)
Tagged with:
