Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Beginner needs scripting help...
Author Message
cheztheguy Offline
Junior Member

Posts: 12
Joined: Jun 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
rojkish Offline
Junior Member

Posts: 45
Joined: Jun 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
cheztheguy Offline
Junior Member

Posts: 12
Joined: Jun 2011
Reputation: 0
Post: #3
RE: Beginner needs scripting help...
Thanks alot, that code is working perfectly!
06-24-2011 08:01 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)