The Daily Click ::. Forums ::. Klik Coding Help ::. How to make a bad guy move when hit!
 

Post Reply  Post Oekaki 
 

Posted By Message

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
1st May, 2013 at 01/05/2013 21:37:58 -

Hi, i am almost 2 years into development of my game "Sweezy Gunner" and i thought it would be a nice touch. Its a top down shooter and i think this might add a nice little punch to the game

What i have been trying to achieve is when a monster is hit by a bullet it moves ever so slightly in the direction the bullet was moving. Sounded simple to me but i just cant get it right.

Any ideas?

 
n/a

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
1st May, 2013 at 01/05/2013 22:25:34 -

Are you using the Advanced Direction Object? With that, you can calculate the direction the bullet is moving, use an Alterable Value or a Flag to indicate a bullet is overlapping a monster, then make the monster acquire the same direction the bullet is moving. Destroy the bullet only after the Flag is tripped. If more than one bullet is overlapping, then Pick One of Bullet to make it work.

Wow...That was a lot of conjecture on my part. Hope it's useful.

 
n/a

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
1st May, 2013 at 01/05/2013 22:27:28 -

ha ha, sounds like a plan, ill try it. thanks!

 
n/a

nim



Registered
  17/05/2002
Points
  7234
2nd May, 2013 at 02/05/2013 06:45:37 -

Sweezy Gunner pretty good! I've been following the Tigsource devlog.

How does the enemy movement work right now? That would help to know.

 
//

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
3rd May, 2013 at 03/05/2013 18:34:22 -

hey NIM! sadly they use mostly use bouncing ball, all i really want is to make it look like they are being forced back 1 or 2 pixels each time they get hit.

I know i shouldn't use built in movements but sadly when i started this project i didnt know what i know now.

Thanks for the help dude!

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
3rd May, 2013 at 03/05/2013 19:46:40 -

Try something like this, perhaps: http://jollycrouton.com/Uploads/misc/bulletbounce.mfa

It won't be perfect if it's not used in a system with completely custom physics, but maybe it'll help!

 

  		
  		

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
3rd May, 2013 at 03/05/2013 19:50:23 -

nice, ill take a look, thanks

 
n/a

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
3rd May, 2013 at 03/05/2013 19:50:26 -

nice, ill take a look, thanks

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
3rd May, 2013 at 03/05/2013 19:55:50 -

If you've already downloaded it, I made a tiny change you'll probably want to grab.

 

  		
  		
   

Post Reply



 



Advertisement

Worth A Click