User Tag List

Results 1 to 8 of 8

Thread: Test for certain angle of object?

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Feb 2007
    Location
    UK
    Posts
    196
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Test for certain angle of object?

    Is there a way to do this, please?

    I want to create a spotlight, so I want to test: if Active Object: 'Spot Light' > Angle 35 > Set Alt Value to 1

    Many thanks,
    Dave.

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Gradius's Avatar
    Join Date
    Jul 2015
    Posts
    117
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You can use "Compare two general values" to do this, I think.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,254
    Mentioned
    25 Post(s)
    Tagged
    0 Thread(s)
    An easy way is to set a variable of the object to its angle. I tend to set a variable, then set the object's angle to that variable (in that order). Then you always have the angle stored and it is much easier to manipulate the angle of the object in general. You can also then compare the variable to a value. You should avoid using "compare 2 general values" because you won't get object scoping with that method (and will probably post a follow up question involving scoping) :P .

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Feb 2007
    Location
    UK
    Posts
    196
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mobichan View Post
    An easy way is to set a variable of the object to its angle. I tend to set a variable, then set the object's angle to that variable (in that order). Then you always have the angle stored and it is much easier to manipulate the angle of the object in general. You can also then compare the variable to a value. You should avoid using "compare 2 general values" because you won't get object scoping with that method (and will probably post a follow up question involving scoping) :P .
    @mobichan - Would you please be able to make an example of this if you have the time please?

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,254
    Mentioned
    25 Post(s)
    Tagged
    0 Thread(s)
    angle_to_target.mfa

    Here is a super simple example. Move with the arrow keys. For what you wanted to do, you would just test the angleToTarget variable's value against whatever angle you need.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Feb 2007
    Location
    UK
    Posts
    196
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @mobichan - Cheer buddy I will test this tomorrow.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Feb 2007
    Location
    UK
    Posts
    196
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @mobichan - Cool example mate, i'm sure I can use this somewhere else in my game in later levels. But it's not what I'm looking for. I have figured out a way to do a spotlight but it goes out of sync. I can make a reset for it but seems like a crude fix to me.

    EDIT - What i'm looking to do it > If Active1 at Angle 45 > Set Angle of Angle to -1

    If Active1 at Angle -45 > Set Angle of Angle to +1

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,254
    Mentioned
    25 Post(s)
    Tagged
    0 Thread(s)
    I still don’t understand what you are trying to do. Can you tell us a little about your game and what this is specifically trying to do?

Similar Threads

  1. Replies: 5
    Last Post: 6th April 2018, 12:49 PM
  2. Always Angle towards object from hot spot
    By Bree in forum Fusion 2.5
    Replies: 2
    Last Post: 11th February 2016, 07:58 PM
  3. Shooting an object - calculate angle
    By ToffeeandPebbles in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 26th February 2011, 12:26 AM
  4. Set angle of object to look at mouse
    By Steven in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 3rd July 2010, 04:02 PM
  5. Angle From Object Problem
    By Atom in forum File Archive
    Replies: 10
    Last Post: 18th October 2008, 10:34 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
  •