Page 1 of 1

pick up items and use them from inventory.

Posted: Sat May 19, 2007 2:22 pm
by dodger
Hi,
will someone help with this please.


I have placed a medikit in my level .... and set up the attribute to pick it up
this instantly gives the player more health.

but how can i pick up the medikit or medikits to use later in the game?

I have done the following,


1. put this in the inventory .ini file

[medikit1]
catagory = use
image = medikit1.bmp
imagealpha = a_medikit1.bmp
text = Medical supplies
usedecrease = true


2. put this in the player .ini file

[medikit1]
initial = 1
low = 0
high = 10


3. placed both bitmap and alpha bitmap in the inventory bitmap folder...


The above puts the medikit image in the inventory but how do i get the players health to increase when i use it from the inventory?
I have looked at the weapons/inventory tutorial in the manual ..but am still confused.


Dodger.

Posted: Sat May 19, 2007 3:16 pm
by QuestOfDreams
replace

[medikit1]
catagory = use
image = medikit1.bmp
imagealpha = a_medikit1.bmp
text = Medical supplies
usedecrease = true

with

[medikit1]
catagory = modify
image = medikit1.bmp
imagealpha = a_medikit1.bmp
text = Medical supplies
modifiedattribute = health
modifiedamount = 10

re:re

Posted: Sat May 19, 2007 9:31 pm
by dodger
Hi QuestOfDreams,
thank you for your help.

I can now use the medikit1 from the inventory
which increases my health by 10
and decreases the amount of medikit1 boxes that are left.

The problem i have now is .... when i pick a medikit1 box up in the level
it does not increase the amount of medikit1 boxes left in the inventory
how would i solve this?.

dodger.

solved:

Posted: Sun May 20, 2007 2:24 pm
by dodger
I just worked it out.

i changed the following:
attributealtamount 1
attributealtname medikit1
attributeamount 50


Thank you once again QuestOfDreams

dodger:::
:D