Individual inventory items

guzmere
06 Feb 2012, 15:08
Hi hope every one is ok and well. I hope you can help me, I want the player to climb over something before getting to the next room. However the player must be wearing a coat and have nothing in the inventory, as this would be too heavy to climb otherwise. Is there a way to check against this, without too much scripting. Hope this makes sense to you. Thanks in anticipation :D :D

Pertex
06 Feb 2012, 15:42
you will need scripting to do it :D
"climb over something" :
add the verb climb to your something-object, then "run a script" and use "Variables"/"Set a variable or attribute" and there
set variable player.parent = expression your_destination_room

"wearing a coat":
how do you know, that the palyer is wearing a coat?

"have nothing in the inventory":
here you need scripting. Your climb-script should look like this then:

if (ListCount ( ScopeInventory () ) =0 ) {
player.parent = your_destination_room

guzmere
06 Feb 2012, 19:39
Hi Pertex thanks for the reply I have managed to be able to wear the object coat by copying a post reply from Alex to someone as in Coat.alias = "Coat ( worn) " and that took forever to find the right place to put it in. Is there a way to set a flag on this and nothing in the inventory. The reason why I ask this is that reading your reply has sent me into panic mode LOL. Thanks :D :D
May you always walk with peace in your heart and fortune in your step.

Pertex
06 Feb 2012, 20:38
OK I simplified it a bit but here is your script. And dont forget: Don't panic! :lol:

guzmere
07 Feb 2012, 17:37
Hi Pertex thanks for the reply. I have down loaded the file, but alas I could only play the game piece you did for me and not get into the coding of it. But since then yeah, oh! yeah. I had a good look at your coding you sent me
if (ListCount(ScopeInventory ()=0 ) {player.parent= another room. Which at first I did not understand, but when I looked again I realised that it was telling there was no items in the inventory. So I changed it to 1 in an if statement and then made sure I flagged my coat(object) to worn. Then all I had to do was to make sure that the only object in the inventory was the coat worn and if that was correct I could climb out. Thanks a million. once again. Hope this makes sense because I waffle a lot. Well sometimes LOL :lol: :lol:
May all your problems be will o' the wisps.

Pertex
07 Feb 2012, 19:58
I think you loaded the game with a doubleclick on the game file? Try to start Quest and then open the file for editing.

guzmere
07 Feb 2012, 20:39
thanks i will try it that way ,