Little Help plz

Shadowghost135Shadowghost135 Member Posts: 38
edited June 2012 in Working with GS (Mac)
Hi all,

I was wondering if someone could give me a helping hand here. I'm currently working on a simple game that involves bombs raining down from the top of the scene. Could someone plz tell me the best way to do this? My bombs have faces, I have one looking down-left, and one looking down-right. I need to get them to spawn randomly at different points (from the top) and fall at different speeds and directions.

One more thing if possible, how can I get this action to start slowly, yet get faster as the timer increases.
I've been working on this for hours now, and to be honest I'm getting frustrated because I can't get the random part right. I can get the bombs to fall, however I've got like 5 spawners at the top of my screen and all the bombs fall at the same speed and directions.

Thanks so much all.
:-)

Best Answers

  • SlickZeroSlickZero Houston, TexasPosts: 2,870
    edited June 2012 Accepted Answer
    Are you using gravity, or are you using a move behavior in the actors that fall?

    It sounds like you just need to set a random speed and angle in the actors that will make them fall at different speeds and directions. You wont be able to do that with the speed if you are using gravity. You will need to use the move behavior, or linear velocity.

    As far as making them spawn faster, you could set it to a timer behavior, and after however many seconds you assign to it goes off, have the spawn rate faster than what you have set up. Like instead of every 3-5 seconds (just an example time), change it to 2-4 seconds after a certain amount of time.

    Like your icon btw. I spent many years playing Vampire: The Masquerade
  • NmdogdudeNmdogdude Posts: 174
    Accepted Answer
    under each bomb actor, try changing it to random degree between a certain range (ex: between 90-270) if you want them to fall. Also, to gradually change the speed, try using a timer attribute 'Every 30 seconds change attribute self.linearvelocity.y to self.linearvelocity.y. +20 (Or whatever you want to change it to.)
  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,922
    Accepted Answer
    Go to Youtube gamesalad cookbook and you will find a video there about spawning actors and one about spawning random actors. This will get you in the right direction.

Answers

  • Shadowghost135Shadowghost135 Member Posts: 38
    Hey Hey!!!!!.....Thank you so much guys, with the advice and a couple more hours of work, I've got it just the way I wanted it.........Thanks :-D!!
  • Shadowghost135Shadowghost135 Member Posts: 38
    Okay guys, one more plz. I've gotten all my actors raining down correctly, and I've gotten the score, timer, and everything else the way I want them. However can someone plz explain to me how to set up an attribute in order to get my raining actors to increase in speed over time? Thanks again so much.
  • Shadowghost135Shadowghost135 Member Posts: 38
    And can you plz tell me the correct way to increase the speed of the fall. I'm using change velocity.
  • Bilzo12Bilzo12 Member Posts: 70
    hey @shadowghost135 i know a very easier way were you can get exactly what you want first thing you have to do go over to gshelper (tshirtbooths site) sign up to his newsleter and a free missile command template will be sent to your email now remember to check your junk folder.

    this template has exactly what your looking for hope this helped

    good luck and happy gaming

    bilal
  • Shadowghost135Shadowghost135 Member Posts: 38
    Thanks so much for the link Bilzo12. I'm working with it now. In all honestly, I'm having one heck of a time getting it set up right. Every time I think I've gotten an "Aha!" moment it doesn't work.

    Here is what I'm trying to work with.

    I have an attribute called bombsKilled (it's a simple counter).
    I've set up one called bombFallSpeed.

    So I've tried:

    ------------------------------
    Game Attributes:

    Int bombskilled;
    Int bombFallSpeed = 50;
    Int bombSpawnTimer = 3;


    Rule - When attribute game.bombskilled = game.bombskilled+5
    Change Attribute - game.bombFallSpeed = game.bombFallSpeed + 10
    " - game.bombSpawnTimer = game.bombSpawnTimer-.3

    ----------------------------

    Any help or advice would be great....ty.
Sign In or Register to comment.