Advertisement
XeroXipher2022

More Help from Alice

Dec 6th, 2024 (edited)
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## Hey Alice, thank you for your help... ##
  2. ## You told me to make an EnemyScreen.gd script for my Enemy.tscn Scene ##
  3. ## This is the current script I have in the root of my Enemy.tscn (I don't think this is what you intended with EnemyScreen.gd): ##
  4.  
  5. extends Entity
  6.  
  7. func initialize(enemy_data : Dictionary):
  8.     Username = enemy_data.get("Username", "Anon1822")
  9.     Country =  enemy_data.get("Country", "Unknown")
  10.     IPAddress = enemy_data.get("IPAddress", "0.0.0.0")
  11. """
  12.     Money = enemy_data["Money"]
  13.     Level = enemy_data["Level"]
  14.     XP = enemy_data["XP"]
  15.     Nexp = enemy_data["Nexp"]
  16.    
  17.     CloudSpace = enemy_data["CloudSpace"]
  18.     Attack = enemy_data["Attack"]
  19.     Penetration = enemy_data["Penetration"]
  20.     Defense = enemy_data["Defense"]
  21.     Survellience = enemy_data["Survellience"]
  22.     Health = enemy_data["Health"]
  23.     Damage = enemy_data["Damage"]
  24.    
  25.     print("Enemy Username : " + enemy_data["Username"])
  26. """
  27.  
  28. ## I also don't have a function yet to update the enemy_data Labels, but this is how I was planning on doing it: ##
  29.  
  30. @onready var username_data: Label = %UsernameData
  31.  
  32. func _updateNPC():
  33.     username_data.text = str(selected_enemy.Username)
  34.  
  35. ## Next Issue is I don't have a way to pick selected_enemy or a button to press NEXT (I can make one) which would go from Enemy[0] to Enemy[1] to Enemy[2], etc.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement