Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with adding mementos/quests.
SonOfLiberty796 Offline
Senior Member

Posts: 371
Threads: 39
Joined: Aug 2011
Reputation: 2
#1
Need help with adding mementos/quests.

Ok so here's my script:

.hps
////////////////////////////
// Run when entering map
void OnEnter()
{
        PlayMusic("amb_safe.ogg", true, 0.5, 5, 0, true);
        AddUseItemCallback("", "crowbar", "closet", "KeyOnDoor1", true);
        AddUseItemCallback("", "HallKey", "hall", "KeyOnDoor2", true);
        AddUseItemCallback("", "artroomkey", "artroom", "KeyOnDoor3", true);
        AddUseItemCallback("", "pathwaytolabkey", "pathtolab", "KeyOnDoor4", true);
        SetLevelDoorLockedText("pathtolab", "Doors", "Door_pathtolab_Name");
        AddQuest("readnote","readnote");
        CompleteQuest("readnotecomplete", "readnotecomplete");
}

.lang
        <Entry Name="Quest_readnote_Text">Read the note next to your bed.</Entry>
        <Entry Name="Quest_readnotecomplete_Text">Read the note next to your bed.</Entry>

I got the AddQuest to work (it shows up in my game that i received a memento. However, when i try to delete that memento, it doesnt. Btw i added .hps and .lang just to clarify that its those files, its not in my script.

Any help? Please and thank you.
(This post was last modified: 08-09-2011, 08:16 AM by SonOfLiberty796.)
08-09-2011, 06:09 AM
Find
Kurton Offline
Senior Member

Posts: 533
Threads: 8
Joined: Oct 2010
Reputation: 16
#2
RE: Need help with adding mementos/quests.

Try changing

CompleteQuest("readnotecomplete", "readnotecomplete");

to

CompleteQuest("readnote", "readnote");

That is what deletes it, I'm pretty sure.

08-09-2011, 06:21 AM
Find
SonOfLiberty796 Offline
Senior Member

Posts: 371
Threads: 39
Joined: Aug 2011
Reputation: 2
#3
RE: Need help with adding mementos/quests.

(08-09-2011, 06:21 AM)Kurton Wrote: Try changing

CompleteQuest("readnotecomplete", "readnotecomplete");

to

CompleteQuest("readnote", "readnote");

That is what deletes it, I'm pretty sure.

Hm, it does delete it, but it instantly deletes it. Like it doesnt even tell me what the quest was...
(This post was last modified: 08-09-2011, 06:27 AM by SonOfLiberty796.)
08-09-2011, 06:26 AM
Find
Kurton Offline
Senior Member

Posts: 533
Threads: 8
Joined: Oct 2010
Reputation: 16
#4
RE: Need help with adding mementos/quests.

Oh! Derp, I didn't notice; You have the AddQuest and CompleteQuest in the same function, of course it will delete once it is added. Move the CompleteQuest to a function called when the objective is actually completed, then.

08-09-2011, 06:29 AM
Find
SonOfLiberty796 Offline
Senior Member

Posts: 371
Threads: 39
Joined: Aug 2011
Reputation: 2
#5
RE: Need help with adding mementos/quests.

(08-09-2011, 06:29 AM)Kurton Wrote: Oh! Derp, I didn't notice; You have the AddQuest and CompleteQuest in the same function, of course it will delete once it is added. Move the CompleteQuest to a function called when the objective is actually completed, then.

I understand you..but um...im a noob at scripting (pretty much the quests/mementos part got me stuck) so i would love if you could explain a example?

EDIT:
void OnEnter()
{
        PlayMusic("amb_safe.ogg", true, 0.5, 5, 0, true);
        AddUseItemCallback("", "crowbar", "closet", "KeyOnDoor1", true);
        AddUseItemCallback("", "HallKey", "hall", "KeyOnDoor2", true);
        AddUseItemCallback("", "artroomkey", "artroom", "KeyOnDoor3", true);
        AddUseItemCallback("", "pathwaytolabkey", "pathtolab", "KeyOnDoor4", true);
        SetLevelDoorLockedText("pathtolab", "Doors", "Door_pathtolab_Name");
        AddQuest("readnote", "readnote");
}

void
{
        CompleteQuest("readnote", "readnote");
}

Like this? If so, what do i fill the "void (blank)" with?

EDIT2:Never mind! I finally figured it out! Big Grin it took me a whole lot of time just to figure out what i was doing wrong! Tongue still, thanks for your help man, you cleared something out that i was confused with Smile
(This post was last modified: 08-09-2011, 08:15 AM by SonOfLiberty796.)
08-09-2011, 06:33 AM
Find




Users browsing this thread: 1 Guest(s)