Shoot At Mouse ?

kali

  • Posts: 12
So im making This shooter game and i have tryed to look up tuts to do this but cant find a good one  , i want My player Bullet to shoot to the Last clicked spot , i got it to shoot from my "Good guy" ship but it dosent fly to the last clicked spot , it shoots to the bottom right of the screen, now when i move the mouse around it does have some what of an effect on the direction of the projectile , but not much , i want it to go straight to the last spot the mouse was clicked and past , Bolth pictures Below are attached to "good gy" ship , anyone have any idea whats going on ??

playtheHnote

  • Posts: 395
Try This....
x center of actor and y center of actor should be your "Good Guy Ship" and the velocity block should be referencing the bullet

(and actually I have that wrong give me a sec to get a better example)
Check out my instrumental rock album "Hail to the Chosen One" at: https://soundcloud.com/play-the-h-note

Visit my facebook page @ https://www.facebook.com/justin.shellhorn.1
"Sound King"  now available at the forge see http://community.stencyl.com/index.php/topic,35672.0.html
for more info!

playtheHnote

  • Posts: 395
Here this should work better :)
Check out my instrumental rock album "Hail to the Chosen One" at: https://soundcloud.com/play-the-h-note

Visit my facebook page @ https://www.facebook.com/justin.shellhorn.1
"Sound King"  now available at the forge see http://community.stencyl.com/index.php/topic,35672.0.html
for more info!

kali

  • Posts: 12

playtheHnote

  • Posts: 395
if your scene is larger than the screen you may try accounting for camera pos like this:
Check out my instrumental rock album "Hail to the Chosen One" at: https://soundcloud.com/play-the-h-note

Visit my facebook page @ https://www.facebook.com/justin.shellhorn.1
"Sound King"  now available at the forge see http://community.stencyl.com/index.php/topic,35672.0.html
for more info!

kali

  • Posts: 12
DArn im still not gettin it lol . so when mouse is clicked , it will create a bullet on x and y axis of player , from there the bullet will be pushed to the mouse , and all this code can be put in player , im sorry im a lil  new to stencyl


playtheHnote

  • Posts: 395
I have just added a behavior for this to the forge.

Go to the forge under behaviors and search: Bullet Manager.
It should have my logo.
Here are a couple screen shots of it:
Check out my instrumental rock album "Hail to the Chosen One" at: https://soundcloud.com/play-the-h-note

Visit my facebook page @ https://www.facebook.com/justin.shellhorn.1
"Sound King"  now available at the forge see http://community.stencyl.com/index.php/topic,35672.0.html
for more info!

kali

  • Posts: 12
wow you guys are amazing thank you !