How to make a tower shoot?

mandancemandance Member Posts: 87
edited November -1 in Working with GS (Mac)
I'm a bit stumped, Any ideas on getting a tower to shoot at an actor/actors?

Comments

  • EastboundEastbound Member, BASIC Posts: 1,074
    You will need to use the vector function. Set the bullet's direction to (using change velocity action is easiest):

    NOTE: You should also be constraining the actor you are shooting at's x and y variables to global variables.

    vector_to_angle(position_x - (actor's_global_x), position_y - (actor's_global_y))

    There are also a few examples on this, just search in gamesalad templates.
  • JGary321JGary321 Member Posts: 1,246
    If you're trying to make a TD game don't. GS cannot quite handle this yet. Constraining all those X/Y's of the enemies will kill FPS. Plus having several 'towers' spawning or even recycle 'bullet' units will kill it. Then the sound that the collision with enemy has to make. Throwing out 5 sounds at once will kill performance. Then you have to track the damage each type of tower will give to the enemy, this will take a lot of rules in each enemy actor.. Trust someone who has tried, hold off on TD games for a little while.
Sign In or Register to comment.