User Tag List

Page 3 of 3 FirstFirst 1 2 3
Results 21 to 24 of 24

Thread: Need help and opinion on tank game problem

  1. #21
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    824
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help and opinion on tank game problem

    Quote Originally Posted by Shawn
    Quote Originally Posted by UltimateWalrus
    The exact expression you should use looks something like this:


    Tank sprite --- Set Angle to:
    -1*ATan2(Y("wheel2")-Y( "wheel1" ), X("wheel2")-X( "wheel1" ))
    Okay I'm having a syntax error, and I'm not exactly sure what you are doing at the comma here. How do I make this into a valid equation in the MMF2 expression editor?
    I get no syntax errors at all. You should replace X("wheel1"), X("wheel2"), Y("wheel1"), and Y("wheel2") with your own objects. Note that atan2 is a function that takes two parameters --- e.g., atan(x,y)

  2. #22
    Clicker Multimedia Fusion 2 Developer

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

    Re: Need help and opinion on tank game problem

    atan2 was also only added in the most recent MMF2 build. Make sure you're up to date/

  3. #23
    No Products Registered

    Join Date
    Oct 2009
    Posts
    480
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help and opinion on tank game problem

    You can still do the function still without atan2, just divide the two anwsers manually.

    -Variant

  4. #24
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Location
    USA
    Posts
    2,982
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help and opinion on tank game problem

    Quote Originally Posted by variant
    You can still do the function still without atan2, just divide the two anwsers manually.

    -Variant
    Well apparently I had some typo in my equation. It's working now. The tank rotates properly, it just doesn't really line up with the slope so it looks a little weird. I'm working on fixing that at the moment.

Page 3 of 3 FirstFirst 1 2 3

Similar Threads

  1. Game Cutscenes - Your opinion
    By Renatos in forum iOS Export Module Version 2.0
    Replies: 6
    Last Post: 26th April 2012, 11:22 AM
  2. Simple Tank Battle from templetes: Problem
    By scurvy in forum The Games Factory 2 - Technical Support
    Replies: 2
    Last Post: 18th February 2008, 03:58 AM
  3. Help with a tank game
    By AusZero in forum The Games Factory 2 - Technical Support
    Replies: 6
    Last Post: 4th June 2007, 02:55 PM
  4. Tank Game With Gravity?
    By Nicholas Martin in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 24th November 2006, 11:31 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
  •