PDA

View Full Version : Inventory question


Antilles!
02-10-2001, 08:51 AM
How do you make it so the player must have the blue key in order for the block of the if statement to be executed?

Basically, I want:

If player has blue key

do this

else, say "locked"

------------------
Antilles
JK & MotS Level Reviewer
The Admiral's Commmand Chamber

[This message has been edited by Antilles! (edited February 10, 2001).]

GuNbOy
02-10-2001, 09:26 AM
activated:
if(GetInv(player, keybin) != 1) return;
else
do stuff


i dont know what bin the keys are, so just look in the items.dat

GuNbOy
02-10-2001, 09:27 AM
oops, well just stuck in a playsoundthing(); before the retun and it will do what you want

Antilles!
02-10-2001, 09:49 AM
Forgive me for my ignorance, but where do I find items.dat?

------------------
Antilles
JK & MotS Level Reviewer
The Admiral's Commmand Chamber

Jipe
02-10-2001, 11:17 AM
Open up the humongous .gob file in your resource directory with a program like ConMan (available here or at Code Alliance), go to the misc folder, and extract items.dat. Then look for the blue key's bin number, and fill that in for the second parameter in Gunny's code above.

-Jipe

Antilles!
02-10-2001, 11:19 AM
Okay, I know how to do all that. Thanks a lot guys!

------------------
Antilles
JK & MotS Level Reviewer
The Admiral's Commmand Chamber