Forum rules - please read before posting.

What is the best way to collect items which make an event?

edited October 2015 in Technical Q&A
Hello all,

I am making VR game with AC. (So there's not many input options like mouse clicking. so I am thinking about using hotspot to collect the items)

How can I make the event happen when there's certain amount of items collected?
For example, when you pick up  and collect 5 apples from the street, an apple tree starts to grow from the ground.

And how can I make players know how many items are collected on the screen?

I am so sorry if it is so basic questions.
Since I am a designer(not much knowledge in code) and also so newb in Unity.
AC just makes me feel blessed by making things easier and happening on the screen.
I hope there's a good way to solve this.

Thank you in advance :)

Comments

  • Welcome to the forum, @hyenn.

    You can do this by creating an "Integer" variable in the Variables Manager to store the number of apples you've collected.  Each time you pick up an apple, use a "Variable: Set" Action to increase the integer's value by 1, and follow it up with a "Variable: Check" Action to determine if the number is 5 or not - and if so, call a new ActionList that grows the apple tree.

    To save you copy/pasting those same two actions for each apple, you can place them inside an ActionList asset or Cutscene, and simply run that once any apple has been picked up, by using the "ActionList: Run" Action.
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.