Generating random number on an actor by pressing another actor

kesagirikesagiri Member Posts: 3
edited July 2014 in Working with GS (Mac)

Hello Everyone!

I'm completely new here downloaded gamesalad a couple of days ago. I've read the cookbook and watched a couple of tutorial videos on youtube. After watching the random numbers video I managed to generate a random number and I was thinking forward to how to generate the random number on another actor (actor2) by pressing actor1 (and the new number would appear on actor2 like on a scoreboard or something). I was searching the forums too but I've only found posts about moving an actor by pressing another actor and so.

Any help would be appreciated. :#

Comments

  • ArmellineArmelline Member, PRO Posts: 5,369

    Probably the easiest way would be having a boolean that is triggered (set to true) when you press on actor1. When actor2 detects this boolean is true, it generates the random number.

    There are other ways, but I'm pretty sure that will be the easiest :D

  • kesagirikesagiri Member Posts: 3
    edited July 2014

    Thank you for your quick reply Armelline. May I ask you to explain this to me in details?

    UPDATE -
    I managed to generate a random number on actor2 by pressing actor1 but it only generates the number once. After I press actor1 again nothing happens.

  • LyboTechLyboTech Member Posts: 135

    Create a game boolean, then in actor 1 create a rule when touch is pressed change boolean to true and otherwise change to false, then in actor 2 create a rule when boolean is true, run random generation. :smile:

  • kesagirikesagiri Member Posts: 3

    Thank You Lybo Tech it is ALIVE...I mean it is working now! B)

  • LyboTechLyboTech Member Posts: 135

    @kesagiri‌ Awesome, good luck with the game! :smiley:

Sign In or Register to comment.