Jump to content

[LE] Papyrus OnEffectStart and Quest Alias question


silhouett

Recommended Posts

 

ReDragon2013 I ran your script as is because it did have some trace and debug stuff and I found this in the log,

 

SleepPackage: OnEffectStart() - target = [Actor < (28007014)>], caster = [Actor < (00000014)>]
[01/21/2017 - 06:53:21PM] SleepPackage: refAlias number 0 is <None>
[01/21/2017 - 06:53:21PM] SleepPackage: refAlias number 1 is <None>
[01/21/2017 - 06:53:21PM] SleepPackage: refAlias number 2 is <None>
[01/21/2017 - 06:53:21PM] SleepPackage: refAlias number 3 is <None>
[01/21/2017 - 06:53:21PM] SleepPackage: refAlias number 4 is <None>
[01/21/2017 - 06:53:21PM] SleepPackage: refAlias number 5 is <None>

SleepPackage: OnEffectFinish() - target = [Actor < (28007014)>], caster = [Actor < (00000014)>]

 

 

How many people have to tell you it is not the script????? Cooley very clearly told you your problem is with your alias not filling.

Edited by Masterofnet
Link to comment
Share on other sites

Masterofnet thanks for the Criticism and Sarcasm :) By the way my latest mod is for fallout 4 Sanctuary Master. It uses a quest with Aliases for 18 spotlights.

I tried your script and got its not working getting alias

BigMan - I can not even get a refalias

BigManRef - Back to kindergarden.
YourAlias - I can not even get a refalias to work!!
Someday I will get this right!! I won't give up!!!"
I decided to add a ref 6 but already filled and make a stab at getting it which failed as well just so I was sure of everything you were looking for.

Are we sure references from a script work in a Magic Effect Script ?

Link to comment
Share on other sites

Masterofnet Don't hold back on insulting me :smile:

 

Don't worry I won't. And yes I am joking with you. However you should have run this Alias issue down hours ago.

 

There seems to be something wrong with your quest. You are not even able to fill an alias property on a script and get it to work.

 

I have never had that problem so I don't know how to help you.

Edited by Masterofnet
Link to comment
Share on other sites

Hi silhouett,

 

I have adjusted the second approach by cdcooley, maybe it helps to find your issue.

 

Scriptname SleepPackageScript extends ActiveMagicEffect  
{rewritten by ReDragon 2017}

; link: https://forums.nexusmods.com/index.php?/topic/5282495-papyrus-oneffectstart-and-quest-alias-question/
; silhouett
; "Ok I played with all the above as was and they didn't work?"

  Quest   PROPERTY SleepQuest     auto        ; fill with quest it was created
  Faction PROPERTY SleeperFaction auto        ; UnUSED by default

 ;ReferenceAlias PROPERTY FirstEmptyAlias auto Hidden
 ;ReferenceAlias RefAlias

; -- EVENTs -- 2

EVENT OnEffectStart(Actor akTarget, Actor akCaster)
    Debug.Trace("SleepPackage: OnEffectStart() - target = " +akTarget+", caster = " +akCaster)        ; only for info
    myF_Action(akTarget)
ENDEVENT

EVENT OnEffectFinish(Actor akTarget, Actor akCaster)
    Debug.Trace("SleepPackage: OnEffectFinish() - target = " +akTarget+", caster = " +akCaster)        ; only for info
ENDEVENT


; -- FUNCTION --

FUNCTION myF_Action(Actor akTarget)
;----------------------------------
    referenceAlias RA        ; use that instead of RefAliases on top
    referenceAlias RA_empty

int j = 0
int n = 0                    ; make sure the AliasID starts by 0 (if not adjust n to startpoint) and they are continously (0,1,..,5)
int i = 0
    WHILE (i < 6)            ; quest should have 6 refAlias, we try all to see whether akTarget is already in use
        RA = SleepQuest.GetAlias(n+i) as ReferenceAlias
        IF ( RA )
            actor aRef = RA.GetActorReference()
            IF ( aRef )
                IF (aRef == akTarget)
                    j = n + i
                    Debug.Trace("SleepPackage: Target already used by RefAlias number " +j)
