Putting different value but not randomly! (FB)

houssam.almas@hotmail.comhoussam.almas@hotmail.com Member Posts: 21
edited March 2014 in Working with GS (Mac)
Please I want to display different value but not randomly from a range not using random actions..
And I also want to know how to spawn different actors randomly using a spawner like flappy birds but instead of bricks there will cloud that one of three can be passable through but the two others no.
Please help I'm a 15 years old teenager working on really influential and educational game
Regards

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2014

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Thank you tatiang
  • I want also to know another functions instead of random that we are able to put in some characters not a range of characters :-S
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I'm not understanding what you're trying to do. It's probably because you don't understand GameSalad very well yet.

    Try explaining it again but writing much more (not just a sentence). What is the context of the game? What type of game is it, what happens in the game, etc.? How exactly are these range of characters used and what types of values would they contain? That will help me and others here be able to answer your questions better.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • houssam.almas@hotmail.comhoussam.almas@hotmail.com Member Posts: 21
    edited March 2014
    Okk. I'm a gs creator beginner and i'm trying to make a game from the same context as flappy birds but with different consequences.i don't want to make the bird die when it collide with a wall or brick i want him to die when it collide with a specific box holding not suitable value instead of that if it is true then she can pass through it but I'm not able to make this boxes hold different value from a list I have made like(1,4,6,9) so it can pass through the boxes holding this values otherwise it can't .
    Thank you for being helpful @tatiang
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    You'll need to learn about how to use tables in GameSalad. If you Google tables GameSalad you'll find videos and tutorials.

    Once you understand tables, here's the idea...

    Place each possible value in a separate row of the table, like this:
    1
    4
    6
    9

    Then whenever you need a value, do Change Attribute game.choice (integer) to tableCellValue(tableName,random(1,tableRowCount(tableName)),1).

    You can then display game.choice or use that attribute in a rule.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • quantumsheepquantumsheep Member Posts: 8,188

    Please help I'm a 15 years old teenager working on really influential and educational game
    Regards
    i'm trying to make a game from the same context as flappy birds
    This made me giggle :D

    @tatiang is right though, the most efficient way to do it would be to use tables.

    If you're not familiar with tables, another way of doing this would be something like:

    If box is off the screen.
    Change its value to something (1, 4, 6, or 9)
    If player collides with box and value is 6, then kill player


    The trick is to make each individual box have its own unique value. You'd need to work out a way of using a global variable, but making sure that not all the boxes change to that variable (unless that's what you need to happen)

    QS

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • It is not something like flappy birds but I took the idea from this game.The game deals with maths. @quantumsheep‌
Sign In or Register to comment.