Get World Player reference from the Pawn

marceloSRmarceloSR REGISTERED Posts: 47 Seed
Is there a way to get the world player reference if I have the reference to the Pawn already?

I'm trying to determine the biome a server player is currently in by using the function NKGetBiomeWeights()
However, to use it I need the worldPlayer and not the pawn reference (I know this because I can get the client biome using Eternus.World:NKGetLocalWorldPlayer():NKGetBiomeWeights()

Any ideas?

Comments

  • johnycilohoklajohnycilohokla REGISTERED, Developers Posts: 283 Developer
    You can get it using
    local wp = pawn.m_connection
    It might be a bit confusing but the reason it is stored as m_connection is because WorldPlayer represents player connection (with few additional variables name, login location, respawn point, pawn, controller that are required when player logs in) and it is used to send events to specific players.
    My Blog
    jc.png
      yt.png  t.png  
  • marceloSRmarceloSR REGISTERED Posts: 47 Seed
    Thank you very much Johny! It worked fine over here
    Now that you explained it, the name makes much more sense! haha
Sign In or Register to comment.