User Tag List

Results 1 to 5 of 5

Thread: 360 Degrees shooting problem!

  1. #1
    Clicker Fusion 2.5

    Join Date
    Jun 2006
    Posts
    402
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    360 Degrees shooting problem!

    Hi! i've made a simple 360 Degreese object that can move useing Cos() and sin(). But why arn't the bullets? here look at this code:

    +Repeat while SpaceBar?
    --Create active2(800,600)

    +Active2 Flag(0) is off?
    --Active2 position = (active1X,Active1Y)
    --Active2 valueA = active1 ValueA
    --Set active2 flag0 on

    +Always
    --Set active2X = (Active2X + cos(Active2(ValueA)) * 5
    --Set active2Y = (Active2Y + sin(active2(ValueA)) * 5

    But the bullets look like 32Dir. And i can't seem to fix it!

    P.S:ValueA is the Angle!

    Any help would be great thanks!

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS 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
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: 360 Degrees shooting problem!

    My guess is because you are dealing with integers instead of floating point numbers. Store in a alterable value the floating point position that it should be, and in any calculation use 5.0 instead of 5 (or whatever) to make it use decimals. Then make it set the position to the alterable value, and never read the actual position because it is too imprecise.
    .:::.Joshtek.:::.

  3. #3
    Clicker Fusion 2.5

    Join Date
    Jun 2006
    Posts
    402
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: 360 Degrees shooting problem!

    :S could you show me a piece of code?

    I do not understand what you mean.

  4. #4
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    Merseyside, UK
    Posts
    398
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 360 Degrees shooting problem!

    First check the angle calculation is working by having a counter showing the angle and ensure it is not limited to a small range of values for some reason.

    Second the line is missing a closing backet (or has an extra open):
    Set active2X = (Active2X + cos(Active2(ValueA)) * 5

    I imagine you should have:
    Set active2X = Active2X + cos(Active2(ValueA)) * 5

  5. #5
    Clicker Fusion 2.5

    Join Date
    Jun 2006
    Posts
    402
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: 360 Degrees shooting problem!

    thanks for your help! i've figured it out!

    I used value B+C for xVel and yVel. And it works!

Similar Threads

  1. Strange (!) shooting problem
    By hcem in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 21st August 2013, 04:47 PM
  2. Pulling Problem and Shooting Problem
    By Duggabboo in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 21st March 2010, 05:24 PM
  3. 360 Degrees Shooting Issues
    By variant in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 21st December 2009, 12:51 AM
  4. Shooting Problem
    By Tommy in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 8th January 2007, 11:08 PM
  5. A Small Problem With Shooting
    By LPStreetSoldierM in forum File Archive
    Replies: 2
    Last Post: 22nd August 2006, 06:53 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
  •