PROMETHEUS_ts Editor Thread

Post » Fri Jan 11, 2013 6:54 am

Hi I made a trigger box

and made this script for it ....

Spoiler

Scriptname PROM_LightEnablertrigger extends ObjectReference   bool Property PlayerOnly = TRUE auto{Does this only trigger for the player? (DEFAULT = TRUE)}bool Property Fade = FALSE auto{Fade in/out when enabled/disabled? (DEFAULT = FALSE)} ObjectReference myLinkedRef       Event onTriggerEnter(ObjectReference triggerRef)        if (triggerRef == Game.GetPlayer()) || (!PlayerOnly)            myLinkedRef = GetLinkedRef() as ObjectReference                             myLinkedRef.enable(Fade)               else                GoToState("Done")                endif        endEvent 


Then I used a xmarker and I linked it to the box

then I linked to the xmarker all braziers , ashes and lights and set all of those ( xmarkers only ) to initially disabled

when the player enters the trigger those shoudl fade in but nothing happens any idea why?

I have set in the properteis the fade in and the player only but nothing ..
User avatar
Dale Johnson
 
Posts: 3352
Joined: Fri Aug 10, 2007 5:24 am

Post » Fri Jan 11, 2013 12:10 pm

I did all that but I fixed by simply adding the material type keyword that was missing in the files ...
User avatar
Amy Masters
 
Posts: 3277
Joined: Thu Jun 22, 2006 10:26 am

Post » Fri Jan 11, 2013 1:11 pm

It looks like it can be done using SKSE ActorBase.SetNthHeadPart(...), but that doesn't persist in saves and is vulnerable to the "grey face" bug.

For the player, it can be done using Game.ShowLimitedRaceMenu() (also used by the Dawnguard face sculptor).

P.S. It's not very polite to keep bumping this every few hours...

I just need to do it for the player not NPC ...
Game.ShowLimitedRaceMenu() how works?
User avatar
Naughty not Nice
 
Posts: 3527
Joined: Sat Nov 04, 2006 6:14 am

Post » Fri Jan 11, 2013 11:36 am

Game.ShowLimitedRaceMenu() how works?
http://www.creationkit.com/ShowLimitedRaceMenu_-_Game

I don't think that's what you're looking for. That would simply allow the player to edit their appearance, not you as the modder. (Or the 'game')
User avatar
Stat Wrecker
 
Posts: 3511
Joined: Mon Sep 24, 2007 6:14 am

Post » Fri Jan 11, 2013 12:15 am

this works for a npc but I need to use on a player character , would that work?
User avatar
Imy Davies
 
Posts: 3479
Joined: Fri Jul 14, 2006 6:42 pm

Post » Fri Jan 11, 2013 1:15 pm

First, you don't need the bool ,second, you don't need the state.

You just set up the person who is entering the triggers area and wrap it inside an If condition. Did you created the trigger box?

And what's with that (fade) inside your enable function? This does absolutely nothing. You need to put (true) into this function.


Actor Property PlayerREF AutoActor Property WhatEverPersonREF AutoEvent OnTriggerEnter(ObjectReference akActionRef)If triggerRef == PlayerREF	  WhatEverPersonREF.enable(true)EndIfEndEvent
User avatar
Thomas LEON
 
Posts: 3420
Joined: Mon Nov 26, 2007 8:01 am

Post » Fri Jan 11, 2013 7:19 am

the fade needed to not make the light pop up instantly ...
User avatar
Solina971
 
Posts: 3421
Joined: Thu Mar 29, 2007 6:40 am

Post » Fri Jan 11, 2013 4:07 am

your script doesnt work either , it doesnt allow me to specify a xmarker to use neither specify the fade or limit the enabling to player only , and it asks me to pick in reference the player and whatever other person ... :/ ....
User avatar
Danielle Brown
 
Posts: 3380
Joined: Wed Sep 27, 2006 6:03 am

Post » Fri Jan 11, 2013 7:50 am

PlayerREF will autofill, as will WhatEverPersonREF if it matches your NPC's EditorID. I recall reading that lights won't fade in/out using Enable/Disable, but you could approximate this by gradually increasing/decreasing the scale of the light REF, I believe.

Try:
ObjectReference Property kLightREF AutoEvent SomeEvent()	kLightREF.ToggleLightWithFade()EndEventFunction ToggleLightWithFade(ObjectReference akLightRef) Global	Float fScale = akLightRef.GetScale()	If fScale		While fScale > 0			fScale -= 1.0			akLightRef.SetScale(fScale)		EndWhile	Else		While fScale < 100.0			fScale += 1.0			akLightRef.SetScale(fScale)		EndWhile	EndIfEndFunction
User avatar
LijLuva
 
Posts: 3347
Joined: Wed Sep 20, 2006 1:59 am

Post » Fri Jan 11, 2013 3:33 am

