User Tag List

Results 1 to 2 of 2

Thread: Making a tower defense

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Dec 2022
    0 Post(s)
    0 Thread(s)

    Unhappy Making a tower defense

    So I am making a tower defense. How do I make so when you click it places it down.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    VBEinc's Avatar
    Join Date
    Oct 2015
    12 Post(s)
    0 Thread(s)
    Quote Originally Posted by FlankoTanko View Post
    So I am making a tower defense. How do I make so when you click it places it down.
    There is a few different ways, but I assume you would want to use the Grid Feature.

    I.e. Click somewhere within a grid to drop a turret.

    First you would need an always event with the following for a 640x480 Game Screen size. Link a 40x40 square to the mouse movement ( Border ).
    1) ( XMouse / 40 ) * 40
    2) ( YMouse / 40 ) * 40

    This makes a 40x40 Grid ( Adjust the 40 as needed for the screen size you are using.)

    Next you will need the Object you wish to place.
    Typically I make a duplicate of whatever I want to place that has no animation. Basically a Static Object ( Clickable ) and the Actual Object ( Place able )

    Once you have them ready. You would make it so when you click on the Static Object, it turns Flag 0 on.
    Then when you click on the map, The Place able object is created in the location you clicked positioned at the 40x40 square border and Flag 0 for the Static object is turned off.
    This will create 1 turret at the location you clicked on the map.

    You can also use qualifiers so that you can't place one turret on top of another. This can also be used to keep turrets from being placed on roads, trees, water, etc...
    I.E. User clicks on another turret while flag 0 is on. Nothing happens or an error sound could be played.
    The Qualifier is not over lapping the qualifier, allow placement!

    Another way is to use the Static Object as a controller without Flags.

    Here is a quick little .MFA using Direction of the Static Object to control Placement.

Similar Threads

  1. Replies: 1
    Last Post: 28th December 2014, 10:57 PM
  2. (WIP) Two-Way Tower-Defense Game
    By Nerf in forum WIP & Released Games & Apps
    Replies: 0
    Last Post: 16th October 2014, 02:14 AM
  3. Elaboration d'un Tower defense
    By faeriebass in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 5th June 2010, 01:45 PM
  4. Tower defense tower firing
    By splicel in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 7th May 2010, 06:34 PM

Posting Permissions

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