Forum rules - please read before posting.

Sprite appears after a set amount of inventory items are collected?

Hello all,

I'm having some dificulty with getting my head around this issue. I'll try to explain as best as I can without totally confusing the issue!!

I would like a KEY sprite to become visible after 7 coins are collected. This is what I have done so far but I'm getting stuck with the correct process (and probably way off mark)

I have set the KEY sprite "Visibility on start" to "OFF"

In the "COIN" ActionList Editor I have added the following:

Action Type: "Inventory Check"
Check to make: "Carrying specific item"
Inventory Item: "COIN"
Query Count?: Ticked
Count is: "Equal To"
Equal To: 7

If condition is met > Continue

Object Visibility
Object to Affect: Key
Visibility: Visible

For some reason, the key stays hidden even though all 7 coins now show in the inventory??

Any pointers would be greatly appreciated.

Cheers!

Jay

Comments

  • At what point is the "Coin" ActionList run, and where do the Actions you describe sit in relation to others in the list?

    Is "Coin" an asset, or scene-based? If an assetm make sure that its reference to Key includes a Constant ID.

    Screenshots of the details involved would be best, if you can share them on imgur.com. What you've described sounds like it should work, so it may be some small issue that can't be conveyed by text alone.

    To help debugging: know that it's possible to attach comments to Actions via their cog menus when working in the ActionList Editor. These comments can then be printed in the Console by enabling them at the bottom of the Settings Manager. You can use this to check if your Object: Visibility Action is being run or not.

  • Hi @ChrisIceBox

    Thanks for your clear perspective.

    Your response got me thinking and I have realised that the 7 coins are probably being treated as individual inventory items so to test, I edited just one of the coins in the ActionList Editor and changed the "Inventory Check" Carrying Specific item = COIN "Query Count?" "Equal to" 1 (instead of 7) and as soon as I click the coin, the KEY appeared!

    Further on, I have added automatic Constant ID to all of the "COIN" assets (spread across 4 scenes), changed all of the (COINS) actionLists to "EqualTo 7"

    So it appears that the Constant ID seems to have done the trick.

    I'm probably just making everything more confusing (to myself and you) but it looks like it works.

    I'll definetly post up some images here via imgur just in case.

    Many thanks!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.