I'm trying to make a actor be essential when a certain quest

Post » Wed Jun 20, 2012 12:23 pm

So yeah the title says it all really.

I tried the following lines:

RuufgardTavern_Alias.GetReference().SetEssential()


and I also tried creating an actor property and then doing:

RuufgardTavern.SetEssential()


and then I also tried:


(RuufgardTavern as Actor).SetEssential()



But it always returns with the same error:



Starting 1 compile threads for 1 files...
Compiling "QF_LPGIntro_0200EFEF"...
e:\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_LPGIntro_0200EFEF.psc(77,15): SetEssential is not a function or does not exist
No output generated for QF_LPGIntro_0200EFEF, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on QF_LPGIntro_0200EFEF
User avatar
Miguel
 
Posts: 3364
Joined: Sat Jul 14, 2007 9:32 am

Post » Wed Jun 20, 2012 10:51 pm

I might be totally wrong in this as i have literally just started looking into the scripting side of the CK, but do you have the words "extends ActorBase" written at the top of your script, next to your script name? Like I said, I might be wrong mate, but I just typed in SetEssential into the CK Wiki and it says that it is a member of the ActorBase Script

- Hypno
User avatar
Kelvin Diaz
 
Posts: 3214
Joined: Mon May 14, 2007 5:16 pm

Post » Wed Jun 20, 2012 4:38 pm

I might be totally wrong in this as i have literally just started looking into the scripting side of the CK, but do you have the words "extends ActorBase" written at the top of your script, next to your script name? Like I said, I might be wrong mate, but I just typed in SetEssential into the CK Wiki and it says that it is a member of the ActorBase Script

- Hypno

You're totally wrong. As long as he's calling it on a variable that is an Actor type, his script doesn't need to extend ActorBase.

Try using "GetActorReference()"
User avatar
jadie kell
 
Posts: 3497
Joined: Sat Jul 29, 2006 3:54 pm

Post » Wed Jun 20, 2012 6:20 pm

You're totally wrong. As long as he's calling it on a variable that is an Actor type, his script doesn't need to extend ActorBase.

Try using "GetActorReference()"


So:

Ruufgard.GetActorReference().SetEssential()


?
User avatar
Blackdrak
 
Posts: 3451
Joined: Thu May 17, 2007 11:40 pm

Post » Wed Jun 20, 2012 4:45 pm

Yeah, give that a try...at the very least it should compile.
User avatar
Lily Evans
 
Posts: 3401
Joined: Thu Aug 31, 2006 11:10 am

Post » Wed Jun 20, 2012 11:22 pm

Whenever I use that I have to do an Actor Base property. :shrug:
User avatar
Flesh Tunnel
 
Posts: 3409
Joined: Mon Sep 18, 2006 7:43 pm

Post » Wed Jun 20, 2012 4:22 pm

Whenever I use that I have to do an Actor Base property. :shrug:

"Actor" is a "base property" If you have an ObjectReference instead, you can cast it as Actor and it should work:

(WhateverRefName As Actor).SetEssential()

Actors extend Actorbase, and thus have all the functions and properies of ActorBase.
User avatar
Josh Sabatini
 
Posts: 3445
Joined: Wed Nov 14, 2007 9:47 pm

Post » Wed Jun 20, 2012 10:53 pm

According to the wiki, Actor extends ObjectReference which extends Form and ActorBase extends Form. I don't think that you'll be able to use the ActorBase functions with Actors. You can try this if nothing else works:

(RuufgardTavern_Alias.GetActorReference().GetBaseObject() as ActorBase).SetEssential()
User avatar
IM NOT EASY
 
Posts: 3419
Joined: Mon Aug 13, 2007 10:48 pm

Post » Wed Jun 20, 2012 10:54 pm

You cannot change essential on a plain actor, changing it on the ActorBase will make ALL Actors of that type essential (It's not a problem if the particular actor is unique though) normally you use an alias with essential ticked to determine whether the actor is essential or not, try creating a new alias,

Tick Optional
Tick Essential
Tick Allow Reuse in Quest
Tick Allow Reserved
Fill Type - Specific

Then when you want the actor to become essential or not, force the actor into the alias or clear it.
User avatar
Cathrine Jack
 
Posts: 3329
Joined: Sat Dec 02, 2006 1:29 am


Return to V - Skyrim