Home   Help Search Login Register  

Author Topic: setdammage command question  (Read 1291 times)

0 Members and 1 Guest are viewing this topic.

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
setdammage command question
« on: 26 Jun 2005, 08:54:54 »
Just like in the setvelocity question of mine, is it possible to add damage instead of setting it?
e.g. in my nitro loop, if the car passes it's top speed I want it to damage 0.05 every time it goes over the top speed.
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline 456820

  • Contributing Member
  • **
Re:setdammage command question
« Reply #1 on: 26 Jun 2005, 09:01:58 »
yep thats possible first of all you will need to find out the speed its going there might be a function the function libary for this then you can use

cardam = getdammage car

? speed > 200 : setdammage cardam + 0.05

that will add 0.05 dammage on the original cars health, that should do the trick but im still quite unshore about it

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:setdammage command question
« Reply #2 on: 26 Jun 2005, 09:04:02 »
Thanks a lot. I'm going to try it out and tell you if it works.
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline 456820

  • Contributing Member
  • **
Re:setdammage command question
« Reply #3 on: 26 Jun 2005, 09:15:09 »
no wait i found a problem it should be

Code: [Select]
cardam = getdammage car
_howfast = speed car

? _howfast  > 200 : setdammage cardam + 0.05

that should work this time you need to change the name of car to waht you need same with the speed 200 then it should work

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:setdammage command question
« Reply #4 on: 26 Jun 2005, 09:17:04 »
ah ok. I noticed it didnt work so I'll try this :P!
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:setdammage command question
« Reply #5 on: 26 Jun 2005, 09:37:35 »
I dont really know if its working right now. Im creating a speed checker. Im too lazy to just lower the speed since a speed checker would also be useful.
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:setdammage command question
« Reply #6 on: 26 Jun 2005, 10:27:27 »
sorry for triple post

No it does not seem to be working. It says something about cardam to be an unkown operator.
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:setdammage command question
« Reply #7 on: 26 Jun 2005, 10:32:47 »
Code: [Select]
cardam = getdammage car
_howfast = speed car

? _howfast  > 200 : setdammage cardam + 0.05

this is what happens when posters don't know about what they're posting. the setdamage command is incorrectly used.

Code: [Select]
_cardam = getdamage car
_howfast = speed car

? _howfast  > 200 : car setdamage (_cardam + 0.05)

is the correct usage.

and yes, i am beginning to frown upon your multiple posts - modify your most recent post if it's the last in the thread to keep things tidy.
« Last Edit: 26 Jun 2005, 10:33:42 by bedges »

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:setdammage command question
« Reply #8 on: 26 Jun 2005, 10:47:07 »
Yay it works! Thanks all!

@bedges
Strangely enough its not

Code: [Select]
_cardam = getdamage car
_howfast = speed car

? _howfast  > 200 : car setdamage (_cardam + 0.05)

but its

Code: [Select]
_cardam = getdammage car
_howfast = speed car

? _howfast  > 200 : car setdamage (_cardam + 0.05)

(notice the extra M in getdammage)
« Last Edit: 26 Jun 2005, 10:51:45 by bedges »
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage