Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: LUniqueDan on Mon 13/07/2009 19:18:05

Title: *solved* player.ActiveInventory
Post by: LUniqueDan on Mon 13/07/2009 19:18:05
When exactly does the player lose it's ActiveInventory?
What exactly can make a player lose it's ActiveInventory?

I have a huge 'on mouse click' section who called RunInteractions at the end.
And somewhere between this and the character/objet/hotspot flag, the active inventory became Null.
(My script worked well for 3 years, but now I can't Use/give anymore)

Thanks in advance.

EDIT : still on 2.72 :D
Title: Re: player.ActiveInventory
Post by: Khris on Mon 13/07/2009 22:18:03
Afaik, losing the inventory item is the only thing that makes player.ActiveInventory become null (apart from setting it to null, obviously).

We'd really have to see the script to help you though.
Title: Re: player.ActiveInventory
Post by: LUniqueDan on Mon 13/07/2009 22:42:59
Thanks for the reply KrisMUC.
(the bug is on my main script... somewhere in 5000 lines :) )


So, that means that a Player.ActiveInventory stays the same as long as :

1) An other InventoryItem is selected with a CursorMode?
2) The script calls an player.ActiveInventory = iSomething;
3) The script calls an player.ActiveInventory = null;
4) The script calls a  player.LoseInventory(iSomething); if iSomethig is the ActiveInventory?

No other Possibilities?
Title: Re: player.ActiveInventory
Post by: Khris on Mon 13/07/2009 23:41:52
1 & 2 won't make it become null but change, but 3 & 4 will.
Like I said, setting it to null or losing it.
Title: Re: player.ActiveInventory
Post by: LUniqueDan on Wed 15/07/2009 15:20:19
Solved

Thanx a lot KrisMUC!

That was decayed remain of an archeo-debuging-feature lost on my main Repeatedly_Exec_Always that trigered it.

Thanx a lot KrisMUC!

(I should fininish my game soon cuz' now that's retro-engeneering that waste my time)