(07-15-2012, 11:04 PM)Ongka Wrote: Good to know that it worked!
What was it you had to fix in order to make it work?
changed some names thats all. I also added some stuff to the timers
heres the whole script
void UseHCOnBricks(string &in asItem, string &in asEntity)
{
SetEntityActive("stone_chipper_move_x_1",true);
SetEntityActive("stone_hammer_move_1",true);
SetEntityActive("padlock_rusty_1", true);
PlaySoundAtEntity("cumble1", "15_rock_break", "AreaHammer", 0, false);
SetMoveObjectState("stone_hammer_move_1", 0.0f);
SetMoveObjectState("stone_chipper_move_x_1", 0.0f);
AddTimer("1", 0.6f, "TimerHammer");
AddTimer("2", 1.2f, "TimerHammer");
AddTimer("3", 1.4f, "TimerHammer");
AddTimer("4", 2.0f, "TimerHammer");
AddTimer("5", 2.6f, "TimerHammer");
AddTimer("6", 2.8f, "TimerHammer");
AddTimer("7", 3.4f, "TimerHammer");
AddTimer("8", 4.0f, "TimerHammer");
AddTimer("9", 4.2f, "TimerHammer");
AddTimer("10", 4.250f, "TimerHammer");
AddTimer("11", 4.64f, "TimerHammer");
}
void TimerHammer(string &in asTimer)
{
if(asTimer == "1"){
SetEntityInteractionDisabled("padlock_rusty_1", true);
SetPropStaticPhysics("padlock_rusty_1", true);
SetMoveObjectState("stone_hammer_move_1", 0.25f);
SetMoveObjectState("stone_chipper_move_x_1", 0.0f);
}
if(asTimer == "2"){
SetMoveObjectState("stone_hammer_move_1", 0.0f);
}
if(asTimer == "3"){
SetMoveObjectState("stone_chipper_move_x_1", 1.0f);
PlaySoundAtEntity("bang", "hit_wood", "Player", 0, false);
PlaySoundAtEntity("hammer", "15_hammer", "Player", 0, false);
}
if(asTimer == "4"){
SetMoveObjectState("stone_hammer_move_1", 0.25f);
SetMoveObjectState("stone_chipper_move_x_1", 0.0f);
}
if(asTimer == "5"){
SetMoveObjectState("stone_hammer_move_1", 0.0f);
}
if(asTimer == "6"){
SetMoveObjectState("stone_chipper_move_x_1", 1.0f);
PlaySoundAtEntity("bang", "hit_wood", "Player", 0, false);
PlaySoundAtEntity("hammer", "15_hammer", "Player", 0, false);
}
if(asTimer == "7"){
SetMoveObjectState("stone_hammer_move_1", 0.25f);
SetMoveObjectState("stone_chipper_move_x_1", 0.0f);
}
if(asTimer == "8"){
SetMoveObjectState("stone_hammer_move_1", 0.0f);
}
if(asTimer == "9"){
SetMoveObjectState("stone_chipper_move_x_1", 1.0f);
PlaySoundAtEntity("bang", "hit_wood", "Player", 0, false);
PlaySoundAtEntity("hammer", "15_hammer", "Player", 0, false);
CreateParticleSystemAtEntity("dust", "ps_hit_rock.ps", "AreaHammerOnDoor", false);
SetLocalVarInt("UsedHC", 1);
}
if(asTimer == "10"){
SetSwingDoorLocked("prison_section_1", false, true);
SetEntityActive("padlock_rusty_1", false);
SetEntityActive("padlock_broken_1", true);
PlaySoundAtEntity("", "pickaxe_hit", "prison_section_1", 0, false);
AddPlayerSanity(25);
RemoveItem("stone_hammer_chipper");
}
if(asTimer == "11"){
SetEntityActive("stone_chipper_move_x_1",false);
SetEntityActive("stone_hammer_move_1",false);
}
}