pick up items and use them from inventory.

Post topics regarding Level Building/Design and Entity Usage with Reality Factory
Post Reply
dodger
Posts: 74
Joined: Sat Sep 23, 2006 10:16 pm
Location: England. u.k
Contact:

pick up items and use them from inventory.

Post 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.
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post 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
dodger
Posts: 74
Joined: Sat Sep 23, 2006 10:16 pm
Location: England. u.k
Contact:

re:re

Post 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.
dodger
Posts: 74
Joined: Sat Sep 23, 2006 10:16 pm
Location: England. u.k
Contact:

solved:

Post by dodger »

I just worked it out.

i changed the following:
attributealtamount 1
attributealtname medikit1
attributeamount 50


Thank you once again QuestOfDreams

dodger:::
:D
Post Reply