Forum Jump :

Author Message


Posts: 12
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2014-05-05 14:17        
     
Hey all,
The script below is placed in a rebel leader's init and i want it to log 200 points if he's is killed by a WEST player and only 100 points if he's killed by RESISTANCE player:

nul = [this] execVM "loadout\rebel\r_man_leader.sqf";
this addEventHandler ["respawn","[_this select 0,1] execVM 'loadout\rebel\r_man_leader.sqf'"]; 
this addEventHandler ["killed",{switch (side (_this select 1)) do {case west: {rebels_killed = rebels_killed + 200};
case resistance: {rebels_killed = rebels_killed + 100};};}];

It logs the points for when he's killed by WEST (works correctly), but i cant figure out how to get it to log points for when he's killed by RESISTANCE, nothing happens (no points are logged). The first portion of the script (execVM) works just fine.

Seems like i'm missing something simple, maybe just syntax? My scripting experience is quite novice, any help is much appreciated! Thanks!

Added 14 hours 22 minutes later:

Just did some really in-depth testing with this and it seems to be working fine. Sorry for the useless post!

This post was edited by ZuluZulu (2014-05-06 04:53, ago)