how to use inventory items on characters?

Started by , Fri 16/01/2004 16:49:34

Previous topic - Next topic

m1lk

that's maybe a stupid question, but how to use an inventory item on some character or object...

i see under "Interaction" "Use inventory on character", but this works with any inventory i use on this character...

i wanna use the "special" inventory (only one)...

i hope you get it..


Deathlok

Ive been trying to figer the same thing out for days now... could someone post how to do it?

Bryan

I'd say look in the manual under "Inventory Functions".

But that would be misleading cause it ain't there.  What you want is to check the global variable character[CHARID].activeinv during the interaction.
this space intentionally left blank

Deathlok

you'd think that it would be easyer than that... im still confused.

..

If i am correct in thinking that you want it so when a player uses a specific inventory item on another player, something happens.

All you need to do is Under 'Use Inventory on Character' in the interactions panel, you select 'Conditional - If Inventory Was Used' then select the inventroy item number, and under this add some child actions (actions that happen if that condition is correct) so For Example

PLAYER USES INVENTORY ON CHARACTER
----Conditional-If Inventry was used(1)
------------+ Game- Display a messag(01)

So it really is simple :P

Quoteyou'd think that it would be easyer than that... I'm still confused.
It Is that simple!
QuoteWhat you want is to check the global variable character[CHARID].activeinv during the interaction.
ARGHH!! DONT LISTEN TO HIM.. HE's CRAZY!!!

strazer

Using script, you would do:

- Choose "Characters" on the left
- Choose the character
- Press button "Interaction..."
- Double-click "Use inventory on character"
- Choose "Run script"
- Press button "Edit script..."
- Write something like this:

if (character[EGO].activeinv == 1) { // if inventory item no. 1 used
   // put stuff to do here
}
else if (character[EGO].activeinv == 2) { // if inventory item no. 2 used
   // put other stuff to do here
}

Ocean_of_Darkness

#7
Thanks, I got it working now. This is Deathlok by the way but im (planing) on realising a demo soon and I wanted to change my name to something with more character. So from now on I shall be known as Ocean of Darkness.

TerranRich

Great, that's nice. Next time, read the Beginners' FAQ before posting any questions.
Status: Trying to come up with some ideas...

SMF spam blocked by CleanTalk