Talk:Bethesda Tutorial Basic Quest Scripting

From the CreationKit Wiki
Jump to navigation Jump to search

Help[edit source]

Starting 1 compile threads for 1 files... Compiling "GDQRobesScript"... c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\GDQ01.psc(7,13): script property GDQ01 already defined c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\GDQ01.psc(7,13): script variable ::GDQ01_var already defined c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\GDQ01.psc(7,13): script property GDQ01 already has a get function defined c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\GDQ01.psc(7,13): script property GDQ01 already has a set function defined c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\GDQRobesScript.psc(3,13): cannot name a variable or property the same as a known type or script No output generated for GDQRobesScript, compilation failed.

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

What?!



Errors during compiling with the given script for amulet. The actual code is copy paste from what's given in the bottom section. Starting 1 compile threads for 1 files...

Compiling "GSQAmuletScript"...

c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\GSQAmuletScript.psc(6,9): SetStage is not a function or does not exist

c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\GSQAmuletScript.psc(6,9): cannot call the member function SetStage alone or on a type, must call it on a variable

No output generated for GSQAmuletScript, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.

Failed on GSQAmuletScript —The preceding unsigned comment was added by 22:55, 22 February 2012 (talkcontribs) Kroama

That sounds like you've specified the wrong type for your GSQ01 property. You expect a section of a script to compile on its own. Did you follow all the steps in this tutorial?
-- Cipscis 23:01, 22 February 2012 (EST)

There were no errors in anything up until this point, other scripts compiled properly as well. The quest in game works as it should, minus the fact that getting the amulet does not progress the quest further. I'll post the code i have in the script. (sorry, i've never tried using wiki talk before, so I'm not sure how to properly orient myself here or make the posts look neat)

Scriptname GSQAmuletScript extends ObjectReference

Quest Property GSQAmu Auto

Event OnContainerChanged(ObjectReference newContainer, ObjectReference oldContainer)

if (newContainer == Game.GetPlayer())

GSQ01.SetStage(30)

endif

EndEvent


I'm having the exact same issue. I did notice that while the text looks fine on the wiki, when I past it "GSQ01.SetObjectivedisplayed(30)" is out of alignment with the if statement, approximately 2.5 spaces too far right. I can realign it by backspacing 3 times and pressing tab, but I get the same compiling error after doing so. What's going on here!? --Ulithium Dragon 17:20, 11 April 2012 (EDT)
UPDATE: I'm actually getting failure to compile messages for every script I try on the GSQAmulet I created! It fails to compile the auto-generated code that gets attached to every property! (This didn't happen before I tried to paste and save the pre-made code off this wiki tutorial) --Ulithium Dragon 17:36, 11 April 2012 (EDT)
One thing I found, is I did something funny with the GSQ01 naming. I couldn't get it work correctly, and removed it. I thought that deleted it, but it did not, so I couldn't name a second thing GSQ01 either. Moral of the story: I had to use "NewProperty.SetStage(30)" as opposed to GSQ01.SetStage.
--AleKahpwn (talk) 18:21, 5 October 2012 (EDT)

Also having same problem with script compiling when following tutorial to the letter[edit source]

I've actually gone through the tutorials step by step twice to see if I could eliminate whatever mistake I made here, but no luck. When trying to set up the script for Bendu Olo's death, to fail the quest, I get the errors which read:


Starting 1 compile threads for 1 files... Compiling "GSQBenduOloScript"... c:\games\steamapps\common\skyrim\Data\Scripts\Source\temp\GSQBenduOloScript.psc(3,15): cannot name a variable or property the same as a known type or script c:\games\steamapps\common\skyrim\Data\Scripts\Source\temp\GSQBenduOloScript.psc(6,12): IsCompleted is not a function or does not exist c:\games\steamapps\common\skyrim\Data\Scripts\Source\temp\GSQBenduOloScript.psc(6,12): cannot call the member function IsCompleted alone or on a type, must call it on a variable c:\games\steamapps\common\skyrim\Data\Scripts\Source\temp\GSQBenduOloScript.psc(7,8): SetStage is not a function or does not exist c:\games\steamapps\common\skyrim\Data\Scripts\Source\temp\GSQBenduOloScript.psc(7,8): cannot call the member function SetStage alone or on a type, must call it on a variable No output generated for GSQBenduOloScript, compilation failed.

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


the script I am using:


Scriptname GSQBenduOloScript extends ObjectReference

Quest Property GSQ01 auto

Event OnDeath(Actor akKiller) if (!GSQ01.IsCompleted()) GSQ01.SetStage(200) endif EndEvent


This is just a cut and paste from the tutorial, and when trying to save, the error above shows.

Change the script to "extends Actor" instead. --Fg109 01:29, 31 May 2012 (EDT)

Problems with finding the Amulet Script[edit source]

I'm sure I've made the "GSQAmuletScript" before in an earlier attempt, but I can't find it in my scripts at all. I can't remake it either, because the Creation Kit says it already exists. I ended up naming it something else, but is there any way to find out where my lost script went? I can find my newly named script in the script lists, however. So it's really not an urgent problem.

Possible solution to your problems[edit source]

I've noticed that some of you are just copying and pasting the final script portion for the amulet. This won't compile on it's own, because you need to add a property line specifying what quest is being advanced by retrieving the amulet. To do this, simply add: "Quest Property MDQ01 auto" (without quotes) Hope this helps! --Themaineman 16:02, 28 May 2012 (EDT)

What would this script be?[edit source]

Hi first time here and I know this isn;t probably the right place to ask it but i'm sort of following this as a guideline for my 1st quest. I want it to be when the player steals a item from a npc(Or kills him just aquires it in general) that it advances the quest stage to 20.I tried looking it up in the script references but that was all too advanced for me. help please? thanks

Saving the Mod In-Between Times[edit source]

Saved the mod. Got to the Bethesda_Tutorial_Basic_Quest_Scripting#Properties part. "Put "TutorialQuest" in the Name field, and leave everything else blank." Fine. Clicked OK, got:

Starting 1 compile threads for 1 files...

Compiling "GSQThiefScript"...

....\Data\Scripts\Source\GSQThiefScript.psc(3,29): no viable alternative at input 'TutorialQuest'

....\Data\Scripts\Source\GSQThiefScript.psc(7,15): script property TutorialQuest already defined

....

Looked in GSQThiefScript.psc:

Scriptname GSQThiefScript extends ObjectReference

Quest Property NewProperty = TutorialQuest Auto

Quest Property TutorialQuest Auto

Quest Property TutorialQuest Auto {TutorialQuest}

Quest Property TutorialQuest Auto

Quest Property TutorialQuest Auto


Huh. Did I just do that by just ok on the actor screen to save? Quit the actor dialogue, deleted the psc and pex files and started again from Bethesda_Tutorial_Basic_Quest_Scripting#Adding_Scripts--Lmstearn (talk) 2015-01-12T07:09:03 (EST)

Setting a script to change quest stage only after killing 2 unique actors.[edit source]

Is there a way to create a script that will only trigger the next stage in my quest once two different actors are killed? I wanted to set it up so I had more than one enemy to fight, make the quest a bit harder, but I can't figure out how to only have the quest trigger when they both die instead of just one of them. Any help is greatly appreciated. Leotheleopard (talk) 2019-04-02T05:51:28 (EDT)