change inventory item on hotspot?

Started by dikla, Wed 26/05/2004 23:41:46

Previous topic - Next topic

dikla

i picked up a big ledder in room 1 and the inventory sprite is smaller ledder. now i want to interact with inventory ledder on hotspot in room 3 but i want it to show the big ledder (which is an object in room 1) and not the inventory small ledder. can i change the inventory sprite with the big ledder sprite when "if player use this item"?
tnx dikla

Akumayo

I'm not sure exactly what you mean, do you want the ledder's icon to be a big ledder when you are choosing what to interact with::::or do you want a big ledder to appear after the inventory item has been used on hotspot 3???
"Power is not a means - it is an end."

strazer

Do you mean letter or ladder? :)

Quotebut i want it to show the big ledder

What do you mean by "it"?
The mouse cursor? A button on a gui?

Edwin Xie

Quote from: strazer on Thu 27/05/2004 01:22:40
Do you mean letter or ladder? :)

Quotebut i want it to show the big ledder

What do you mean by "it"?
The mouse cursor? A button on a gui?

Well, I am asking the same thing! Anyway, if you use it on hot spot 3 there is an interaction to it. Or you could try a script. Anyway here is the script way only simpler. The interaction on hot spot 3 is how you should do it. On room 3 go to the interactions editor. (You should have the big "ledder" as an object at the time) click on use inventory with this object. (lets say the "ledder" was object 0 in the room and it has been set on "Remove object from the room")  On the list, find Run Script and then type ObjectOn (0); (Hmm wait, someone told me about object animation that included this...now I get it) voila, what you want.
Moving at superhigh speed getting to the planet called Earth. But it is boxed in white......thing.....

dikla

 to: Akumayo
"do you want a big ledder to appear after the inventory item has been used on hotspot 3???"
this is indeed what i want. the big LEDDER object is in room 1. i need to use it in room 3. the item shown in the inventory is a small ledder.  i want to use it on tree, but it looks so small that i want it to chage into the big object. the problem is that i have several trees in room 3 and  the player try it on every tree (so i cant make in room 3 another ledder, make him invisible and then visible because i have to do it in every tree). and i dont know how to make  disapear both big ledder object & the inventory item ledder from the room after using it.
like in the turitorial when you take a small key and have in the inventory big key. i want it reverse. chagne small ledder into big one when it touches the tree. i hope u can understand now. remining you all that the original big ledder is in room 1.
plssssssssss help.
dikla

Scorpiorus

Quotethe problem is that i have several trees in room 3 andÃ,  the player try it on every tree (so i cant make in room 3 another ledder, make him invisible and then visible because i have to do it in every tree).
One way would be indeed to have 3 different ladder objects in room 3 and enable one or another depending on the tree the player clicked on. Another possibility is to have a single ladder object in room 3 but adjust its coordinates depending on the tree that was clicked on:

use ladder inv on tree 1
Object0n(OBJECT_LADDER);
SetObjectPosition(OBJECT_LADDER, x1, y1);
LoseInventory(INVENTORY_ITEM_SMALL_LADDER);

use ladder inv on tree 2
Object0n(OBJECT_LADDER);
SetObjectPosition(OBJECT_LADDER, x2, y2);
LoseInventory(INVENTORY_ITEM_SMALL_LADDER);

use ladder inv on tree 3
Object0n(OBJECT_LADDER);
SetObjectPosition(OBJECT_LADDER, x3, y3);
LoseInventory(INVENTORY_ITEM_SMALL_LADDER);


Notice how LoseInventory is used to remove the appropriate inventory item from the inventory.

SMF spam blocked by CleanTalk