User Tag List

Results 1 to 3 of 3

Thread: 360 degree shooting

  1. #1
    Clicker Fusion 2.5HTML5 Export ModuleiOS Export ModuleSWF Export Module
    Hayo's Avatar
    Join Date
    Jul 2006
    Location
    Netherlands
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    360 degree shooting

    Hello folks,

    I have been reading quite a lot of articles about this subject, but I still have problems. I am sure this is because I suck at coding but I am here to learn.

    My main dude has a 360 degree movement, now I want him to be able to shoot (or actually toss hammers). For this I use:

    Press fire 2 -> Set posX of "Hammer" to Cos(rotY("player" ))*4
    Set posY of "Hammer" to Sin(rotY("player" ))*4


    posX and posY are values
    rotY is the rotation value of the player

    Always -> Set X of "Hammer" to X( "Hammer" )+posX( "Hammer" )
    Set Y of "Hammer" to Y( "Hammer" )(posY( "Hammer" )


    But this doesn't seem accurate, sometimes it's right, sometimes its a little off, which makes it hard to aim. What am I doing wrong?

  2. #2
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    UrbanMonk's Avatar
    Join Date
    May 2008
    Location
    Southern U.S.A.
    Posts
    847
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: 360 degree shooting

    Hello Hayo,

    The problem lies in the fact that you can't have floats for positions.

    Instead of doing:

    Always ->
    Set X of "Hammer" to X( "Hammer" )+posX( "Hammer" )
    Set Y of "Hammer" to Y( "Hammer" )(posY( "Hammer" )

    Do this instead:

    Always ->
    Set Alterable Variable HammerX to HammerX( "Hammer" )+posX( "Hammer" )
    Set Alterable Variable HammerY to HammerY( "Hammer" )+posY( "Hammer" )
    Set X of "Hammer" to HammerX( "Hammer" )
    Set Y of "Hammer" to HammerY( "Hammer" )

  3. #3
    Clicker Fusion 2.5HTML5 Export ModuleiOS Export ModuleSWF Export Module
    Hayo's Avatar
    Join Date
    Jul 2006
    Location
    Netherlands
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 360 degree shooting

    Awesome, that fixed it, thanks dude!

Similar Threads

  1. another 360 degree shooting question
    By Greasy in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 6th May 2012, 11:21 PM
  2. 360 degree shooting
    By Triclyde in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 10th March 2010, 07:13 AM
  3. 360 Degree Shooting
    By Amade in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 6th February 2008, 12:46 AM
  4. What have I done wrong? (360 degree shooting)
    By gum in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 27th September 2006, 06:46 PM
  5. 360 degree shooting
    By willy in forum Multimedia Fusion 2 - Technical Support
    Replies: 31
    Last Post: 23rd July 2006, 03:26 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
  •