User Tag List

Results 1 to 6 of 6

Thread: Shoot object not straight...?

  1. #1
    Clicker Multimedia Fusion 2 Developer
    Blue66's Avatar
    Join Date
    Jan 2008
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Shoot object not straight...?

    Hi there!
    Sorry for this stupid question, but right now I'm trying to make an object shoot a bullet towards the player guy. Yeah it's really that simple and still I managed to mess it up

    I'm using this:
    >Every 3 seconds
    ->(Enemy) shoot (Bullet) towards (0,0) from (Player)

    I've set all hot spots to the middle of the objects but still it doesn't shoot straight towards the player. Depending on the position of the player on the screen it shoots a bit more to the left, right, below or above the player but not directly to his position!

    Could someone please explain what I'm doing wrong? I'm still learning

  2. #2
    No Products Registered

    Join Date
    Jan 2008
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Shoot object not straight...?

    The "shoot" action works with only 32 directions. Therefor it can be off by 360/32=11.25 degrees.

    Easiest way to fix this would be to add this code in the bulletobject's behavior:

    Code:
    Always -> Look at (0,0) from Player.
    That way the bullet will always correct its own path.

  3. #3
    Clicker Multimedia Fusion 2 Developer
    Blue66's Avatar
    Join Date
    Jan 2008
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Shoot object not straight...?

    Ah! That's good to know, thank you!

    I've put it in the code and the bullet now always shoots towards the player... and it became a homing missile (wow cool, I will use this later for the harder enemies!)

    <few minutes later>
    Okay I've fixed it by making another object that gets centered at the player location at the time the bullet gets shot (and bullet flies to that object instead of the player). But now the bullet stays in the air if it reaches the coordinates. But I want it to fly in one straight direction until it reaches the end of the screen.

  4. #4
    No Products Registered

    Join Date
    Jan 2008
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Shoot object not straight...?

    Alright you might want to make true 360 degrees shooting. This can be done with the advanced direction object.

  5. #5
    Clicker Multimedia Fusion 2 Developer
    Blue66's Avatar
    Join Date
    Jan 2008
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Shoot object not straight...?

    Umm... could you explain a little bit more please?

    I'm really missing some tutorials for "advanced" stuff like this on the web

  6. #6
    No Products Registered

    Join Date
    Feb 2007
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Shoot object not straight...?

    Try doing a search, i think there are lots of examples.

Similar Threads

  1. How would you move an object in straight line pixel by pixel from location to another
    By Tsun in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 22nd December 2012, 10:38 PM
  2. shoot an object
    By taciturn in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 3rd October 2008, 10:53 PM
  3. What's the best way to shoot an object?
    By Ravenius in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 20th May 2008, 06:43 PM
  4. shoot an object
    By Nate in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 1st February 2008, 02:21 PM
  5. Problems with Shoot an Object
    By flamewavex in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 23rd February 2007, 05:24 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
  •