Nvm
User avatar
mimi_lys
 
Posts: 3514
Joined: Mon Apr 09, 2007 11:17 am

Post » Fri Jan 11, 2013 12:04 am

still not working , nothing gets enabled ...
User avatar
Eduardo Rosas
 
Posts: 3381
Joined: Thu Oct 18, 2007 3:15 pm

Post » Fri Jan 11, 2013 1:01 am

You might need some notifications in the code to get a better idea of what's going on.
Just curious, what is the volume of your trigger box? If the box is too thin sometimes none of the Trigger related events get sent. Make it a couple of body-widths wide at least, if you can.
User avatar
Kellymarie Heppell
 
Posts: 3456
Joined: Mon Jul 24, 2006 4:37 am

Post » Fri Jan 11, 2013 6:32 am

Its as large as the room and as deep as two NPCs...
User avatar
Breanna Van Dijk
 
Posts: 3384
Joined: Mon Mar 12, 2007 2:18 pm

Post » Fri Jan 11, 2013 4:01 am

Then I used a xmarker and I linked it to the box

then I linked to the xmarker all braziers , ashes and lights and set all of those ( xmarkers only ) to initially disabled
et in the properteis the fade in and the player only but nothing ..
This may be a totally silly remark, and I apologize for it from the start, but if I take what you describe literally, I am compelled to ask: Did you add the xmarker to your lights as an enable parent or as a mere linked reference (as your post kind of implies)? The former should work better than the latter.

Also, if I were you, I would temporarily replace the xmarker with some simple visible object, like a standing stone or something, just to see if the triggering script works as intended, and once that is established, then proceed to get the lighting working.

P.S. I am also under the impression, that apart from fading not effecting lights, as suggested above, fading is not even passed through enable parent linkages for any kind of object. I agree that you may need to have each light individually managed by your script along the lines of what JustinOther described.

P.P.S. A couple of points on efficiency (to the best of my understanding, others might disgree):

1.
if (!PlayerOnly) || (triggerRef == Game.GetPlayer())
would be better than
if (triggerRef == Game.GetPlayer()) || (!PlayerOnly)
because the second test is skipped if the first one is enough, and Game.GetPlayer() is more resource demanding.

2.
If you refer to your set of lights in a script in some master object or whatever (like through an ObjectReference property or variable) those lights can easily become persistent in memory. Some people might argue that would be a needless use of resources, others might be indifferent. (It works the other way around If you set an enable parent in an object, as it references some master object, which alone needs to be persistent).

If I were you, I might consider adding to each light a script, that runs from when the cell is attached, and begins to periodically monitor the distance of the the player from some trigger point (or the enable state of an xmarker that uses your trigger script). When the player closes in on the trigger point (or the xmarker is enabled by your trigger script), the script launches the fade-on process and then shuts down. That should probably work without the lights having to become persistent.

I might actually try something like this on the lights (adapted from the script above by JustinOther), although I haven't tested it in practice
Spoiler
ScriptName LightFadeOn extends ObjectReferenceObjectReference property EnableMaster auto{Monitored to initiate gradual switch-on}float property fMaxScale auto{Maximum extent of light}int property iSteps auto{Number of growth steps}; This should usually equal the number of frames used for transition, but that may not necessarily be an absolute truth.bool Lit = FalseEVENT OnCellAttach()if Lit  returnendifSetScale(0.0)RegisterForSingleUpdate(1.0)endEVENTEVENT OnCellDetach()UnregisterForUpdate()endEVENTEVENT OnUpdate()if EnableMaster.IsDisabled()  RegisterForSingleUpdate(2.0)  returnendiffloat fDelta = fMaxScale / iStepsint iCounter = 0while iCounter < iSteps  iCounter += 1  SetScale(fDelta * iCounter)endwhileLit = True ; allows the light to remain on once litendEVENT
User avatar
Kaylee Campbell
 
Posts: 3463
Joined: Mon Mar 05, 2007 11:17 am

Post » Fri Jan 11, 2013 6:02 am

this is the error I get

Starting 1 compile threads for 1 files...
Compiling "QF_PROM_HyborianMound_01047909"...
d:\giochi\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_PROM_HyborianMound_01047909.psc(32,0): mismatched input 'Event' expecting ENDFUNCTION
d:\giochi\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_PROM_HyborianMound_01047909.psc(37,0): missing EOF at 'EndFunction'
No output generated for QF_PROM_HyborianMound_01047909, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on QF_PROM_HyborianMound_01047909




and this is the code

