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
2 scripts
Author Message
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #1
2 scripts
Hey guys, so, I was wondering how you do 2 things, 1, how to comebine the hammer and chipper, and 2ndly, how to use them on a breakable wall, kinda like the floor in Prison in the main story. Any help appreciated.

03-01-2012 08:07 AM
Find all posts by this user Quote this message in a reply
Datguy5 Offline
Senior Member

Posts: 622
Joined: Dec 2011
Reputation: 12
Post: #2
RE: 2 scripts
You need an inventory.hps if you want to combine things.

03-01-2012 04:56 PM
Find all posts by this user Quote this message in a reply
jessehmusic Offline
Senior Member

Posts: 423
Joined: Dec 2011
Reputation: 8
Post: #3
RE: 2 scripts
(03-01-2012 08:07 AM)Saren Wrote:  Hey guys, so, I was wondering how you do 2 things, 1, how to comebine the hammer and chipper, and 2ndly, how to use them on a breakable wall, kinda like the floor in Prison in the main story. Any help appreciated.
here is the hammer to wall



void OnStart()

{
AddUseItemCallback("", "Hammer", "wooden_boards_block", "OpenDoor", true);
}


void OpenDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("wooden_boards_block", false, true);
PlaySoundAtEntity("", "unlock_door", "wooden_boards_block", 0, false);
RemoveItem("Hammer");
SetPropHealth("wooden_boards_block", 0);
}

and here is the wall



void OnStart()

{
AddEntityCollideCallback("armchair_1", "mansionbase_secret_passage_1", "BreakWall", true, 0);

}

void BreakWall(string &in asParent, string &in asChild, string &in alState)
{
SetPropHealth("mansionbase_secret_passage_1", 0);
}

i have it on my "lost" Custom storie it works great!

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
(This post was last modified: 03-01-2012 04:57 PM by jessehmusic.)
03-01-2012 04:56 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #4
RE: 2 scripts
(03-01-2012 04:56 PM)jessehmusic Wrote:  here is the hammer to wall



void OnStart()

{
AddUseItemCallback("", "Hammer", "wooden_boards_block", "OpenDoor", true);
}


void OpenDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("wooden_boards_block", false, true);
PlaySoundAtEntity("", "unlock_door", "wooden_boards_block", 0, false);
RemoveItem("Hammer");
SetPropHealth("wooden_boards_block", 0);
}

and here is the wall



void OnStart()

{
AddEntityCollideCallback("armchair_1", "mansionbase_secret_passage_1", "BreakWall", true, 0);

}

void BreakWall(string &in asParent, string &in asChild, string &in alState)
{
SetPropHealth("mansionbase_secret_passage_1", 0);
}

i have it on my "lost" Custom storie it works great!
Yea I've seen it a couple of times before, thank you for providing thr script man

(This post was last modified: 03-01-2012 09:54 PM by Saren.)
03-01-2012 09:53 PM
Find all posts by this user Quote this message in a reply
jessehmusic Offline
Senior Member

Posts: 423
Joined: Dec 2011
Reputation: 8
Post: #5
RE: 2 scripts
(03-01-2012 09:53 PM)Saren Wrote:  
(03-01-2012 04:56 PM)jessehmusic Wrote:  here is the hammer to wall



void OnStart()

{
AddUseItemCallback("", "Hammer", "wooden_boards_block", "OpenDoor", true);
}


void OpenDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("wooden_boards_block", false, true);
PlaySoundAtEntity("", "unlock_door", "wooden_boards_block", 0, false);
RemoveItem("Hammer");
SetPropHealth("wooden_boards_block", 0);
}

and here is the wall



void OnStart()

{
AddEntityCollideCallback("armchair_1", "mansionbase_secret_passage_1", "BreakWall", true, 0);

}

void BreakWall(string &in asParent, string &in asChild, string &in alState)
{
SetPropHealth("mansionbase_secret_passage_1", 0);
}

i have it on my "lost" Custom storie it works great!
Yea I've seen it a couple of times before, thank you for providing thr script man
No problem Wink was realy hard to learn when i was new Confused If you want more contact add mine skype Smile "wowhasse1"

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
03-02-2012 12:31 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #6
RE: 2 scripts
(03-02-2012 12:31 AM)jessehmusic Wrote:  No problem Wink was realy hard to learn when i was new Confused If you want more contact add mine skype Smile "wowhasse1"
Kewl, I'll do that =)

03-02-2012 07:51 AM
Find all posts by this user Quote this message in a reply
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #7
RE: 2 scripts
(03-01-2012 04:56 PM)Datguy5 Wrote:  You need an inventory.hps if you want to combine things.
Okay, and where do I put this .hps? xD
Excuse me but I've never heard about this file before now... lolol.. Thought it was in map.hps's as well but... nope

03-02-2012 09:41 AM
Find all posts by this user Quote this message in a reply
SilentStriker Offline
Posting Freak

Posts: 939
Joined: Jul 2011
Reputation: 39
Post: #8
RE: 2 scripts
The inventory.hps is places inside your map folder. Look in the inventory.hps that TDD have so you know how to use it Smile and to make it look better when using a hammer on something you can make a hammer animation on the thing you want to hit Smile

03-02-2012 09:45 AM
Find all posts by this user Quote this message in a reply
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #9
RE: 2 scripts
(03-02-2012 09:45 AM)SilentStriker Wrote:  The inventory.hps is places inside your map folder. Look in the inventory.hps that TDD have so you know how to use it Smile and to make it look better when using a hammer on something you can make a hammer animation on the thing you want to hit Smile
You want me to make an animation... REALLY?? Oh well... I guess I can try.. hahaha. Even though I got no idea how you do that... xD
Anyway, thx for info Striker

(This post was last modified: 03-02-2012 09:54 AM by Saren.)
03-02-2012 09:54 AM
Find all posts by this user Quote this message in a reply
Post Reply 




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