Frictional Games Forum (read-only)

Full Version: Plank Doesn't Work ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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 ...
Firstly, what entity are you trying to break?
Wooden planks Smile (3 planks)
that one when you trying to break it with hammer... but i rotated it...
So its the wooden_boards_block entity?
yes...
Alright, just making sure. The entity youre trying to set health to 0 on, is it named Board? With the capital and everything?
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...
Code:
void TeleportPlayer(string& asStartPosName);

Instantly teleports the player to the target StartPos.
You ask here for another question..
WHY should you make another treadh for that as well??
(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.
Pages: 1 2