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
Script Help destorying a padlock with a hammer
zombiehacker595 Offline
Member

Posts: 141
Threads: 51
Joined: Mar 2012
Reputation: 3
#3
RE: destorying a padlock with a hammer

ok that activated the broken padlock and it fell off but didnt destory the original padlock
void OnStart()
{
AddUseItemCallback("OpenDoor", "key_study_1", "level_wood_1", "UnlockLevelDoor", true);
AddUseItemCallback("", "stone_hammer_1", "padlock_1", "unlock_prison_section_1", true);
}
void unlock_prison_section_1(string &in asItem, string &in asEntity)
{
SetPropHealth("padlock_1", 0.0f);
SetEntityActive("padlock_broken_1",true);
RemoveItem("stone_hammer_1");
SetEntityActive("padlock_1", false);
}

void OnEnter()
{
}
i just had to add set entity active padlock_1 false and it worked thanks
(This post was last modified: 04-01-2012, 06:24 AM by zombiehacker595.)
04-01-2012, 06:22 AM
Find


Messages In This Thread
RE: destorying a padlock with a hammer - by zombiehacker595 - 04-01-2012, 06:22 AM



Users browsing this thread: 3 Guest(s)