Aim Line

zerosimms

  • *
  • Posts: 668
Hi,

I'm after a behaviour that draws a line from a 'Cannon' to the edge of the game wall, in the direction the cannon is facing and once the line has hit the wall I'd like it to reflect in the direction the projectile will go. Pretty common behaviour for aim and shoot games, I've attached a screenshot of a game using it.

Any ideas on how I might go about replicating this? I'm struggling a little with this one
Cheers

Electric Fruit

  • *
  • Posts: 96
Hi

I'm not sure how to do it using just the draw events but I've had good results playing around with what LIBERADO (thanks) has done here. When the line collide with an object I just had it change velocity to match what the bouncing object would do. I did try to get a none moving line working by hiding the projectiles and then using their coordinates to draw a line and although I never managed to get it to work to a satisfactory level. Hope it helps

would I be able to draw the predicted path of my golf shot using this extension, the power is a constant but the angle can change,

<a href="http://static.stencyl.com/games/35170-0.swf" target="_blank" class="new_win">http://static.stencyl.com/games/35170-0.swf</a>

zerosimms

  • *
  • Posts: 668
Hey, thanks for this - it gives me somewhere to start :)