blackandwhite14593 Posted July 2, 2016 Posted July 2, 2016 Hi! I was testing this "find matching reference in loaded area" fill type for an alias. But I can't get it to fill in game for some reason. All other aliases get filled on game load but this one doesn't want to. Please help. Thank you in advance!
Guest Posted July 2, 2016 Posted July 2, 2016 You need to start the quest from another quest to have them filled.
blackandwhite14593 Posted July 2, 2016 Author Posted July 2, 2016 You need to start the quest from another quest to have them filled. Just did it, still doesn't work I created quest to run on game load and added script to it to start my already created quest. Did I have to do something more?
Guest Posted July 2, 2016 Posted July 2, 2016 OK. Let's give some names to the quests (or it will be difficult to understand each other.) Your main controller quest: bnwMainQuest The quest to fill aliases: bnwAliasesQuest bnwMain quest can start as you wish. bnwAliasesQuest should NOT start when the game start. Create your aliases in bnwAliasesQuest, be sure you check "optional", then find matching ref, check in loaded area too. Then set the conditions. Start easy with the conditions to be sure you get something. Forget this quest, you are done with it. Now in bnwMainQuest, create a quest script, in case there is not yet one. Add a couple of properties: Quest Property bnwAliasesQuest Auto ReferenceAlias[] Property bnwAliases Auto Be sure to fill these properties. The quest should autofill if the name is right, the aliases almost never auto fill so you have to pick them manually. Then use a script function: Function getTheActors() bnwAliasesQuest.start() Utility.wait(0.1) int i = bnwAliases.length while i i -= 1 Actor a = bnwAliases[i].getActorRef() if a Debug.Trace("Found: " + a.getDisplayName()) endIf endWhile bnwAliasesQuest.stop() bnwAliasesQuest.reset() EndFunction
zaira Posted July 2, 2016 Posted July 2, 2016 Hi! I was testing this "find matching reference in loaded area" fill type for an alias. But I can't get it to fill in game for some reason. All other aliases get filled on game load but this one doesn't want to. Please help. Thank you in advance! Hm - during game load - I think it is not a good idea to refer to a loaded area in a start game enabled quest. If you want this you need a bootstrap quest that starts the real quest when you enter a cell for the first time (eg. Player Alias OnLoad). Another option would be to place this quest in story manger and use a cell change trigger.
blackandwhite14593 Posted July 2, 2016 Author Posted July 2, 2016 OK. Let's give some names to the quests (or it will be difficult to understand each other.) Your main controller quest: bnwMainQuest The quest to fill aliases: bnwAliasesQuest bnwMain quest can start as you wish. bnwAliasesQuest should NOT start when the game start. Create your aliases in bnwAliasesQuest, be sure you check "optional", then find matching ref, check in loaded area too. Then set the conditions. Start easy with the conditions to be sure you get something. Forget this quest, you are done with it. Now in bnwMainQuest, create a quest script, in case there is not yet one. Add a couple of properties: Quest Property bnwAliasesQuest Auto ReferenceAlias[] Property bnwAliases Auto Be sure to fill these properties. The quest should autofill if the name is right, the aliases almost never auto fill so you have to pick them manually. Then use a script function: Function getTheActors() bnwAliasesQuest.start() Utility.wait(0.1) int i = bnwAliases.length while i i -= 1 Actor a = bnwAliases[i].getActorRef() if a Debug.Trace("Found: " + a.getDisplayName()) endIf endWhile bnwAliasesQuest.stop() bnwAliasesQuest.reset() EndFunction Got it, thanks! Now what do I do with the function? Should I run it inside onupdate event?
Guest Posted July 2, 2016 Posted July 2, 2016 That is up to you. I have no idea on how often you wanna check the actors. @zaira advise is good if you wanna re-check the actors every time you change the location. An event OnUpdate() is OK if you wanna do it continuously (but remember that the game will suffer if you do it constantly.)
blackandwhite14593 Posted July 2, 2016 Author Posted July 2, 2016 That is up to you. I have no idea on how often you wanna check the actors. @zaira advise is good if you wanna re-check the actors every time you change the location. An event OnUpdate() is OK if you wanna do it continuously (but remember that the game will suffer if you do it constantly.) Oh for God sake... it still doesn't work. The aliases besides player's still do not get filled. That is up to you. I have no idea on how often you wanna check the actors. @zaira advise is good if you wanna re-check the actors every time you change the location. An event OnUpdate() is OK if you wanna do it continuously (but remember that the game will suffer if you do it constantly.) Got it, thank you!
blackandwhite14593 Posted July 2, 2016 Author Posted July 2, 2016 Is it working or not? Your last message is confusing. Hahah, no my reply to zaira..i just want to thank him for help. It is not working.
Guest Posted July 2, 2016 Posted July 2, 2016 OK. Can you post your code? (You quoted me, so probably he didn't get your "thank you")
blackandwhite14593 Posted July 2, 2016 Author Posted July 2, 2016 OK. Can you post your code? (You quoted me, so probably he didn't get your "thank you") Oh right, hahah Here is MainQuest's attached script: Scriptname MyScript extends Quest Event onUpdate() getTheActors() EndEvent Function getTheActors() debug.notification("getTheActors function fired") AliasQuest.start() Utility.wait(0.1) actor player = thePlayer.getActorRef() actor player2 =theNPC.getActorRef() debug.notification("thePlayer: " + player.getDisplayName()) debug.notification("theNPC: " + player2.getDisplayName()) AliasQuest.stop() AliasQuest.reset() EndFunction ReferenceAlias Property thePlayer Auto ReferenceAlias Property theNPC Auto Quest Property AliasQuest Auto Here's the code attached to start up stage for MainQuest: ;BEGIN ALIAS PROPERTY thePlayer ;ALIAS PROPERTY TYPE ReferenceAlias ReferenceAlias Property Alias_thePlayer Auto ;END ALIAS PROPERTY ;BEGIN FRAGMENT Fragment_0 Function Fragment_0() ;BEGIN CODE registerForUpdate(10) ;END CODE EndFunction ;END FRAGMENT ;END FRAGMENT CODE - Do not edit anything between this and the begin comment Quest Property thequest Auto Myscript Property script Auto
Guest Posted July 2, 2016 Posted July 2, 2016 OK. Don't do this way. Remove and NEVER call "RegisterForUpdate". Somewhere (Usually in the "OnInit" event, but this does not really matter, add a RegisterForSINGLEUpdate(10.0) And in your "OnUpdate" change it to Event OnUpdate() getTheActors() RegisterForSingleUpdate(10.0) EndEvent And be sure you check the actors in the RefAliases, they may be empty.
blackandwhite14593 Posted July 3, 2016 Author Posted July 3, 2016 OK. Don't do this way. Remove and NEVER call "RegisterForUpdate". Somewhere (Usually in the "OnInit" event, but this does not really matter, add a RegisterForSINGLEUpdate(10.0) And in your "OnUpdate" change it to Event OnUpdate() getTheActors() RegisterForSingleUpdate(10.0) EndEvent And be sure you check the actors in the RefAliases, they may be empty. Ok. Thanks! But it still doesn't work. I checked all reference aliases, everything is filled in CK. I think I'll just move on to something else... In any other case the aliases get filled without problem, for ex if I set change location event for the quest. But with this configuration it just doesn't want to work. Speaking of change location event, could I ask you, do you know how could I exclude the player from being filled into the alias, and in general preventing two aliases from being filled with the same actor? Because I mean all my aliases just get filled with the player. Can I use conditions or something?
Guest Posted July 3, 2016 Posted July 3, 2016 Please use the new site. This one is going to disappear quickly.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.