jessehmusic
Senior Member
Posts: 423
Threads: 102
Joined: Dec 2011
Reputation:
8
|
RE: Dont understand this
Sure 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"); }
|
|
01-06-2012, 08:57 PM |
|
SilentStriker
Posting Freak
Posts: 950
Threads: 26
Joined: Jul 2011
Reputation:
43
|
RE: Dont understand this
(01-06-2012, 08:57 PM)jessehmusic Wrote: Sure 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);
|
|
01-06-2012, 09:02 PM |
|
jessehmusic
Senior Member
Posts: 423
Threads: 102
Joined: Dec 2011
Reputation:
8
|
RE: Dont understand this
Then i have to change the name of the block right
|
|
01-06-2012, 09:03 PM |
|
SilentStriker
Posting Freak
Posts: 950
Threads: 26
Joined: Jul 2011
Reputation:
43
|
RE: Dont understand this
(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
|
|
01-06-2012, 09:04 PM |
|
jessehmusic
Senior Member
Posts: 423
Threads: 102
Joined: Dec 2011
Reputation:
8
|
RE: Dont understand this
didnt work at all same prob do you gor skype then i can shere screen r maybe send map for you so you see
|
|
01-06-2012, 09:11 PM |
|
SilentStriker
Posting Freak
Posts: 950
Threads: 26
Joined: Jul 2011
Reputation:
43
|
RE: Dont understand this
(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
|
|
01-06-2012, 09:14 PM |
|
jessehmusic
Senior Member
Posts: 423
Threads: 102
Joined: Dec 2011
Reputation:
8
|
RE: Dont understand this
Got the script to make it work but not to make it broken :S
|
|
01-06-2012, 09:33 PM |
|
SilentStriker
Posting Freak
Posts: 950
Threads: 26
Joined: Jul 2011
Reputation:
43
|
RE: Dont understand this
(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
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"); }
|
|
01-06-2012, 09:38 PM |
|
jessehmusic
Senior Member
Posts: 423
Threads: 102
Joined: Dec 2011
Reputation:
8
|
RE: Dont understand this
ty btw have seen your mod it is awesome!
|
|
01-06-2012, 10:06 PM |
|
SilentStriker
Posting Freak
Posts: 950
Threads: 26
Joined: Jul 2011
Reputation:
43
|
|
01-06-2012, 10:08 PM |
|
|