Spoiler
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment;NEXT FRAGMENT INDEX 5Scriptname QF_PROM_HyborianMound_01047909 Extends Quest Hidden;BEGIN ALIAS PROPERTY Conan;ALIAS PROPERTY TYPE ReferenceAliasReferenceAlias Property Alias_Conan Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY PullChain;ALIAS PROPERTY TYPE ReferenceAliasReferenceAlias Property Alias_PullChain Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY AtlanteanSword;ALIAS PROPERTY TYPE ReferenceAliasReferenceAlias Property Alias_AtlanteanSword Auto;END ALIAS PROPERTY;BEGIN FRAGMENT Fragment_2Function Fragment_2();BEGIN CODESetObjectiveDisplayed(30);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_3Function Fragment_3();BEGIN CODESetObjectiveDisplayed(40)Event OnDeath(Actor killer)    EndEvent;END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_4Function Fragment_4();BEGIN CODESetObjectiveDisplayed(50);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_0Function Fragment_0();BEGIN CODESetObjectiveDisplayed(10);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_1Function Fragment_1();BEGIN CODESetObjectiveDisplayed(20);END CODEEndFunction;END FRAGMENT;END FRAGMENT CODE - Do not edit anything between this and the begin comment
User avatar
Angela
 
Posts: 3492
Joined: Mon Mar 05, 2007 8:33 am

Post » Fri Jan 11, 2013 4:46 am

That's not an NPC in the picture :) So yes, it works. It should work on any character that matches the list of races selected in the ArmorAddon.
User avatar
мistrєss
 
Posts: 3168
Joined: Thu Dec 14, 2006 3:13 am

Post » Fri Jan 11, 2013 2:10 pm

You can't have an event in a function (OnDeath was empty anyhow).
Spoiler
ScriptName QF_PROM_HyborianMound_01047909 Extends Quest HiddenReferenceAlias Property Alias_Conan AutoReferenceAlias Property Alias_PullChain AutoReferenceAlias Property Alias_AtlanteanSword AutoFunction Fragment_0()	SetObjectiveDisplayed(10)EndFunctionFunction Fragment_1()	SetObjectiveDisplayed(20)EndFunctionFunction Fragment_2()	SetObjectiveDisplayed(30)EndFunctionFunction Fragment_3()	SetObjectiveDisplayed(40)EndFunctionFunction Fragment_4()	SetObjectiveDisplayed(50)EndFunction
User avatar
Tyler F
 
Posts: 3420
Joined: Mon Aug 27, 2007 8:07 pm

Post » Fri Jan 11, 2013 1:56 am

ok removing it solved but how do I do to activate a chain from inside the script? I have already placed it as alias but what's the command?
User avatar
Mizz.Jayy
 
Posts: 3483
Joined: Sat Mar 03, 2007 5:56 pm

Post » Fri Jan 11, 2013 6:11 am

If you don't have a material keyword on the item, the item will appear in the MISC category.
User avatar
Abel Vazquez
 
Posts: 3334
Joined: Tue Aug 14, 2007 12:25 am

Post » Thu Jan 10, 2013 11:13 pm

ok removing it solved but how do I do to activate a chain from inside the script? I have already placed it as alias but what's the command?

I have absolutely no clue what you are talking about? A chain? what do you mean?
User avatar
Adriana Lenzo
 
Posts: 3446
Joined: Tue Apr 03, 2007 1:32 am

Post » Fri Jan 11, 2013 3:01 pm

mmm could you send me a sample plugin ?that woudl solve a lot of my issues .... can it be applied also on the face? since the bodypaint I am doing goes from toes to eyes ...
User avatar
Eibe Novy
 
Posts: 3510
Joined: Fri Apr 27, 2007 1:32 am

Post » Fri Jan 11, 2013 12:44 am

ok removing it solved but how do I do to activate a chain from inside the script?
Alias_PullChain.GetReference().Activate(kSomeRefOrActor)
User avatar
Tasha Clifford
 
Posts: 3295
Joined: Fri Jul 21, 2006 7:08 am

Post » Fri Jan 11, 2013 9:38 am

it said ...

Starting 1 compile threads for 1 files...
Compiling "QF_PROM_HyborianMound_01047909"...
d:\giochi\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_PROM_HyborianMound_01047909.psc(56,40): variable kSomeRefOrActor is undefined
No output generated for QF_PROM_HyborianMound_01047909, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on QF_PROM_HyborianMound_01047909
User avatar
tegan fiamengo
 
Posts: 3455
Joined: Mon Jan 29, 2007 9:53 am

Post » Fri Jan 11, 2013 1:44 am

Obviously, you need to pass that Function (a reference alias to) an Actor, not the word kSomeRefOrActor.
User avatar
Gavin Roberts
 
Posts: 3335
Joined: Fri Jun 08, 2007 8:14 pm

Post » Fri Jan 11, 2013 10:29 am

what means?I need to activate when player pass what shoudl I type in it?

Game.GetPlayer() ?
User avatar
Toby Green
 
Posts: 3365
Joined: Sun May 27, 2007 5:27 pm

PreviousNext

Return to V - Skyrim