Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google Log In with Steam Sign In
  • Create Account
Photo

Positive Score for Killing AI

Positive Score for Killing AI

  • Please log in to reply
4 replies to this topic

#1
mozzmanau

mozzmanau

    Camping Up North

  • Forum Member
  • 30 posts
  • Country: Country Flag

Hi All

 

I was just wondering if anyone knows how to fix it so that players get a positive Score for Killing AI in the objectives in the Arma 2 wasteland mission.

 

I have seen this line of code which i am assuming goes into each of the groups but am not 100% sure, was going to trial and error it but that would take A LOT of trial and error.

 

Heres the code that i found

 

_leader addEventhandler ["killed", {(_this select 1) addScore 2}];

 

Do i need to do this for every AI, for example

 

_man2 =

 

_man2 addEventhandler ["killed", {(_this select 1) addScore 2}];

 

If so how do i go about it?

 

Thanks


Edited by mozzmanau, 04 October 2014 - 04:36 AM.




#2
Schatten

Schatten

    Survivor

  • Forum Member
  • 15 posts
  • LocationMinsk
  • Country: Country Flag

My script attaches event handler for each NPC unit and it works fine.

 

I think this code also will work:

{_x addEventhandler ["Killed", {(_this select 1) addScore 2}]} count (units (group _leader));

Edited by Schatten, 04 October 2014 - 11:42 AM.


#3
mozzmanau

mozzmanau

    Camping Up North

  • Forum Member
  • 30 posts
  • Country: Country Flag

Is this your script?

 

_leader addEventhandler ["killed", {(_this select 1) addScore 2}];

 

If so where do i put it? Also thanks for creating it i9f you did, Ill make sure to post credit in the file



#4
Schatten

Schatten

    Survivor

  • Forum Member
  • 15 posts
  • LocationMinsk
  • Country: Country Flag

Is this your script?

 

_leader addEventhandler ["killed", {(_this select 1) addScore 2}];

 

If so where do i put it? Also thanks for creating it i9f you did, Ill make sure to post credit in the file

No, this is not my script. )

I just wrote that in my script, event handler is attached for each NPC unit. But you also can try this code:

{_x addEventHandler ["Killed", {(_this select 1) addScore 2}]} count (units (group _leader));

Edited by Schatten, 05 October 2014 - 11:08 AM.


#5
Viba

Viba

    100+ Post Club

  • Forum Member
  • 165 posts
  • Country: Country Flag

http://www.404games....negative-score/


b_350_20_020822_0E0E11_FFFFFF_F5F5F5.png

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users