The Daily Click ::. Forums ::. Klik Coding Help ::. I'd like to axe you guys a question.
 

Post Reply  Post Oekaki 
 

Posted By Message

Deleted User
23rd January, 2009 at 17:58:34 -

I have an enemy that is throwing an axe. I've got most of it done, but I want him to throw it at the player. It's got it's own gravity, which works, and it goes in the right direction, I just need to know how to estimate the distance. I figured I would just calculate the distance from the player, then divide that by whatever, then have the axe travel at that speed, but he always whips it like crazy. I took off the calculation, and of cource it goes straight up and down nicely so it's obviously just how I did my calculations.

 

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
23rd January, 2009 at 18:13:01 -

We need a few more details on how you have your engine set up. Or maybe just some source code.

 

  		
  		

Deleted User
23rd January, 2009 at 18:54:43 -

Well the rest of the code is fine, there is nothing else contributing to the axe moving on the aXe(HA) axis, other than

when enemy shooting animation is over then
--create axe at enemy
--set axe to direction of enemy
--set axeSpeed to Abs(LongDist( "Advanced Direction Object", X( "beserkerAxe" ), Y( "beserkerAxe" ), X( "player" ), Y( "player" ))/8.) (stupid emotes, the . is there for space)
--bring to front
--set gravity variables


if axe is facing >
--then set X to X+axeSpeed
if axe is facing <
--then set X to X-axeSpeed

Oops, I figured it out, I put the /8 in the wrong bracket. It works now.

Edited by an Administrator

 

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
23rd January, 2009 at 18:56:30 -

Yay!
 

			
  	    

 

  		
  		

Aptennap



Registered
  23/04/2004
Points
  916
23rd January, 2009 at 21:07:09 -

Wow OldMan, you're good!

 
Oh sweet mary.

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
23rd January, 2009 at 21:12:34 -

 
 

			
  	    

 

  		
  		

Bibin

At least 9001

Registered
  01/07/2005
Points
  308

Silver Cup WinnerGOTW Winner!Has Donated, Thank You!VIP Member
24th January, 2009 at 00:37:33 -

You need to make sure you don't AXE-identally make those mistakes in the future!

 
n/a

W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  374

VIP MemberCardboard BoxThe Cake is a Lie
24th January, 2009 at 01:18:38 -

AXE-choo!!

 
An old and washed up once-kid

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
24th January, 2009 at 02:04:36 -

Lol, that's why I do all my formulas in Lua now

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  374

VIP MemberCardboard BoxThe Cake is a Lie
24th January, 2009 at 03:00:09 -

Lol Well, Lua AXE just about as well as does regular coding! But maybe I'm just over AXE-aggerating.

 
An old and washed up once-kid

Deleted User
24th January, 2009 at 03:50:13 -

You guys are a bunch of axe holes. I'm gonna go relaxe because coding is really taxeing. I think I want some tic taxe.

 

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
24th January, 2009 at 04:35:58 -

Everyone in this thread is making an axe out of themselves.

 
Craps, I'm an old man!

chrilley

Insane Beaver

Registered
  05/01/2002
Points
  704

Game of the Week WinnerVIP Member360 Owner
24th January, 2009 at 08:00:02 -

Axellent.

 
Image

W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  374

VIP MemberCardboard BoxThe Cake is a Lie
24th January, 2009 at 16:38:16 -

AXE-tually Shab, we're just making bad puns. Lol

Edited by W3R3W00F

 
An old and washed up once-kid

Deleted User
24th January, 2009 at 17:00:10 -

This is just fantaxetic.

Okay, Thread Over.

 

W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  374

VIP MemberCardboard BoxThe Cake is a Lie
24th January, 2009 at 17:03:03 -

AXEministrator message: This topic has been locked.

 
An old and washed up once-kid

easyname



Registered
  15/04/2008
Points
  450
26th January, 2009 at 16:32:25 -

Here's a good axeample of how this could be implemented:

http://theclickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=122416#Post122416

Edited by easyname

 
n/a
   

Post Reply



 



Advertisement

Worth A Click