Jump to content
Korean Random

help in finding the appropriate event or variable (Damage value)


Go to solution Solved by tankhunter0712,

Recommended Posts

I need help finding a simple way to get the current damage we've done in battle. So far I've only been able to get the current frag count, but that's not what I need. My code looks like this:
 

def __fetchStats():
    global tx
    player = BigWorld.player()
   
    if player and player.arena:
        stats = player.arena.statistics
        player_vehicle_id = player.playerVehicleID
       
        LOG_DEBUG("Player vehicle ID:", player_vehicle_id)
        LOG_DEBUG("Arena statistics:", stats)
       
        if stats:
            if player_vehicle_id in stats:
                player_stats = stats[player_vehicle_id]
               
                LOG_DEBUG("Player stats for vehicle ID {}:".format(player_vehicle_id), player_stats)
               
                stats_text = str(stats[player_vehicle_id])
               
                tx.text = "Your vehicle's statistics:\n" + stats_text
            else:
                tx.text = "No available statistics for your vehicle."
        else:
            tx.text = "No statistics in the arena."
    else:
        tx.text = "No access to the arena."
Link to comment
Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...