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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Beginner needs scripting help...
cheztheguy Offline
Junior Member

Posts: 12
Threads: 7
Joined: Jun 2011
Reputation: 0
#1
Beginner needs scripting help...

Hi, I'm working on a map, and there's a key on a desk. I renamed the key "fakekey_1" and the CustomSubItemName is "fakekey" , and the CallbackFunc(tion) is getkey1

What I want the player to do when he picks up the key is this script...
(this is not the full script)


void getkey1(string &in asEntity)
{
CompleteQuest("Quest0", "Mission0");
GiveSanityBoost();
SetEntityActive("Enemy2" , true);
SetEnemyIsHallucination("Enemy2", true);
}

However when I pick up the key in the game, it just says "Picked up Hotel Key" (that was the name of the item). Nothing else happens.

And, I would like to know about quests...
how there is a first part and a second part ("Quest0" and "Mission0" above).

Thanks! Big Grin
06-23-2011, 08:14 AM
Find
rojkish Offline
Junior Member

Posts: 45
Threads: 0
Joined: Jun 2011
Reputation: 0
#2
RE: Beginner needs scripting help...

So, what exactly are you trying to do? You want to add a quest when the player interacts with fakekey_1?

In that case, use the AddQuest(string& asName, string& asNameAndTextEntry);

Example of this;

Spoiler below!


AddQuest("KeyQuest", "KeyQuest");

<CATEGORY Name="Journal">
<Entry Name="Quest_KeyQuest_Text">YOUR QUEST HERE</Entry>
</CATEGORY>

06-23-2011, 01:57 PM
Find
cheztheguy Offline
Junior Member

Posts: 12
Threads: 7
Joined: Jun 2011
Reputation: 0
#3
RE: Beginner needs scripting help...

Thanks alot, that code is working perfectly!

06-24-2011, 08:01 AM
Find




Users browsing this thread: 1 Guest(s)