Tower defense-like towers

bjoerdaubitbjoerdaubit Member Posts: 12
edited November -1 in Working with GS (Mac)
Hi folks,

I am trying to implement towers into my game which are shooting incoming enemies. There are certain mechanics which I can't really figure out how to create. Maybe you guys can give me some hints, help or even templates. The towers should: ..

.. Shoot spawned incoming opponents automatically
.. Switch to the next opponent after the one shot before is dead
.. Optional: Always shoot the closest opponent

Since Gamesalad doesn't have Arrays (yet) I really have a hard time thinking about how to
store the spawned enemies X,Y coordinate and how to switch targets etc.
Thanks for your time and help!!

greez

Comments

  • RocketBrainRocketBrain Member, PRO Posts: 269
    i've been working on this puzzle for the last 6 months or so....either nobody here knows or wants to release their secrets.

    i've tried range based with magnitude, i've tried overlap.

    the issue i'm having is you cant communicate attributes directly between actors which means when one target gets in range of any gun....then all the guns fire at that target.
  • davidsalomondavidsalomon Member Posts: 136
    It is possible to be done.
    Darren, from deepblueapps and UtopianGames, has a template you might have to buy to figure out everything.
    I don't think it's that simple enough for people to describe it in one post.

    Here's the template:
    image

    There's a video in it that shows off the whole template; waves, enemies, levels, bosses, etc. and according to the information below the video, he has put notes in all actors explaining how the code works!
    I don't know how much £10 (~$16) is for you, but I guess it's not that much for this awesome TD template.
    In my case, I can't be purchasing things as I want, I'll have to be patient for now. Plus, I am working in my first game and certainly it wont be a TD game :P.

    Note: I don't get commission for this. Lol. :(

    [ds]
  • davidsalomondavidsalomon Member Posts: 136
    @bjoerdaubit: Are you buying the template? I'd like to know if you will and how are you doing with your game! ;)
  • RocketBrainRocketBrain Member, PRO Posts: 269
    neat template, doesnt solve the issues i'm having but it answers some other questions. i'd like to find a way to have lots of towers without having to create them all manually. but i'm detecting that gamesalad doesnt have that capability. guess i'll go make 50 of each type of tower ;)
  • FloridaGamesFloridaGames Member Posts: 328
    I can tell you how to do it, but it involves ALOT of coding, you'd be much better off waiting for table and arrays update since it would make this project 1000x easier to make. But if you want to try, here you go:
    give all your towers an attribute "self.target"
    then you have to make a new actor for every enemy.
    Then youd have to make an attribute for every enemy for the tower to determine magnitude: then give the tower this rule for every enemy:
    when self.enemy1distance < 100(whatever distance you want) then change attribute "self.target" to 1.
    when "self.target = 1" spawn actor bullet, direction(magnitude).
    I have a project i started that has like 2-3 enemys, that i postponed until tables/array update. I'll email you the project if you want to take a look.
  • bjoerdaubitbjoerdaubit Member Posts: 12
    Hey everyone,

    thanks for your comments. Maybe I will buy the template, have to think about that.
    @FloridaGames: Would be nice if you could email me the project at bjoernfrechenhaeuser@daubit.org thx!! :)

    Having to create every actor by hand and creating attributes for that actor is exactly what I want to avoid. Because in my game I want to have many enemies and it would be more than tideos to create like 50 enemies by hand...
    Hopefully they will improve gamesalad for that kind of functionality soon.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    bjoerdaubit said:
    Hey everyone,

    thanks for your comments. Maybe I will buy the template, have to think about that.
    @FloridaGames: Would be nice if you could email me the project at bjoernfrechenhaeuser@daubit.org thx!! :)

    Having to create every actor by hand and creating attributes for that actor is exactly what I want to avoid. Because in my game I want to have many enemies and it would be more than tideos to create like 50 enemies by hand...
    Hopefully they will improve gamesalad for that kind of functionality soon.

    the problem isnt creating actors and attributes thats the incredibly easy part. The problem is we dont have tables and arrays.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    bjoerdaubit said:
    Hey everyone,

    thanks for your comments. Maybe I will buy the template, have to think about that.
    @FloridaGames: Would be nice if you could email me the project at bjoernfrechenhaeuser@daubit.org thx!! :)

    Having to create every actor by hand and creating attributes for that actor is exactly what I want to avoid. Because in my game I want to have many enemies and it would be more than tideos to create like 50 enemies by hand...
    Hopefully they will improve gamesalad for that kind of functionality soon.

    the problem isnt creating actors and attributes thats the easy part. The problem is we dont have tables and arrays.
Sign In or Register to comment.