User Tag List

Results 1 to 6 of 6

Thread: More Help With Basic Game

  1. #1
    No Products Registered

    Join Date
    Feb 2013
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    More Help With Basic Game

    I am having some more trouble with my basic game. I made it so that the bullets blow holes in the terrain by adding "Not An Obstacle" circles to the backdrop. The bullets fall through the holes, but not the tank. I think it is because I am using 8 direction movement for the tank. But I don't know an easy way to fix it.

    The other problem is the turns system. I created a counter that should be on "0" for player 1's turn, or "1" for player. Since the turn should switch every time a bullet hits the ground, I added an action to condition #8 that activates a loop and runs conditions #32 and #33. #32 changes from player 1's turn to player 2's turn. #33 changes from player 2's turn to player 1's turn. These are not working.

    Could someone take a look at it? Thanks a lot:

    tanks10.mfa

    Some other changes I made are adjustable firepower and limited fuel. I did not setup the wind system yet, because I want it to change every turn, and I need to get the turns system working first.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    The eight direction movement doesn't have any gravity, so you will need to add it in manually.

  3. #3
    No Products Registered

    Join Date
    Feb 2013
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by happygreenfrog View Post
    The eight direction movement doesn't have any gravity, so you will need to add it in manually.

    What is the best way to do that? (Dumb question, I know)

  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Like happygreenfrog say, the tank doesn't fall into the hole because of the movement you're using - try the platform movement instead (it's very buggy, and eventually you'll want to learn how to make your own custom movement, but that's a fair amount of work, so for now just stick with the built-in movement).

    The reason your turn-changing events don't work is because of the way MMF2 does things. Each frame, it runs through every line of code from top to bottom, one line at a time - not simultaneously. What happens in your game, is that MMF2 reads line #32, and because the counter = 0, it sets the counter to 1. Then when it gets to line #33, the counter is already at 1, so it immediately sets the counter back to 0 again.
    The simplest solution is to replace the counter with a flag (create a new active object to store flags / values / strings that don't need to be global), which can be toggled.

    eg.
    + On loop "ChangeTurn"
    -> Active: Toggle Flag 0

    + On loop "ChangeTurn"
    + Flag 0 of Active is OFF
    -> String: Display paragraph 1

    + On loop "ChangeTurn"
    + Flag 0 of Active is ON
    -> String: Display paragraph 2

  5. #5
    No Products Registered

    Join Date
    Feb 2013
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by MuddyMole View Post
    Like happygreenfrog say, the tank doesn't fall into the hole because of the movement you're using - try the platform movement instead (it's very buggy, and eventually you'll want to learn how to make your own custom movement, but that's a fair amount of work, so for now just stick with the built-in movement).

    The reason your turn-changing events don't work is because of the way MMF2 does things. Each frame, it runs through every line of code from top to bottom, one line at a time - not simultaneously. What happens in your game, is that MMF2 reads line #32, and because the counter = 0, it sets the counter to 1. Then when it gets to line #33, the counter is already at 1, so it immediately sets the counter back to 0 again.
    The simplest solution is to replace the counter with a flag (create a new active object to store flags / values / strings that don't need to be global), which can be toggled.

    eg.
    + On loop "ChangeTurn"
    -> Active: Toggle Flag 0

    + On loop "ChangeTurn"
    + Flag 0 of Active is OFF
    -> String: Display paragraph 1

    + On loop "ChangeTurn"
    + Flag 0 of Active is ON
    -> String: Display paragraph 2


    Thanks so much! Both problems fixed now.

    I am still not sure why the second one did not work how I had it. I know MMF2 reads events in order. But I had the one event set to activate only if the counter was 0, and the other to only activate if it was 1. So only one of the events should have run.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    No, it would have run the first one, and then it would have equaled 1, which means that it would instantly change back to 0. If you need an example of that, let me know.

Similar Threads

  1. Making a basic maze game - tilesets?
    By TheSynapse in forum Multimedia Fusion 2 - Technical Support
    Replies: 18
    Last Post: 6th May 2014, 02:39 AM
  2. Help With Basic Game
    By flyoffacliff in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 3rd March 2013, 04:59 PM
  3. Some basic questions
    By SlapFace in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 19th May 2009, 04:17 PM
  4. Very Basic i know.
    By kayli051203 in forum The Games Factory 2 - Technical Support
    Replies: 4
    Last Post: 18th January 2007, 10:23 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
  •