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
Frustration Overdose (Help!)
GhastDagger Offline
Junior Member

Posts: 9
Threads: 3
Joined: Sep 2011
Reputation: 0
#1
Frustration Overdose (Help!)

Hello there buds, after i played "almost" all the custom stories out there..my cleaver mind told me to make my very own Custom Story!
i was doing great until i that fearsome big jawed monster called "Scripting" stood on my way and told me that there's no way for me to pass him..
i crumbled to the ground..crying and yelling for help! and here i am.. seeing the light from above..

ok enough dramatic crap and here's the problem: idk what's wrong but almost every thing i do in scripting part goes wrong, like now i want that monster to break in a room after the player picks something up.. he doesn't appear! and worst of all, the items/keys/Notes i put are empty even when i write the desc/name in the Language file..


P.S: how can i do a scare moment? (like when you see a corpse and the camera shake with a sanity decrease)

and before you ask here's the map's HPS file:


void OnStart()
{
AddUseItemCallback("", "Closet_Key", "Closet_1", "KeyOnDoor", true);
SetEntityCallbackFunc("Emperor's Head", "NoteCallback");
}


void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Closet_1", false, true);
PlaySoundAtEntity("", "unlock_door", "Closet_1", 0, false);
RemoveItem("Closet_Key");
}


void NoteCallback(string &in entity, string &in type)
{
if(type == "OnPickup") SetEntityActive("Suiter", true);
}


And the language file:






chaos started to haul over and things became nasty..but with style




A silver key to the main hall
Main hall key
A small rusty key.
Closet Key


Survivors
If you're reading this, please go through the trap door.. it's the only way out! [br]And don't forget to get whatever's left in the storage. [br]The Chief.
Please help us..
Take my head and throw it into the holy well, it's the only way to send these demons back to Oblivion[br][br][br]Good Luck [br] Emperor Jarry Willson.






Please help a hopeless nooby out Sad
10-07-2011, 07:55 PM
Find
Rownbear Offline
Member

Posts: 157
Threads: 13
Joined: Apr 2011
Reputation: 2
#2
RE: Frustration Overdose (Help!)

Ok alittle tired so we'll see if I can be any help. For me when you cant see custom name/description of items in your customstory is because you're running in a dev environment. If you play it as a normal customstory you can see that, atleast thats how it works for me.


///////////PICKUP ACTIVATE////////////
Collide means that the two entities literally collide, as in, physically touch. Picking up say a key doesn't count as collision.
You'll need a interact callback. Select the key in the editor, and find the callback field. Write KeyPickUp. Then, in your script, put a function:


void OnStart()
{
SetEntityPlayerInteractCallback("castle_key_1", "KeyPickUp", true);

}

void KeyPickUp(string &in entity, string &in type)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0.1, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0.1, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0.1, "");
GiveSanityDamage(15, true);
StartScreenShake(0.2f, 4, 1, 1);
PlaySoundAtEntity("guardian_distant3", "guardian_distant3.snt", "Player", 0, false);
}

Just place the monster behind the door and place the Pathnodes out so he walks through the door and he will smash it down. the other stuff there is screen shaking, sanity damage and a sound to add a more scary touch to it.

EDIT: Removed the typing mistake if other people were looking for the answer aswell.


(This post was last modified: 10-08-2011, 08:32 PM by Rownbear.)
10-07-2011, 10:33 PM
Find
GhastDagger Offline
Junior Member

Posts: 9
Threads: 3
Joined: Sep 2011
Reputation: 0
#3
RE: Frustration Overdose (Help!)

woah thanks alot man! you deserve a medal! Big Grin
10-08-2011, 11:27 AM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#4
RE: Frustration Overdose (Help!)

Well, he deserves at least reputation +1 for it then Wink! That can be your medal Smile

The Interrogation
Chapter 1

My tutorials
10-08-2011, 02:34 PM
Find
GhastDagger Offline
Junior Member

Posts: 9
Threads: 3
Joined: Sep 2011
Reputation: 0
#5
RE: Frustration Overdose (Help!)

