@12Tyrant - Targeting bullets to the mouse position

SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
edited July 2014 in Working with GS (Mac)

Comments

  • 12Tyrant12Tyrant Member Posts: 7

    Hi, I have been having a lot of trouble figuring out how to use mouse position in order to shoot bullets. I have been working for hours on how to make it work. I have my actor facing my mouse and whenever i click the mouse, bullets come out. but the bullets don't go in the direction where the mouse is. The bullets just go in the direction where they are told to go when they spawn, but every tutorial i watch just seems to work out perfectly no matter which direction they are told. Thank you for reading

  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    edited July 2014

    I Split this post into it's own topic.

  • 12Tyrant12Tyrant Member Posts: 7

    how do i do that

  • 12Tyrant12Tyrant Member Posts: 7

    i don't want to make a conference i just want an answer

  • 12Tyrant12Tyrant Member Posts: 7

    @12Tyrant said:
    i don't want to make a conference i just want an answer
    oh i thought you told me to split the discussion. anyway thx but does anyone have any idea on how i can make my bullets go in the direction where my mouse is

  • 12Tyrant12Tyrant Member Posts: 7

    if someone would like me to post the project on here and take a look just tell me

  • SocksSocks London, UK.Member Posts: 12,822

    In the bullet actor, place two 'real' attributes, 1 & 2.

    Then make two change attribute behaviours.

    Change Attribute 1 to mouse X
    Change Attribute 2 to mouse Y

    Then send the bullet towards these two coordinates.

  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
  • 12Tyrant12Tyrant Member Posts: 7

    I know I'm not really good at explaining over typing i will try again. There is a gunman that is controlled with the wads keys. Where the mouse is the gunman actor is facing. Whenever the mouse is clicked bullets come out but instead of the bullets going in the direction where the mouse is they go in one direction.

Sign In or Register to comment.