;;                  Debug.Notification("Target already in use by refAlias no. " +j)
                    RETURN    ; - STOP -    break the loop, end the function immediately
                ENDIF
            ELSEIF (!RA_Empty)
                RA_empty = RA
                j = n + i
            ENDIF
        ELSE
            Debug.Trace("SleepPackage: refAlias number " +(n+i)+ " is <None>")
        ENDIF
        i = i + 1
    ENDWHILE

IF ( RA_empty )        ; test for a valid first empty RefAlias
    RA_empty.ForceRefTo(akTarget as ObjectReference)
    Debug.Notification("Fill alias in slot " +j)
ENDIF
ENDFUNCTION

 

 

 

Interesting work.

 

i = i + 1 Why do you prefer this to: I += 1 ?

 

Why do you prefer to do this?

 

Function()

Actor aRef = aktarget

EndFunction

 

Instead of this?

 

Actor aRef

Function()

aRef = aktarget

EndFunction

 

 

:smile: I dont think the Magic Effect works right with quests ?

 

They do and that is something you could test in about 5 min.

 

To be honest I am a bit disappointed in the way you continue to waste the time of people who have come here to help you, Cooley tells you that you have a problem with your aliases and you keep running scripts. Now it is the Magic effect? However, this has turned out to be an interesting thread.

 

There are several things that can be going on here. Including game save issues. I was going to suggest you check that your quest is running but I noticed it was start game enabled. You may want to check it anyway I do not work with start game enabled quests so I don't know.

 

This is what I would suggest. It seems like a long list but should only take you a couple of Min.

 

Make a couple dozen saves of your game.

1. Duplicate your magic effect. Rename it, clear all of the script properties and save it Then attach the new template to your spell.

2. Make a new quest. Allow repeat stages, uncheck only run once. Do not start game enable. Select Player remove Item event.

3. Go into Story Manager and create a quest node under Player Remove Item and then add a condition. In the condition select run on event data and then pick an Item you have only one of in your inventory and put that in the condition. Do not pick up an item like that again during testing.

4. Do not have any stages so you do not have a quest script. - We are only filling aliases.

5. Create 6 aliases. Do what Cooley told you and look up their number on the quest and name them accordingly.

"The ID column on the Quests Aliases tab of the Quest window is between the Alias Name and Optional columns. You have to widen it to see the numbers."

Edited by Masterofnet
Link to comment
Share on other sites

Masterofnet I do very much appreciate anyone that helps or tries to and like you to be honest From post one you have been negitive and suggested I didn't know anything and lets go with that...

Is it not the purpose of posting for help is that others help you because you do not know something ? :sick:
I have tried every script you or the others have placed here and they didn't work, they were your scripts.. You posted to have me try ??? so how am I not
finding the problem ? :confused: :confused: :confused:

cdcooley suggested I have a problem with my aliases and I posted one of them for you to see, by the way he was quite polite didn't talk down to me. :cool: :cool: :cool:
I tried starting a new game and had the same issue... so not a save game issue I have just placed the similar script in a trigger field and had an actor walk through it and it also didnt work so it is not the Magic effects issue, It is the quest but I have the quest checked to run at start and it has IDs perhaps you can graciously see an error for me ??? :huh:
http://sitehighway.com/img/aliases.jpg
http://sitehighway.com/img/queststartup.jpg
http://sitehighway.com/img/alias.jpg

Link to comment
Share on other sites

Your IDs are in the 40s and 50s.

 

I never talk down to anyone. I do confront people with their behavior and in this case I have been 100% correct about yours.

 

I am not going to be able to help you anymore. However I hope other people continue to and you eventually get the quest running.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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