Multiple Inventory "if" interactions

Started by Akumayo, Mon 19/01/2004 01:12:44

Previous topic - Next topic

Akumayo

Say i want to make a character that transforms when an inventory item is used on it.  Easy, right, wrong, i want there to be three different things to use on it, the player chooses which one.  But, Whenever I use child actions: Use Inventory item; if inventory item was used, item 01, change player view 01, if inventory item was used, item 02, change player view 02, if inventory item was used 03, change player view 03.      It makes it so that i can only use item 01.  How do i make it so that each one will turn the player into a different thing ???
"Power is not a means - it is an end."

Darth Mandarb

Don't forget to use the 'Stop Running More Commands' code to "return;" from the if statement.

That might help.

If not, explain more what you want to do and we can help with the scripting!

Do you have to use the items in a specific order?

])]V[

TeeKay

From the interaction editor, instead of choosing the "if inventory item was used" conditional, choose "Run Scritp", click the Edit Script button, and type in:

if (character[GetPlayerCharacter()].activeinv == 1) {
// your commands, like SetCharacterView
} else if (character[GetPlayerCharacter()].activeinv == 2) {
// your commands, like SetCharacterView
} else if (character[GetPlayerCharacter()].activeinv == 3) {
// your commands, like SetCharacterView
}

Akumayo

"Power is not a means - it is an end."

SMF spam blocked by CleanTalk