Script to copy Actor's stats into another Actor

Post » Tue Jun 19, 2012 2:36 am

I wanted to create a function that when called would show a Message with 3 options (health, magicka, stamina) and then, depending on the choice, change the player's stats according to some other actor's stats (dummyActor). My problem is with the properties. I created a Message object in the CK and called it statChoice so when I go to edit the script's properties I only need to select Auto-Fill to get the right Message object, afterwards I tried to do the same with dummyActor and player (both of which are Actor objects) and nothing happens when I select Auto-Fill, and selecting Edit Value doesn't help either cause it gives me options for choosing Cells, not Actors, so what should I do here?

Scriptname StatChanger  extends Quest{Change player stats}Actor property player autoActor property dummyActor autoMessage property statChoice autoFunction changeStats()   player = Game.GetPlayer() ;I'd like not to need to use this line here   int choice = statChoice.Show()   If choice == 0	  player.SetActorValue("health", dummyActor.GetActorValue("health")) ;These lines using the dummyActor don't work cause I never assigned anything   ElseIf choice == 1	  player.SetActorValue("magicka", dummyActor.GetActorValue("stamina"))   Else	  player.SetActorValue("stamina", dummyActor.GetActorValue("stamina"))   EndIfEndFunction

As for the player Actor, I tried to declare the object like this but it didn't work (also, it doesn't help with the dummyActor at all):
Actor property player = Game.GetPlayer() auto

Any advice on how to make this work is greatly appreciated.
User avatar
Eve(G)
 
Posts: 3546
Joined: Tue Oct 23, 2007 11:45 am

Return to V - Skyrim