FuzeTek Posted December 19, 2009 Share Posted December 19, 2009 Hey, so I'm working on my resident evil 2 mod and I want to have a switch that turns on lights on the Train and unlocks the door. Is there an easy way to do this or do I have to write a script and if so can anybody help me with it? I'd greatly appreciate it ^_^ thnx Link to comment Share on other sites More sharing options...
BadPenney Posted December 19, 2009 Share Posted December 19, 2009 It could be done with one object script on the switch. Make one of your initially disabled lights an enable parent of the other lights and enable that enable parent with a script on the switch, like: scn LightSwitchScript short doOnce Begin OnActivate if ( doOnce == 0 ) activate ALightREF.enable DoorA.unlock Set doOnce to 1 elseif ( doOnce == 1 ) activate ALightREF.disable Set doOnce to 0 endif End That would allow all of the lights to be toggled on and off and unlock the door as soon as the lights come on and leave the door unlocked. Link to comment Share on other sites More sharing options...
FuzeTek Posted December 19, 2009 Author Share Posted December 19, 2009 Lights as in the light emitter itself? because I check initially disabled on the emitter but it still comes up on when I load the map Link to comment Share on other sites More sharing options...
BadPenney Posted December 19, 2009 Share Posted December 19, 2009 Lights as in the light emitter itself? because I check initially disabled on the emitter but it still comes up on when I load the mapIf by light emitter you mean the globe shaped object that you place in the GECK that becomes a light source in the game, then yes. Map? Do you mean interior cell? If you mean that you load the cell in the GECK and still see the light in the render window that you marked as initially disabled then that should be expected. If you enter that same cell that you created while checking it in the game and you still see the supposedly disabled light shining, then there is something wrong. Link to comment Share on other sites More sharing options...
FuzeTek Posted December 19, 2009 Author Share Posted December 19, 2009 Yes I mean the globe lightbulb. I made a test cell with a switch and a light, checked the disabled box but it still shows up ingame. I don't know whats going on but I have to figure this out, theres alot of applications I want to use this for for the various actions within the RPD. Still working on getting the terminal to unlock the 2 doors in the lobby. thank you for the help so far, I appreciate your response ^_^ Link to comment Share on other sites More sharing options...
BadPenney Posted December 19, 2009 Share Posted December 19, 2009 Are you sure that there aren't actually two lights in the same spot? I have accidentally done that before when cloning objects from one placed object by failing to move one duplicated object to another location. :pinch: Link to comment Share on other sites More sharing options...
Recommended Posts