Possession and RaceMenu: Is it feasible?

Post » Tue Jun 19, 2012 7:50 pm

I like a lot the RaceMenu and I think it's ubercool...it allows you to change race, six, appearance and rename your character.

I'd really like to be able to use it for NPCs, so I was wondering:

"Player" is just the Instance of the Prisoner actor for the game...so what if I made a scripted spell forcing the game to say that "Player = Another reference"??

Based on this assumption I made the following script:

Scriptname testTrasmutingPossession extends ActiveMagicEffect  Event OnEffectStart(Actor akTarget, Actor akCaster)acOldPlayer = akCasteracNewPlayer = akTargetPlayer = acNewPlayerGame.ShowRaceMenu()endEventEvent OnEffectFinish(Actor akTarget, Actor akCaster)Player = acOldPlayerendEventActor Property acOldPlayer  Auto  Actor Property acNewPlayer  Auto  Actor Property Player  Auto

The script is simple for me:

I am telling the game that the Reference (Player = PlayerRef) should become the targeted character and that the ShowRaceMenu should be launched thereafter.

In theory, from my point of view, if you "possess" the target by taking on his Reference, you should be able to use the ShowRaceMenu on him and then take your original traits by going back to your original reference!

What's wrong with the above script? There is any way to change the player from the PlayerRef OR to "target" the ShowRaceMenu on someone else?

Any suggestion?

Thanks,
Jashkar
User avatar
Michael Russ
 
Posts: 3380
Joined: Thu Jul 05, 2007 3:33 am

Post » Tue Jun 19, 2012 6:26 pm

Variable scope. You're declaring Player in your script. So the variable Player is only in your script.
User avatar
Harry-James Payne
 
Posts: 3464
Joined: Wed May 09, 2007 6:58 am

Post » Tue Jun 19, 2012 5:51 pm

dudster is correct. You can't change one reference to another, and all you're doing is changing the value of a property you've declared.

Object variables and properties store the location of an object. You can use them to call native functions on an object, which can return or change information about the object, but if you change the value of the variable or property you're just changing the location that it's storing. You're not changing the object to which it's pointing.

Cipscis
User avatar
Shiarra Curtis
 
Posts: 3393
Joined: Thu Jan 04, 2007 3:22 pm

Post » Tue Jun 19, 2012 6:38 pm

There's a Polymorph Skeever effect in the vanilla files...I suppose you could use something like that and give it a very long duration...
User avatar
Life long Observer
 
Posts: 3476
Joined: Fri Sep 08, 2006 7:07 pm

Post » Tue Jun 19, 2012 4:42 pm

There's a Polymorph Skeever effect in the vanilla files...I suppose you could use something like that and give it a very long duration...

No...I've looked a the Trasmogrify spell and it works by disabling the target and enabling another creature. :(

It's not what I want to do... :(

Jashkar
User avatar
aisha jamil
 
Posts: 3436
Joined: Sun Jul 02, 2006 11:54 am

Post » Tue Jun 19, 2012 3:27 pm

there was a post about a lich mod somewhere around her (maybe on the nexus) that was talking about a possession effect...unless thats the mod you're working on...
User avatar
Pixie
 
Posts: 3430
Joined: Sat Oct 07, 2006 4:50 am

Post » Tue Jun 19, 2012 4:38 pm

there was a post about a lich mod somewhere around her (maybe on the nexus) that was talking about a possession effect...unless thats the mod you're working on...

No...it's not me. :)

Thanks,
Jashkar
User avatar
Zualett
 
Posts: 3567
Joined: Mon Aug 20, 2007 6:36 pm


Return to V - Skyrim