Random rating display.

gawakamygawakamy Member Posts: 109
edited March 2012 in Working with GS (Mac)
Hi, GS dudes.
Today's problem is how to display rating screen randomly. What I am trying is to display it when player touch the start button (1/5 chance).

Comments

  • POMPOM Member Posts: 2,599
    I have no idea what your asking ;)
    but i think this will generally work :
    when player touch the start button:
    Change "Game.chance odd" TO random(1,5)

    Now a new rule :
    When "Game.chance odd" IS 1
    Do this 1
    When "Game.chance odd" IS 2
    Do this 2
    When "Game.chance odd" IS 3
    Do this 3
    Etc etc ..

    Photobucket Roy
  • robert.mccarthyrobert.mccarthy Member Posts: 165
    I would put the following rule on your 'Start' button actor:

    GLOBAL Attributes:
    * randomNumber (Integer)

    RULE 1 - In Start Button Actor
    When ActorRecievesEvent 'touch' IS 'pressed'
    Change Attribute 'randomNumber' to random(0,4) (NOTE: Or change to 1,5, which ever you feel comfortable with)

    RULE 2 - In Start Button Actor (after above actor)
    When Attribute 'randomNumber' <= 3 (NOTE: or 4 if you did 1-5)
    do normal start button behaviour
    OTHERWISE
    show rating screen
  • CloudsClouds Member Posts: 1,599
    edited March 2012
    If the rating screen has an alpha channel (ie: it's an actor rather than a scene):

    Change attribute color.alpha to random (1,5)-4
  • gawakamygawakamy Member Posts: 109
    Thanks dudes, I have figured it out. :D
Sign In or Register to comment.