Frictional Games Forum (read-only)
Plank Doesn't Work ? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Plank Doesn't Work ? (/thread-25567.html)

Pages: 1 2


Plank Doesn't Work ? - Amnesiaplayer - 06-27-2014

i already saw a QUESTION on the forum of someone that asked this.. how to do a place.. when you go there the plank will break and you will fall...
i tried this but it doesn't work! i think my hps file is good to ?

PHP Code:
void OnLeave()
{

}

void OnStart()
{
AddUseItemCallback("""sleutel1""deur1""UsedKeyOnDoor"true);
AddEntityCollideCallback("Player""BreakingArea""BoardCreak"true1);
}

void UsedKeyOnDoor (string &in asItemstring &in asEntity)
{
SetSwingDoorLocked("deur1"falsetrue); 
PlaySoundAtEntity("""unlock_door.snt""deur1"0false);
RemoveItem("sleutel1");


void BoardCreak(string&in asParentstring &in asChildint alState)
{
PlaySoundAtEntity("WoodCreaking""CREAKINGNOISE.snt""BreakingArea"0.15ffalse);
AddTimer("ImFaaaalling"3.34f"StartFalling");
}

void StartFalling(string &in asTimer)
{
SetPropHealth("Board"0);


This is my hps file.. and if you see , my plank name is BoardCreak and my area name is BreakingArea ...


RE: Plank Doesn't Work ? - Neelke - 06-27-2014

Firstly, what entity are you trying to break?


RE: Plank Doesn't Work ? - Amnesiaplayer - 06-27-2014

Wooden planks Smile (3 planks)
that one when you trying to break it with hammer... but i rotated it...


RE: Plank Doesn't Work ? - Neelke - 06-27-2014

So its the wooden_boards_block entity?


RE: Plank Doesn't Work ? - Amnesiaplayer - 06-27-2014

yes...


RE: Plank Doesn't Work ? - Neelke - 06-27-2014

Alright, just making sure. The entity youre trying to set health to 0 on, is it named Board? With the capital and everything?


RE: Plank Doesn't Work ? - Amnesiaplayer - 06-27-2014

It's named BoardCreak
with Capital letters...

EDIT: omg i'm a idiot xD
i was reading it for the second time.. and said : huh Board ? and was looking at my HPS ifle.. it was Board ot.. i changed it worked! BUT
it works only if i touch it.. Sad is it possible when i WALK only ??

EDIT+: Thanks! it worked now... Big Grin just when i walk it will break but i have 1 question...
how can i make a Teleport thing.. so if he fall down he will teleport to an other place...


RE: Plank Doesn't Work ? - Neelke - 06-27-2014

Code:
void TeleportPlayer(string& asStartPosName);

Instantly teleports the player to the target StartPos.



RE: Plank Doesn't Work ? - DnALANGE - 06-27-2014

You ask here for another question..
WHY should you make another treadh for that as well??


RE: Plank Doesn't Work ? - Radical Batz - 06-27-2014

(06-27-2014, 12:04 PM)DnALANGE Wrote: You ask here for another question..
WHY should you make another treadh for that as well??

Now DnALANGE you don't have to sound mean, he is a new member in our forums and doesn't know yet about the rules!
Just as DnALANGE said, you don't have to create a thread every minute with a new question, you can just post new questions in the same thread. just change the name of the same thread every time.