User Tag List

Results 1 to 2 of 2

Thread: Tower defense tower firing

  1. #1
    No Products Registered

    Join Date
    May 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Tower defense tower firing

    Ok, i am currently trying to create a tower defense type game and so far it has been going well. However i am having trouble make the towers fire. They currently will fire but only when the last created enemy is within range. I have looked into other already made games and looked at the coding and they all use a series of loops and fixed values which im kinda unfamiliar with. I was able to copy it all down into mine while replacing all the objects with mine and adding in the necessary alterable values but now it doesnt fire at all. Anyone know of a simpler way to make it work or have a way to explain loops and fixed values and what it means when i use them and why it is any different than just using values.

  2. #2
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tower defense tower firing

    The problem is, you have many turrets and many enemies that you need to compare all combinations of, to find enemies in range of each turret. MMF won't do this for you. The solution is to use loops to test the combinations yourself.

    Loops run the same events as many times as you tell them to.

    Loops are normally used together with "Spread Value", which gives every object of that type a unique number, counting up. You can get the "loop index" of a loop, which counts up each time it runs the loop events. Put together, you can go through objects one-by-one.

    A fixed value is a unique identifier for an object. These are normally used for pairing objects together, e.g. turret and target.

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: Blocks
    By picklecow in forum File Archive
    Replies: 2
    Last Post: 10th November 2009, 05:26 AM
  3. very basic tower defense
    By maVado in forum File Archive
    Replies: 6
    Last Post: 19th July 2009, 12:10 PM
  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
  •