oh hey i didn't know about that, i'm new in here o=
hm i'm kinda facing a problem right now, i can't seem to make the monster spawn when i pick up the key for some reason... what's the matter now ? o=
(This post was last modified: 10-08-2011, 04:22 PM by GhastDagger.)
10-08-2011, 03:43 PM
Find
Rownbear Offline
Member

Posts: 157
Threads: 13
Joined: Apr 2011
Reputation: 2
#6
RE: Frustration Overdose (Help!)

(10-08-2011, 03:43 PM)GhastDagger Wrote: oh hey i didn't know about that, i'm new in here o=
hm i'm kinda facing a problem right now, i can't seem to make the monster spawn when i pick up the key for some reason... what's the matter now ? o=
I made a typing mistake:
void KeybarPickUp(string &in entity, string &in type)

Remove the key"bar"Pickup and only use
void KeyPickUp(string &in entity, string &in type)



see if that works




10-08-2011, 05:17 PM
Find
GhastDagger Offline
Junior Member

Posts: 9
Threads: 3
Joined: Sep 2011
Reputation: 0
#7
RE: Frustration Overdose (Help!)

OMG dude i started the map to test if it's gonna work or not, at 1st i thought it wont but suddenly BAM he popped up and made me scream at my own map....lost some manly points there..

any way thanks alot mate! i owe u one or even more!
10-08-2011, 06:25 PM
Find
Rownbear Offline
Member

Posts: 157
Threads: 13
Joined: Apr 2011
Reputation: 2
#8
RE: Frustration Overdose (Help!)

(10-08-2011, 06:25 PM)GhastDagger Wrote: OMG dude i started the map to test if it's gonna work or not, at 1st i thought it wont but suddenly BAM he popped up and made me scream at my own map....lost some manly points there..

any way thanks alot mate! i owe u one or even more!
Btw for the extra_english language file to get your custom quest/itemw text, mine looks like

Spoiler below!




<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Custom story description.</Entry>
</CATEGORY>

<CATEGORY Name="Journal">
<Entry Name="Quest_ShelfQuest_Text">You feel a faint draft comming from underneath the closet.</Entry>
<Entry Name="Note_LeverLetter_Name">About the key.</Entry>
<Entry Name="Note_LeverLetter_Text">About the key.[br][br]The key </Entry>
</CATEGORY>

<CATEGORY Name="Inventory">
<Entry Name="ItemName_studykey">Old Key</Entry>
<Entry Name="ItemDesc_studykey">It's written something on it, but it seems to be in a foreign language.</Entry>
</CATEGORY>

<CATEGORY Name="Messages">
<Entry Name="InteractRustyLever">It's stuck, Needs to be greased.</Entry>
<Entry Name="InteractNoLever">No Lever.</Entry>
<Entry Name="NoSteam">No Steam Pressure.</Entry>
</CATEGORY>

<CATEGORY Name="Levels">
<Entry Name="CastleBasement">Castle Basement</Entry>
</CATEGORY>

<CATEGORY Name="Endings">
<Entry Name="Credits">Thanks for playing the demo! </Entry>
</CATEGORY>
</LANGUAGE>


Example: The key you want to place, click on it in the leveleditor and type in the CustomSubItemName "studykey" as I have if you look at "Inventory" category. This way when you pick it up it will be called Old Key and the description is as written above. Just edit it the way you want to make it right for yourstory and just copy the line and change it for different items, for letters, levels just edit new ones in the right category. Hope this helps with getting your item name/desc to work. Smile


10-08-2011, 08:45 PM
Find
GhastDagger Offline
Junior Member

Posts: 9
Threads: 3
Joined: Sep 2011
Reputation: 0
#9
RE: Frustration Overdose (Help!)

thanks alot! i'll be sure to credit you in the credits Big Grin
wouldn't of done a thing without u lol
10-09-2011, 11:36 AM
Find




Users browsing this thread: 1 Guest(s)