Death Egg Posted May 8, 2013 I'm trying to get a floor to only lower if you have the blue key. I've copypasted enough stuff from the ZDoom Wiki to end up with this: script 6 (void) { if(CheckInventory("BlueCard")) { Floor_LowerToLowest(98, 8); Thing_SpawnFacing(101, 2, 1); } else { print(s:"you need the blue key, ya dumbo!"); } }Which works... as long as you ONLY have the blue key card on you. If you have any of the other keys on you at the time you try to open it, the floor won't lower. What do I have to add to get the script to work? (I'm a bit of coding ditz so it'd probably be best if someone included a correct version of the code in their post to help me out) 0 Share this post Link to post
Vader Posted May 10, 2013 Try this:script 6 (void) { if(CheckInventory("BlueCard")>0) ... I have a similar script in one of my maps and it works without problems with the ">0"! 0 Share this post Link to post
Gez Posted May 10, 2013 It's a void script, so I suppose it's started from a line (or maybe thing) with ACS_Execute. Why don't you use ACS_LockedExecute instead to remove the key check from the script itself? 0 Share this post Link to post
Death Egg Posted May 10, 2013 I found out the issue was the linedef wasn't set to repeatable, (since I don't work with ZDoom often, I don't realize sometimes that's not set on by default) but from now on I'll likely try to get ACS_LockedExecute instead since that was the most common response I've gotten elsewhere I asked this. 0 Share this post Link to post