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
Plank Doesn't Work ?
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#1
Plank Doesn't Work ?

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: (Select All)
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 ...
06-27-2014, 10:40 AM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#2
RE: Plank Doesn't Work ?

Firstly, what entity are you trying to break?

Derp.
06-27-2014, 10:46 AM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#3
RE: Plank Doesn't Work ?

Wooden planks Smile (3 planks)
that one when you trying to break it with hammer... but i rotated it...
06-27-2014, 10:47 AM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#4
RE: Plank Doesn't Work ?

So its the wooden_boards_block entity?

Derp.
06-27-2014, 10:59 AM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#5
RE: Plank Doesn't Work ?

yes...
06-27-2014, 10:59 AM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#6
RE: Plank Doesn't Work ?

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

Derp.
06-27-2014, 11:08 AM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#7
RE: Plank Doesn't Work ?

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...
(This post was last modified: 06-27-2014, 11:22 AM by Amnesiaplayer.)
06-27-2014, 11:10 AM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#8
RE: Plank Doesn't Work ?

void TeleportPlayer(string& asStartPosName);

Instantly teleports the player to the target StartPos.

Derp.
06-27-2014, 11:57 AM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#9
RE: Plank Doesn't Work ?

You ask here for another question..
WHY should you make another treadh for that as well??
06-27-2014, 12:04 PM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#10
RE: Plank Doesn't Work ?

(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.

(This post was last modified: 06-27-2014, 12:07 PM by Radical Batz.)
06-27-2014, 12:06 PM
Find




Users browsing this thread: 4 Guest(s)