The Daily Click ::. Forums ::. Klik Coding Help ::. Highly peculiar platform bash problem
 

Post Reply  Post Oekaki 
 

Posted By Message

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2976

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
15th January, 2008 at 15:19:38 -

Yo!
I have a strange problem with duplicates.
I'm making a cute little medievil Lemming-ish battle engine. In short, a load of tiny soldiers come running from the left and right for a big clash in the middle. There are three types of units, swords, spears and cavalry. You decide the number of each type of unit before the clash. The damage calculating uses small "bullets" that are created in specific frames of the battle animation, one type of "bullet" for each type of unit and side i.e

-blue sword bullet
-purple sword bullet
-blue spear bullet
-purple spear bullet
-blue cavalry bullet
-purple cavalry bullet

The bullets appear at the striking area of the animation (i.e speartip) for a loop or two. If an enemy unit is hit by the bullet it takes damage and is thrown back.

This all works fine most of the times. Swords vs swords is good and even, cavalry vs swords trashes the swords in the blink of an eye, spears against cavalry leaves the spears winning most of the time and swords vs spears is + for the swords. Almost like rock paper scissors.
But when sending in the purples' swords + spears against ANYTHING from the blues' purple win every time without losing any unit whatsoever.

The code is identical between both sides and in the same order. Everything animation and hotspot/actionpoint-wise is IDENTICAL. I've checked the code and re-checked it and then re-checked it a few times more.

The sole difference between the two sides is that the purples' code comes after the blues', but one of them has to be after the other.

If anyone has any idea of what may be going on please tell me.

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
15th January, 2008 at 16:21:53 -

It could have to do with priorities of the code structure when creating/defining new detector objects. It might be a better idea to have only a single detector object, which inside of your loop would be positiioned at every units hit location in turn.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2976

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
16th January, 2008 at 12:59:09 -

Interesting thought. I'll try that! Thanks!

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image
   

Post Reply



 



Advertisement

Worth A Click