Game Help!

GameCre8torGameCre8tor Member Posts: 49
edited November -1 in Working with GS (Mac)
Hi,

I have made a mini map for my game, but there is only ever 1 enemy red dot on the map at any one time. Once I destroy the enemy actor, the red enemy dot moves to another enemy's location on the mini map.

How do I make a dot for every instance of the enemy that is spawned?

Thank you,
GameCre8tor

Comments

  • GameCre8torGameCre8tor Member Posts: 49
    P.S.

    A link to my game http://gamesalad.com/game/play/69975

    (The yellow enemy does not have a dot on the minimap yet.)
  • quantumsheepquantumsheep Member Posts: 8,188
    Dude, I really like your game!

    What I would do, is work out how many of each enemy type will be on-screen at once. Have a maximum amount. Let's say eight for now as an example.

    So, you have a maximum of eight enemies on screen.

    One solution would be to have eight variants of your enemy. So, say you have 'RocketShip1' as an enemy - you'd then need rocketship2, rocketship3, rocketship4 etc (especially if you're spawning them).

    You'd also need eight radar blips - call them blip1, blip2, blip3 etc and have them constrained to the appropriate rocketship.

    Then, on Rocketship1 you'd have a 'spawn radar blip1' behaviour.
    On rocketship2, you'd have a 'spawn radar blip2' behaviour.

    Also have global variables for each rocketship called 'R1destroyed', 'R2destroyed' etc etc

    On each rocketship's 'destroy' rule (as in, when hit by missile, spawn explosion, destroy rocketship) add a rule that says:

    when the enemy rocketship1 is destroyed, change 'R1destroyed' to true. When rocketship2 is destroyed, change 'R2destroyed' to true.

    THEN - on the corresponding radar blips, have the rule:

    When R1destroyed is true, destroy this actor - so, a different rule for each blip.

    Alternatively:

    If you're using mulitple instances of just Rocketship1, and making them invisible/off the game grid till they're needed, you can have eight rocketship1's on the scene, and then within the scene change the constraining attributes to apply to a different radar blip.

    So, first instance of radar blip in your scene would be for the first instance of rocketship1.
    Second instance of radar blip would be for the second instance of rocketship2.

    And so on.

    That's a bit more complicated though.

    Hope it helps - your game has some nice inertia on it.

    Cheers,

    QS :D

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

  • GameCre8torGameCre8tor Member Posts: 49
    Thanks QS, your help is much appreciated!
Sign In or Register to comment.