Jump to content

Fragment Frustration


LittleBaron

Recommended Posts

So, I am trying my darndest to learn this new quest making business, but keep hitting a big snag.

 

A script I had written to distribute items to vendors as a simple one-off OnInit event in a quest script worked just fine, all the properties defined and whatnot.

 

So I am trying to add some more depth to the 'quest' and give it some stages, etc. SO now the same script's function needs to be in a Fragment (I guess) so that it doesn't just fire off at game start, and only fires off after the player has read a note he receives from the courier.

 

I followed along with the Quest Tutorial on the CK Wiki... turns out, it never makes use of fragments at all.

 

The CK wiki itself never really goes into detail about fragments, either.

 

For instance: according to the page on the Quest Stages Tab, you can have 'easy access' to the properties defined in another script by calling it in the kmyscript pull down box... But, doing that and then pasting the original script (sans properties) into the fragment box results in compile errors due to undefined objects. If I try to include the properties again in the fragment manually, it won't compile either, giving me random errors such as not recognizing 'property' on one specific line out of about 40 uses or not recognizing a period (.) on another. So... it's apparently not so 'easy'.

 

Just to spell out what I'm trying to accomplish:

 

One quest starts at game start, checks to see if the player has already completed a vanilla quest... if so, the courier is sent with a note from a specific vanilla NPC. If not, the script will check again every hour until the player has completed the quest.

 

That part of the quest works fine!

 

Opening and reading the letter is supposed to trigger the start of the real quest. I do get a Debug message that this OnRead script has fired, but the script attached to the new quest (called in the OnRead script as property defined myquest.Start()) does not seem to fire.

 

OnInit() in the 'proper' quest script causes the desired script to fire on Game start no matter what, even if GameStartEnabled is NOT checked.

OnReset() does nothing at any time.

 

And that's when I started looking into fragments...

Link to comment
Share on other sites

So apparently it is impossible to add properties to a fragment the way you would add them 'normally', you instead add them manually via the properties tab FIRST, then you can script them in. On top of that, the Properties Tab gets buggy unless you already have a compiled script to start with, and sometimes you need to rename the script to get it to work properly.

 

Here is a link to a thread in which I got help for this:

 

My link

Link to comment
Share on other sites

Yep. Nice siggy btw lol.

 

You also need to be awake of objects and there types. Certain functions and events will not work if you did not pass certain variables (even if you don't use them) or have an object like an actor, but you called him an object reference when he needs to be an actor. You can cast the types, but sometimes you might have added the actor as one when you want the other.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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