1. Hey,
    Is there any hook to see if player is infamous or not ?
     
  2. Wulf

    Wulf Community Admin

    A hook wouldn't be needed, those are more of "events" whereas checking if something is set on something would just be a matter of finding the location where that information is stored in the game.
     
  3. You can use EntityStats for this.
    To get the EntityStats of a session use
    Code:
    EntityStats stats = session.WorldPlayerEntity.GetComponent<EntityStats>();
    To get the Infamy value from that EntityStats session use:
    Code:
    float infamy = stats.GetFluidEffect(EEntityFluidEffectType.Infamy).GetValue();
    So then you can use "infamy" to check if it's greater than zero to check if a person has any infamy.
    For example:
    Code:
            if(infamy > 0)
               Puts("Infamous!");
             else
               Puts("NOT Infamous!");
    
    Full Code:
    Code:
            EntityStats stats = session.WorldPlayerEntity.GetComponent<EntityStats>();
             float infamy = stats.GetFluidEffect(EEntityFluidEffectType.Infamy).GetValue();
             if(infamy > 0)
               Puts("Infamous!");
             else
               Puts("NOT Infamous!");
    
     
    Last edited by a moderator: Feb 7, 2016
  4. @Noviets damn, you sure know your stuff :)