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
Script Help destorying an entity
Author Message
zombiehacker595 Offline
Member

Posts: 141
Joined: Mar 2012
Reputation: 3
Post: #1
destorying an entity
how would i say destory a padlock by using acid on it or using the hammer and chipper?
04-01-2012 04:53 AM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #2
RE: destorying an entity
void OnStart()
{
AddUseItemCallback("", "acid", "padlock_01", BreakPadlock, true);
}


void BreakPadlock(string &in asItem, string &in asEntity)
{
SetPropHealth("padlock_01", 0.0f);
}




[font=monospace, serif]Change names accordingly [/font]

04-01-2012 04:58 AM
Find all posts by this user Quote this message in a reply
zombiehacker595 Offline
Member

Posts: 141
Joined: Mar 2012
Reputation: 3
Post: #3
RE: destorying an entity
(04-01-2012 04:58 AM)flamez3 Wrote:  void OnStart()
{
AddUseItemCallback("", "acid", "padlock_01", BreakPadlock, true);
}


void BreakPadlock(string &in asItem, string &in asEntity)
{
SetPropHealth("padlock_01", 0.0f);
}




[font=monospace, serif]Change names accordingly [/font]
AddUseItemCallback("", "glass_container_mix_done_1", "padlock_1", "BreakPadlock", true);
}
void BreakPadlock(string &in asItem, string &in asEntity)
{
SetPropHealth("padlock_1", 0.0f);
}
cant use item this way? names in level editor are def the same
04-01-2012 05:25 AM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #4
RE: destorying an entity
Do you have .map_cache?

04-01-2012 06:12 AM
Find all posts by this user Quote this message in a reply
zombiehacker595 Offline
Member

Posts: 141
Joined: Mar 2012
Reputation: 3
Post: #5
RE: destorying an entity
(04-01-2012 06:12 AM)flamez3 Wrote:  Do you have .map_cache?

yea dont worry i figured out how to do it
04-01-2012 08:49 AM
Find all posts by this user Quote this message in a reply
Post Reply 




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