How can I do this?

Sambo110Sambo110 Member Posts: 7
edited November -1 in Working with GS (Mac)
I want to have a collecting/dodging type game, collect objet to get points, power ups to do certain things and other things will make you lose a life. Can I have it randomly make items drop, sorta like Scoops does it?

Comments

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    You can create an actor that uses the Timer behavior to change an attribute to some random integer (1 to n) every t seconds. Then the actor has different rules that check if the attribute value is equal to #. One rule for each number. And those rules spawn an actor and changes the attribute back to 0.

    Each of those actors spawned would have a basic Change Velocity behavior so it can move. Not Collidable. And one rule that says if it collides with some boundary actor or your player actor then it is destroyed.
  • Sambo110Sambo110 Member Posts: 7
    Another question. I wanted to make it so the player couldn't move outside of the screen. I put walls just outside of view, but when they hit the player goes spinning etc. Any way so they don't spin? Or an easier way to do it?
  • Sambo110Sambo110 Member Posts: 7
    Hmm, I found out most the stuff reading through the games that come with it, they are really helpful!
  • Sambo110Sambo110 Member Posts: 7
    Ok, I thought of a game I want to make. Basically things keep falling from the top, and you have to dodge the, can I do these 2 things.

    1. Have them slowly fall faster and faster and
    2. Get a point for each second you survive?
  • JGary321JGary321 Member Posts: 1,246
    Sambo 110 you still need help with this? If so post here, I think I have a solution for you.
  • Sambo110Sambo110 Member Posts: 7
    I guess so, I haven't really done much with Gamesalad, I was sorta waiting for more features etc. But if I could do this it would be a good start IMO.
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Sambo110, I'm not sure how you have your actor set up, but to stop the spinning when it hits the walls or anything else, go into the Physics attributes and set the Fixed Rotation attribute to true.
  • JGary321JGary321 Member Posts: 1,246
    "1. Have them slowly fall faster and faster"
    Spawn Actor, Move to Random Postion (x), Move to Position 25(y) (or whatever your ground coord is), Accelerate. That should help start it.

    "2. Get a point for each second you survive? "
    First set a Game Attribute called Game Time & another called Game Score. Set a Timer that every 1 sec to change attribute game.Game Time to game.Game Time - 1. Under the same timer set another change attribute to game.game Score to game.Game Score +1.

    Hope this helps.
  • Sambo110Sambo110 Member Posts: 7
    That does help thanks! I might start working on my first proper game soon.
  • quantumsheepquantumsheep Member Posts: 8,188
    Hope so Sambo - we've had some great examples over the last few days!

    Personally, I'm making 'one level demos' of my game ideas, which I'll upload at some point.

    I understand what you mean by waiting for more features though. A 'reset game' one is top of my list! ;)

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

Sign In or Register to comment.