Modme Forums
Menu:

Remove all perks touching a trigger

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: eDeK
How i can remove/delete all the perks of the player when the player is touching a trigger?
I tried " self ClearPerks(); " and other things but no works.


ModmeBot:

Reply By: Abnormal202
have you tried using:

void <player> UnSetPerk(<perk name="">)</perk></player>


ModmeBot:

Reply By: Harry Bo21

Abnormal202
have you tried using: void <player> UnSetPerk(<perk name="">)

which will unset the perk - but not turn off its functionality or remove the shader

perk = "specialty_perk_to_lose";

perk_str = perk + "_stop";
player notify( perk_str );
</perk></player>


ModmeBot:

Reply By: eDeK
My idea is remove/delete "the functionality and the shader, NO the perk machine", every time the player touch the trigger, i go to try the 2 things, thanks for reply.


ModmeBot:

Reply By: eDeK

Harry Bo21
Abnormal202 have you tried using: void <player> UnSetPerk(<perk name="">) which will unset the perk - but not turn off its functionality or remove the shader perk = "specialty_perk_to_lose"; perk_str = perk + "_stop"; player notify( perk_str );

Harry works perfect, THANKS, the only problem is "How i do the trigger do this every time the player touch the trigger" the trigger only do this 1 first/time.</perk></player>


ModmeBot:

Reply By: Harry Bo21
put the code in a loop

while( 1 )
{
// code here repeats
}


ModmeBot:

Reply By: eDeK

Harry Bo21
put the code in a loop while( 1 ) { // code here repeats }

Thanks very much Harry, works perfect now. +1