Ness Posted October 31, 2003 I checked the FAQ's, I checked the Zdoom forums, and I checked our forums. No Dice. How in the hell can I get my script to do this: Player walks in a room Script checks if he has an item (Certain key) (THis is my problem!) If he does, he passes (this is easy) if not, he cannot pass (This isn't really relevant how he is stopped). 0 Share this post Link to post
Enjay Posted October 31, 2003 Simple option - make the script a key activated type. If he doesn't have the key, a line in front blocks him, if he does a script runs and unblocks the path. Alternatively, do a CheckInventory for BlueCard, YellowCard, RedCard, BlueSkull, YellowSkull or the RedSkull. 0 Share this post Link to post
Ness Posted October 31, 2003 Thanks, but with the CheckInventory, how would one set that up? Is it a boolean? (True false?) do I have to input the number of the item or it's actual name? I tried to look for it on the editing part of zdoom but it's kinda wonky! :) 0 Share this post Link to post
Enjay Posted October 31, 2003 OK, I'm not too hot on this kind of scripting, but I think you'd need something like this: script 1 (void) { if (CheckInventory("BlueCard") == 1) { Do stuff } else { Do other stuff } } I think CheckInventory checks how much of the asked item you have. With keys that will be 1 or 0, but with ammo, health etc it could be a wider range. You specify the item by its name (capitalisation is important). To get the correct names of inventory items, start a log file and dump the inventory classes to it. eg (at the console) logfile log.txt dumpclasses inventory 0 Share this post Link to post
Ness Posted October 31, 2003 Thank you SO much! I've some some C++ Programming so the if else statements shouldn't be a problem! Thank you so much for the help! :D Ness 0 Share this post Link to post