The Daily Click ::. Forums ::. Klik Coding Help ::. Major bug with an overhead shooter project, with TGF...
 

Post Reply  Post Oekaki 
 

Posted By Message

RPG Player 2003



Registered
  27/06/2003
Points
  248
23rd August, 2003 at 14:33:34 -

Well, the thing is, I have 10 different weapons, and you can carry only one per time. The weapons are the pistol, the submachinegun, the slugshot cannon, the assault rifle, the tesla coil cannon, the death ray cannon, the flare gun, the HEAT rocket launcher, the crossbow armed with "Crossbolts" and a remote detonator for bombs I call "Crossbolts".
All weapons shoot like I want, everything works like I want... but some weapons DON'T damage enemies. The only ones that directly damage them are the first four bullet weapons. There are two with indirect damage (remote bombs and flare guns) and other four weapons that do direct damage, BUT NEVER WORK.

What I mean is, everytime I take a direct hit right at an opponent with a rocket, instead of wasting him away it won't reduce a little bit of his health. The code I use to calculate the damage is quite simple...

Each shot has its Value C as its damage (I wanted it to be random), and when hitting an unarmored target it reduces the health of him by the Value C of the shot, and if it's armored, reduce the health and the armor by half of the Value C of the shot.
It seemed to work perfectly with the bullet weapons, but couldn't get to work with newer weapons.

If someone understood this quite long post, please HELP ME!!! URGENT!!! I NEED IT!!! IT'S THE ONLY THING THAT'S STOPPING ME!!!

 
"I see", said the blind men to his deaf wife.

Beware of the grass, don't step on the dog!

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
23rd August, 2003 at 14:42:59 -

are your weapons even making valid collisions with the enemy?

 
Craps, I'm an old man!

RPG Player 2003



Registered
  27/06/2003
Points
  248
23rd August, 2003 at 14:53:35 -

Yes. All bugs are fixed... except for that!

 
"I see", said the blind men to his deaf wife.

Beware of the grass, don't step on the dog!

Kirby Smith

Resident Slacker

Registered
  18/05/2003
Points
  479

VIP Member360 OwnerWii OwnerThe Cake is a Lie
24th August, 2003 at 00:02:01 -

The only thing I can think of is that maybe you've got the code set up so that the later weapons get destroyed upon collision before the code that causes the damage has been processed. It seems silly, but I know I've made stupider mistakes before, so you might take a look just in case.

 
XBL Gamertag: Rampant Mjolnir

Petas



Registered
  25/08/2002
Points
  6
26th August, 2003 at 23:59:44 -

How are you counting the enemies health? is it in a counter, or value ...
Are you sure it's not doing damage at all? Maybe you have the event coded like:

(Value A of enemy is their health)
Value A of enemy = 0 : Destroy !

If the rockets subtract too much health from the enemy, it won't work with the above line..
For example if an enemy had 10 health and the rocket did 15 damage, then after subtracting damage, the enemy would technically have -5 health (which isn't 0 ..)

So you would instead code:
Value A of enemy <= 0 : Destroy !

But I'm not sure of your coding experience, all I know is that this has happened to me a few times in the past. So..I dunno. It's just a suggestion. Just trying to help.

 
Hippopotomonstrosesquippedaliophobia - Fear of long words

Aali [Crazy_Productions]



Registered
  13/10/2002
Points
  843
27th August, 2003 at 00:47:41 -

its all about the order of the actions, or maybe your using groups, they don't work in tgf

 
"If Darl McBride was in charge, he'd probably make marriage unconstitutional too, since clearly it de-emphasizes the commercial nature of normal human interaction, and probably is a major impediment to the commercial growth of prostitution."
-- Linus Torvalds, December 5th 2003.

(Darl McBride is CEO of The SCO Group)


this place sucks but don't tell anyone, it's our little secret, ok?

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
30th August, 2003 at 01:37:18 -

wait a minute, what do you mean groups don't work in tgf?

 
Craps, I'm an old man!
   

Post Reply



 



Advertisement

Worth A Click