zaelm Posted February 2, 2016 Share Posted February 2, 2016 I don't understand why this script doesn't work the way I want it to. Basically there are two doors (Two doors in the test version, three in the final version) . I want the door that the player picks first to have the ghouls behind it. Then something else behind the second door they pick. The problem is when I choose the second door there are ghouls behind that one too. I feel like setting DoorCount to 1 should stop it running that part of the script again, but I don't know. Please help me understand. Thanks. http://imgur.com/z2ojDpl Link to comment Share on other sites More sharing options...
Jojash Posted February 2, 2016 Share Posted February 2, 2016 (edited) I take it you've attached this script to both doors? Your logic is sound, the only thing suspect about the whole thing is GetIsReference - when you're comparing a dynamic reference (rDoor) to a persistent reference (D1Ref or D2Ref), you don't need that function - you can simply use a comparator (==, !=, <, >,). The other thing is to make sure that you've actually set up the persistent references for both your ghouls and your doors. The other thing I notice about your script is that this block: (if DoorCount == 1) Activate endifIs redundant since you activated your door when you disabled the ghouls. Hope this helps! Edited February 2, 2016 by Jojash Link to comment Share on other sites More sharing options...
Recommended Posts