User Tag List

Results 1 to 7 of 7

Thread: very basic tower defense

  1. #1
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    very basic tower defense

    This is very basic, just shows you how to get the distance and object selection right.

    Use left mouse to place turrets along the road. Rightclick will destroy the turrets and also enemy jeeps.

    Jeeps spawn every 7 and 3 seconds, the second one has more "HP". Check out the objects alt. values.

    Mouse over enemy jeeps to see the current HP value on the bottom counter.

    Turrets have a range and will always aim and shoot at the closest target.

    Feel free to play around with it.
    Attached files Attached files

  2. #2
    No Products Registered

    Join Date
    Feb 2009
    Location
    Texas
    Posts
    825
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: very basic tower defense

    yea :d i will be sure to check this out later

  3. #3
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: very basic tower defense

    Very nice and helpful MaVado. Thank you.

    stephen1980
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  4. #4
    No Products Registered

    Join Date
    Apr 2008
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: very basic tower defense

    Thanks alot. It works great :-)

    I increased the range on the Canon to "200"
    But the bullet disapears in a range of "50" or so.
    How can i change that?

  5. #5
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: very basic tower defense

    The bullet object has a behavior. Just increase the value to let the bullet stay longer on the screen.

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Yima's Avatar
    Join Date
    Feb 2008
    Location
    Sweden
    Posts
    104
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: very basic tower defense

    I'm also planning to do a tower defense kind of game, but I want my turrets to behave differently. I always want them to shoot the enemy that has traveled furthest towards the end. I figured I could keep track of this by addind a value to the enemy, that increases for each pixel the enemy is moved. This way, the enemy that has moved the furthest will have the highest value. After I've done this, I want to loop through my towers (that all have unique id:s) and do something like this:

    Pick the ememy with the highest value, that is also within range of the tower, and shoot at it.

    The range check will be solved by assigning the current tower to a clickteam movement object, which then can be used to check the distance between the tower and each enemy. However, I have no idea about how I would go about picking the enemy with the highest value. If anyone could give me advice on this I would be very thankful.

  7. #7
    Clicker Multimedia Fusion 2
    Algul's Avatar
    Join Date
    Feb 2008
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: very basic tower defense

    to Yima:
    I made tower defence example while back(it is posted in this forum somewhere) that do just that.
    Pseudo code looked like this:
    +always
    -clear towers values(selected target)

    +always
    -start loop "find-targets" - number of towers times

    +on loop "findtargets"
    +pick one tower
    -start loop "find-target-for-this-tower" - number of enemies times

    +on loop "find-target-for-this-tower"
    +pick one enemy
    +is this enemy closer to base then current enemy?
    +is this enemy in range of tower?
    -set this enemy as target
    -store distance to base of this enemy

    this will loop through all enemies and after it finish, tower will have best target selected
    hope this help

Similar Threads

  1. Elaboration d'un Tower defense
    By faeriebass in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 5th June 2010, 01:45 PM
  2. Tower defense tower firing
    By splicel in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 7th May 2010, 06:34 PM
  3. Tower Defense: Blocks
    By picklecow in forum File Archive
    Replies: 2
    Last Post: 10th November 2009, 05:26 AM
  4. Tower Defense with MMF2?
    By gro0003 in forum Multimedia Fusion 2 - Technical Support
    Replies: 22
    Last Post: 12th August 2007, 01:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •