Jump to content

Script Help


zaelm

Recommended Posts

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

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
endif

Is redundant since you activated your door when you disabled the ghouls.

 

Hope this helps!

Edited by Jojash
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...