Jump to content

Grabbing an Actor Value and putting it in a message box


Darkvalkyr

Recommended Posts

Hello,

 

I've been struggling with this script for awhile (quite new to Papyrus). I was wondering if anyone could help? I've tried a fair bit of things, and I've gotten it to compile, but I'm not sure if I'm doing it right (there's currently so few tutorials available on the official CK wiki).

 

I'm trying to grab an Actor's Health in this instance and then later on I want to put it in a message box when it comes up. Anyone have any suggestions? Here's the script I've got so far; the Debug boxes are just there to tell me that if I even got it right. But even after putting this script on the quest's topic handling this whole thing, nothing's happened.

 

I think the issue I got is that I'm not calling the function. The problem is, how do I call the function? The wiki hasn't been very clear on how to call it - the tutorials only show a .Show which I assume is only for dialogue boxes. In which case that MAY be related to what I want. I'm just pretty new to this whole thing so I'm not entirely certain what's the possible ways of going about it.

 

Scriptname FKShowSkillsScript2 extends Actor

Int Property FKFeresHealth  Auto  
Actor Property FKFeres  Auto  
Quest Property FKFeresTracking  Auto  

int FKFeresHealth = 0

Function ShowMeSkills (int CurrentHealth)
FKFeresHealth = FKFeres.GetAV("Health") as int
CurrentHealth = FKFeresHealth

if CurrentHealth > 0
Debug.MessageBox ("Ohmygosh")
FKFeresCurrentHealth = FKFeres.GetAV("Health") as int
else
Debug.MessageBox ("Fail!")
FKFeresCurrentHealth = 0
endif

Debug.Messagebox (FKFeresHealth)
endfunction

Link to comment
Share on other sites

  • Recently Browsing   0 members

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