player.apply_traits

This function applies a set of player traits to the context player until the next time the script runs. There is no function to stop applying traits to a player; rather, you call this function for every tick that the player should have a given set of traits, and then revoke those traits by no longer calling this function.

Arguments

traits

The player traits to apply.

Example

alias is_zombie     = player.number[0]
alias zombie_traits = script_traits[0]

for each player do
   if current_player.is_zombie == 0 then
      current_player.apply_traits(zombie_traits)
   end
end

See also