Home   Help Search Login Register  

Author Topic: What's about Getdammage?!  (Read 700 times)

0 Members and 1 Guest are viewing this topic.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
What's about Getdammage?!
« on: 21 Sep 2003, 21:13:54 »
Hi! I've had this problem before, but I've always found a work-around. Now, this time I cannot work around it, and it's starting to piss me off real good!

What's wrong with Getdammage?!

Just look at this line:

@ (getDammage _fordon) >= 0.1

Is there something wrong? Perhaps, but I've tried at least 20 different sulutions and none of 'em works! What is it  I do wrong?
Before I tried this line:

@ (getDammage _fordon) > 0

It worked perfectly! Until I realised that it only responded when I went exactly up the line of 0 in damage, that'll say I shoot 1 M16 shot on a tank. When I try to LAW it or Grenade it, it wont trigger. I tried to high it to 0.05 but it will still just respond on gunshots.

WTF is it I'm doing wrong?! When you tell me, I promise I will feel like a mega n00b but I just can't figure it out myself.

:beat: *Gets Shot* :beat:
« Last Edit: 21 Sep 2003, 22:08:52 by The real Armstrong »

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:What's about F***ing Getdammage?!
« Reply #1 on: 21 Sep 2003, 21:31:36 »
First of all, even though you feel frustrated and angry when things don't seem to work your way, refrain from using foul language in subjects and postings. It really doesn't look good and may even offend people to the point where they don't feel like helping. I had to take a moment while deciding... the first thing one thinks of when one  sees a subject like this is "uh-uh, whatever".

Now, on to the problem.  Try this variant and see if it helps:
Code: [Select]
@(getDammage _fordon >= 0.1)
Also, I believe I recently saw something about getDammage not really behaving well in a MP game. It was something hilarious like "getDammage returns 0 at all times on a server". If anyone is in the know, please do tell.



Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:What's about F***ing Getdammage?!
« Reply #2 on: 21 Sep 2003, 22:07:40 »
OK, didn't mean to offence, I'm gonna edit the subject.

Thx, I'm gonna check that out, but my brother is occuping my comp right now.

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:What's about Getdammage?!
« Reply #3 on: 22 Sep 2003, 01:44:46 »
Also Armstrong, just bear in mind that dammage isn't a simple, 2 decimal type value.

When you shoot a tank with an M16, I think the resulting dammage would be something like:

0.0000001245

So it's sure as hell not greater than 0.1 ;)

Try debugging with a hint trigger:

hint format ["%1",getdammage unit ]

and see what sort of dammage you're doing.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:What's about Getdammage?!
« Reply #4 on: 22 Sep 2003, 07:41:30 »
Cheers Sui, gonna try that out also. In my test I used a T55 so that's why I only need to shoot one mag before it triggered at 0.05 :P

:beat: *Gets Shot* :beat:

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:What's about Getdammage?!
« Reply #5 on: 22 Sep 2003, 17:43:28 »
OK, tried @ (getDammage _fordon >= 0.1) now.

ARGH!

-Ok, Ok, calm down Armstrong!
-BUT WHY DOES IT WORK WITH EVERY1 ELSE?!?!?!?!
-Calm Down, sit down here and tell me about your feelings.
-Why do you care?!
-It's a high crime to don't get Getdammage to work. People will start call you n00b, you don't want that to happen, do you?
-No...
-Now, tell me about your sex life.
-WTF?! You freakkin pervert! Gaaaaaaaaaaaaaaaaaaaaaah! *Runs into phsicyatrist with a chainsaw*

Ahhhh... Now I feel MUCH better ;D

Anyway, back to topic: Any1 know what the problem is?

:beat: *Gets Chainsawed* :beat:

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:What's about Getdammage?!
« Reply #6 on: 22 Sep 2003, 21:59:37 »
Got it working now:

Code: [Select]
# Damageget
_DamageOnFordon = GetDammage _fordon
? _DamageOnFordon > 0.1 : goto "cont"
~10
goto "damageget"

#Cont

Veeeeeeeeeeeeeeeery strange, and if some1 could tell me what I did wrong I would be happy. At least it works now.