Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Chipper And Hammer Animation
HoyChampoy Offline
Junior Member

Posts: 43
Threads: 16
Joined: Jun 2012
Reputation: 0
#6
RE: Chipper And Hammer Animation

(07-15-2012, 11:04 PM)Ongka Wrote: Good to know that it worked! Smile
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 Smile

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);
}
}
07-16-2012, 09:48 AM
Find


Messages In This Thread
Chipper And Hammer Animation - by HoyChampoy - 07-15-2012, 11:34 AM
RE: Chipper And Hammer Animation - by i3670 - 07-15-2012, 12:26 PM
RE: Chipper And Hammer Animation - by Ongka - 07-15-2012, 02:19 PM
RE: Chipper And Hammer Animation - by HoyChampoy - 07-15-2012, 10:06 PM
RE: Chipper And Hammer Animation - by Ongka - 07-15-2012, 11:04 PM
RE: Chipper And Hammer Animation - by HoyChampoy - 07-16-2012, 09:48 AM



Users browsing this thread: 1 Guest(s)