Forum rules - please read before posting.

Hotspot count check

I have 8 hotspots, there is a combination of 8 correct hotspot choices that completes a task, but i want to have a hotspot count that will cause the player to say 'maybe i need some help'/'or i should start again'

without upsetting my carefully planned hotspot sequence for success using variables to turn off/on hotspots, how could i add this function in to alert the player they have messed up the sequence and should start again?

thanks

Comments

  • You want to be able to count how many Hotspots out of a selection are enabled?  Sounds like a job for a custom Action.  To write an Action that has True/False outputs, you need to derive it from ActionCheck, and have an overriding function called CheckCondition return a bool.  You can open up e.g. ActionMenuCheck.cs for an example.
  • ok, will look into this.
  • What I am looking to do, is a far simpler way for the main player to pull 4 levers in a particular sequence to run a cutscene:

    red
    blue
    yellow
    red
    green
    red
    blue
    blue

    but if the player pulls 4 levers 8 times in any wrong sequence apart from the correct times, the hotspots reset and the player says 'I am doing this wrong'

    I currently am doing this a very long and laborious way, where each hotspot has 3 different use functions, and these are turned on and off depending on the last one pulled.

    I am not sure how best to use variables in this instance if that is the correct way to do this?
  • You could do it with just one: to record how many the player has pressed already (an Integer)

    If you're clicking e.g. Red, check that this integer = 0,3 or 5.  If it is, the player pressed it at the right time, so incease the integer by one.  If not, the player failed, so reset the integer to 0.  If you click Blue and you increase the integer to 8, the sequence is complete.
    • HI, 

      So just to clarify, i put a check and set variable on each pump? red pump variable, blue pump  variable etc

      On each pump increase by one? and check that it is 0, 3 or 5?

      Bit confused still, as it is not a timing thing but a sequence thing. you have to pull red, blue etc in a particular sequence to run a cutscene, and if after 8 pulls you have not pulled in the correct order then the player says dialogue,  
    • ps on red for check for 0,3 or 5? 

      for example, you have to pull red, yellow, blue, green, red, blue, blue then red in that order to complete task.

      i have a hotspot for each pump, and a local integer variable for each pump starting at 0.

      so, if red starts at 0, and you pull it, check then set? as you will need to pull red again later?

      i have my variable as in this screenshot for red pump so far:

    • or rather:

      but still unsure what to put on other 3 pumps? and how to relate that the pulls on the other pumps have to set off the other correct pull variable checks?
    • See "time" and read "sequence".  I just meant in the correct order.

      You're changing the order in your example now.  In this new example, you'd be checking for  0, 4, or 7 - as that when red appears in the sequence (starting from zero).

      Run the Variable: Set after the Variable: Check.  The variable is used to record how many correct choices made by the player - so only increase the value if the pump was clicked at the correct time, otherwise reset it back to zero.
    • Thanks, and just one more thing, what would the check then run if it is 0,4 or 7?

      the variable checks running from eachother?

      like this?:


      How do you align each pumps variable check/set to work out when the correct order is done?

      Or are we talking a seperate cutscene/variable that checks the sequence?

      Quite unsure here


    • I'm trying to explain it as simply as I can.  Bear in mind that this is not an AC issue - just my giving you my suggestion.

      If you mean you want to change what the sequence is (e.g. have a random code), that complicates things - understand what I'm getting at first beforehand.

      Here's a screenshot for if a given "red" was in 0, 3, and 4 in the sequence.  Follow the Actions with different integer values to see how it's set each time.

      image
    • Thank you for your patience, my brain has finally twigged and it works like a dream!

      Cheers!
    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.