Home   Help Search Login Register  

Author Topic: Addrating  (Read 1474 times)

0 Members and 1 Guest are viewing this topic.

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Addrating
« on: 01 Oct 2005, 00:27:11 »
I can't get to the editor right now as I'm on another computer. I just wanted to know if,

Me1 addrating -1

will work. I have a player that I want to become a renegade. The Ed depot says that you can add a rating but I just wonder if making it lower than 0 will work.
Cheers.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Addrating
« Reply #1 on: 01 Oct 2005, 00:30:40 »
Yes adding negative numbers to make the rating negative does work IIRC.   I think you need lower than -1 to make everybody shoot at you though.   Not sure.   -100 should work and -1000 will definitely work, though of course if the player is already +1001 ....
Plenty of reviewed ArmA missions for you to play

Kyle Sarnik

  • Guest
Re:Addrating
« Reply #2 on: 01 Oct 2005, 01:41:44 »
Yes adding negative numbers to make the rating negative does work IIRC.   I think you need lower than -1 to make everybody shoot at you though.   Not sure.   -100 should work and -1000 will definitely work, though of course if the player is already +1001 ....

Thats why you should use this trick:

Code: [Select]
this addrating (-1000 - rating this)
That should work, right?  ::)

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Addrating
« Reply #3 on: 01 Oct 2005, 10:59:19 »
As a build on the comments above.  This is some initialisation code I use to ensure the player becomes a renegade if he kills some particular individuals:

Code: [Select]
{_x AddEventHandler [{killed}, {if ((_this select 1) == Alexi) then {Alexi addRating (-100000 - abs(rating Alexi))}}]} forEach ((units group Yuri) + (units group Pavel) + [Dourdan_Woman] - [Yuri,Pavel,Marek])

It works like a dream.  Survival time is measured in seconds if there is anyone around with a gun.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Addrating
« Reply #4 on: 01 Oct 2005, 14:40:12 »
Just to point out, -2000 is the magic number for becoming a renegade..

From the OFP 1.96 config:
Code: [Select]
renegadeLimit=-2000;
« Last Edit: 01 Oct 2005, 14:40:22 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Addrating
« Reply #5 on: 01 Oct 2005, 14:58:40 »
That's useful to know.  I just wanted to make absolutley sure!

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:Addrating
« Reply #6 on: 01 Oct 2005, 18:09:56 »
What about during the mission? Does killing bad guys raise your rating?

If so, Maybe I should bump it down to like 10000 just to be sure the player becomes a renagade.
Also at the end of the mission, will the renegade score affect the final score or should I bump it back up by 10000 when the player hits the end trigger?
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Addrating
« Reply #7 on: 01 Oct 2005, 18:22:02 »
Yes and yes.
Plenty of reviewed ArmA missions for you to play

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:Addrating
« Reply #8 on: 01 Oct 2005, 18:58:12 »
Excellant. Thanks guys.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Addrating
« Reply #9 on: 01 Oct 2005, 21:03:18 »
or you could do what was suggested earlier:

unit addrating (-10000 - (rating unit))

and that will always set the rating to  -10000

Kyle Sarnik

  • Guest
Re:Addrating
« Reply #10 on: 01 Oct 2005, 21:43:29 »
or you could do what was suggested earlier:

unit addrating (-10000 - (rating unit))

and that will always set the rating to  -10000

unit addrating (-10000 - abs (rating unit))

Should have thought of that, incase the unit allready had a negative rating.

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:Addrating
« Reply #11 on: 02 Oct 2005, 01:26:18 »
What's the abs bit mean?
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Kyle Sarnik

  • Guest
Re:Addrating
« Reply #12 on: 02 Oct 2005, 03:04:45 »
Absolute value.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Addrating
« Reply #13 on: 02 Oct 2005, 04:55:43 »
why would you want the abs of it?

lets say they have a rating of -1000

if you
addrating (-10000 - abs (rating unit))

you end up with:
addrating (-10000 - 1000)
which gives you an even more negative number

whereas
addrating (-10000 - (rating unit))
gives you
addrating (-10000 - (-1000))

which ends you up at -10000, which is what you were going for

i see no reason why you would want to use the abs rating

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:Addrating
« Reply #14 on: 02 Oct 2005, 07:14:26 »
Why not just,

player addrating -10000

James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."