RE: Dont understand this - jessehmusic - 01-06-2012
Sure PHP Code: void OnStart()
{ SetEntityConnectionStateChangeCallback("lever", "func_shelf"); SetEntityPlayerInteractCallback("Note_Test3", "ScreenShake", true); AddEntityCollideCallback("armchair_1", "mansionbase_secret_passage_1", "BreakWall", true, 0); AddUseItemCallback("", "Hammer", "Woodenblock", "OpenDoor", true); }
void BreakWall(string &in asParent, string &in asChild, string &in alState) { SetPropHealth("mansionbase_secret_passage_1", 0); }
void func_shelf(string &in asEntity, int alState) { if (alState == 1) { SetMoveObjectState("shelf",1.0f); PlaySoundAtEntity("", "quest_completed.snt", "shelf_move_1", 0, false); } } void StopTimer(string &in asTimer) { StopPlayerLookAt(); } void PickNote(string &in asEntity) { StartPlayerLookAt("closet_1", 5.0f, 5.0f, ""); AddTimer("StopLookAt", 1.5f, "StopTimer"); PlaySoundAtEntity("", "react_breath.snt", "Player", 0.0f, false); }
void ScreenShake(string &in asEntity) { StartScreenShake(0.4, 0.4, 3, 2.6); PlaySoundAtEntity("", "explosion_rock_large.snt", "Player", 0.0f, false); }
void OpenDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("WoodenBlock", false, true); PlaySoundAtEntity("", "unlock_door", "WoodenBlock", 0, false); RemoveItem("Hammer"); }
RE: Dont understand this - SilentStriker - 01-06-2012
(01-06-2012, 08:57 PM)jessehmusic Wrote: Sure PHP Code: void OnStart()
{ SetEntityConnectionStateChangeCallback("lever", "func_shelf"); SetEntityPlayerInteractCallback("Note_Test3", "ScreenShake", true); AddEntityCollideCallback("armchair_1", "mansionbase_secret_passage_1", "BreakWall", true, 0); AddUseItemCallback("", "Hammer", "Woodenblock", "OpenDoor", true); }
void BreakWall(string &in asParent, string &in asChild, string &in alState) { SetPropHealth("mansionbase_secret_passage_1", 0); }
void func_shelf(string &in asEntity, int alState) { if (alState == 1) { SetMoveObjectState("shelf",1.0f); PlaySoundAtEntity("", "quest_completed.snt", "shelf_move_1", 0, false); } } void StopTimer(string &in asTimer) { StopPlayerLookAt(); } void PickNote(string &in asEntity) { StartPlayerLookAt("closet_1", 5.0f, 5.0f, ""); AddTimer("StopLookAt", 1.5f, "StopTimer"); PlaySoundAtEntity("", "react_breath.snt", "Player", 0.0f, false); }
void ScreenShake(string &in asEntity) { StartScreenShake(0.4, 0.4, 3, 2.6); PlaySoundAtEntity("", "explosion_rock_large.snt", "Player", 0.0f, false); }
void OpenDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("WoodenBlock", false, true); PlaySoundAtEntity("", "unlock_door", "WoodenBlock", 0, false); RemoveItem("Hammer"); }
Try change the
AddUseItemCallback("", "Hammer", "Woodenblock", "OpenDoor", true);
to
AddUseItemCallback("", "Hammer", "wooden_boards_block", "OpenDoor", true);
RE: Dont understand this - jessehmusic - 01-06-2012
Then i have to change the name of the block right
RE: Dont understand this - SilentStriker - 01-06-2012
(01-06-2012, 09:03 PM)jessehmusic Wrote: Then i have to change the name of the block right You need to write the entity that is going to used on
RE: Dont understand this - jessehmusic - 01-06-2012
didnt work at all same prob do you gor skype then i can shere screen r maybe send map for you so you see
RE: Dont understand this - SilentStriker - 01-06-2012
(01-06-2012, 09:11 PM)jessehmusic Wrote: didnt work at all same prob do you gor skype then i can shere screen r maybe send map for you so you see I'm trying get the script to work for me. I'll come back to you when im done
RE: Dont understand this - jessehmusic - 01-06-2012
Got the script to make it work but not to make it broken :S
RE: Dont understand this - SilentStriker - 01-06-2012
(01-06-2012, 09:33 PM)jessehmusic Wrote: Got the script to make it work but not to make it broken :S I've got a perfect script for you I can help you if you don't understand what you need to add etc
PHP Code: void OnStart() { AddUseItemCallback("", "Hammer", "Wood_21", "BrakeWood2", false); }
void BrakeWood2(string &in asItem, string &in asEntity) { SetEntityActive("Wood_21", false); SetEntityActive("BrokeWood_2", true); AddPropForce("BrokeWood_2", 0, 300, 100, "world"); //BreakJoint ("BrokeWood_2"); PlaySoundAtEntity("","break_wood.ogg","BrakeWoodArea_2", 0, false); CreateParticleSystemAtEntity("", "ps_dust_impact_vert.ps", "BrakeWoodArea_2",false); RemoveItem("Hammer"); }
RE: Dont understand this - jessehmusic - 01-06-2012
ty btw have seen your mod it is awesome!
RE: Dont understand this - SilentStriker - 01-06-2012
(01-06-2012, 10:06 PM)jessehmusic Wrote: ty btw have seen your mod it is awesome! You got everything working? Yea saw that thanks!
|