Change actor speed depending on level

Ij10281Ij10281 Member Posts: 35
I'm creating a game similar to Zombie Smasher https://play.google.com/store/apps/details?id=com.moistrue.zombiesmasher and I'm a Gamesalad virgin so I have ran into multiple issues. One issue I have ran into is changing the actors speed deepening on the level. The problem with dragging instances on the screen is that I have to have many actors for other levels and I want the actors to be random not the same exact ones and same amount of each. I use a spawner for the current level I'm working on (1st level) which spawns them randomly in specific positions, and currently my prototype zombie has the same speed, and I want to use the same actor and not drag instances on the screen. Tshirtbooth did a tutorial on changing attributes using tables, but he didn't show using it to change actors speed based on level. I apologize to ramble,but I'm 17 and I'm just trying to give the most information I can. Help would be greatly appreciated.

Comments

  • WingmanappsWingmanapps Member Posts: 458
    edited June 2013
    hhmm - let me try to take a stab at this.

    Create a new integer game.attribute called Speed.
    Everytime you change scene, on your new scene you put in a invisible actor with a change attribute game.levels to (the potential extra speed you want)

    On your Zombie actor.
    Move/accelerate or what ever behavior you are using
    Speed (100+game.Speed)

    The 100 (or whatever you want) is the Zombies base speed. The game attribute "speed" then controls the extra speed you want. So when entering a new level - All you have to do is change the speed attribute.

    Hope it makes sense :)
  • DarkUndeadSpawnDarkUndeadSpawn Member Posts: 64
    New 2 attributes
    Name them Speed
    ..Level

    They should be both integers

    Have the actor use a variable

    "I usually use this method and works too!!"

    If game.level = 1

    change attribute
    game.speed to 100
    ________________________________________________________

    If game.speed = 100

    do
    move to
    Accerate speed should
    be changed to
    100

    Do that on of course a different actor.

    Continue it on

    If game.level = 2

    change attribute
    game.speed to 200

    If game.speed = 200

    do
    move to
    Accerate speed should
    be changed to
    200

    You should get the point.

    Cheers!

    DarkUndeadSpawn.
Sign In or Register to comment.