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
Crowbar won't work on door! help
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#5
RE: Crowbar won't work on door! help

(12-23-2013, 02:05 PM)Romulator Wrote: No no, put them into an OnStart().

Like this:
PHP Code: (Select All)
void OnStart()
{
AddUseItemCallback("""Crowbar""Door""UseCrowbarOnDoor"true);
AddEntityCollideCallback("Joint""AreaBreak""BreakDoor"true1);


Put that anywhere in your code, and delete those two lines from the timer.

Look at this topic, and actually read it. Although it is tough stuff, you need to understand what you are scripting. http://wiki.frictionalgames.com/hpl2/tut...iferorange
still didn't work :/ still gets me cannot use item this way! this is the updated hps

void OnStart()
{
AddUseItemCallback("", "Crowbar", "Door", "UseCrowbarOnDoor", true);
AddEntityCollideCallback("Joint", "AreaBreak", "BreakDoor", true, 1);
}


void PickupKey(string &in asEntity, string &in asItem)

{

AddQuest("quest1", "TestQuest");
AddTimer("", 0.5f, "NeverCalledTimer"); //Change the time as long as you want

AddUseItemCallback("", "MasterBedroomKey", "bedroomdoor","UseMasterBedroomKey", true);

AddEntityCollideCallback("Player", "AreaMemento", "EventQuest", true, 1);

}



void UseMasterBedroomKey(string &in asItem, string &in asEntity)

{

SetMessage("message", "message1", 3);

}



void NeverCalledTimer(string &in asTimer)

{

AddTimer("", 1.1f, "TimerDoorStart");

}



void UseCrowbarOnDoor(string &in asItem, string &in asEntity)

{

RemoveItem(asItem);

PlaySoundAtEntity("", "player_crouch.snt", "Player", 0.05, false);

AddTimer(asEntity, 0.2, "TimerPlaceCrowbar");

}



void TimerPlaceCrowbar(string &in asTimer)

{

SetEntityActive("Joint", true);

PlaySoundAtEntity("", "puzzle_place_jar.snt", asTimer, 0, false);

}



void BreakDoor(string &in asParent, string &in asChild, int alState)

{

SetEntityActive("Joint", false);

SetEntityActive("Broken", true);


SetSwingDoorLocked("Door", false, false);

SetSwingDoorClosed("Door", false, false);

SetSwingDoorDisableAutoClose("Door", true);


AddPropImpulse("Door", 0, 0, 3, "world");


CreateParticleSystemAtEntity("", "ps_hit_wood.ps", "Areaeffect", false);

PlaySoundAtEntity("", "break_wood_metal", "Areaeffect", 0, false);


GiveSanityBoostSmall();


PlayMusic("10_puzzle01.ogg", false, 0.7, 0.1, 10, false);


AddTimer("", 0.1, "TimerPushDoor");

}



void TimerPushDoor(string &in asTimer)

{

AddPropImpulse("Door", -4, 2, 1, "world");

AddTimer("", 1.1, "TimerDoorCanClose");

}

void TimerDoorCanClose(string &in asTimer)

{
SetSwingDoorDisableAutoClose("Door", false);

}

//void touchdoor(string &in asEntity, string &in type) //Where is it called at? Ignoring it for now.

//{

//AddQuest("door", "touchdoor");

//}

void EventQuest(string &in asParent, string &in asChild, int alState)

{

AddQuest("door", "touchdoor");

}
12-23-2013, 02:15 PM
Find


Messages In This Thread
RE: Crowbar won't work on door! help - by Radical Batz - 12-23-2013, 02:15 PM
RE: Crowbar won't work on door! help - by Froge - 12-23-2013, 06:34 PM
RE: Crowbar won't work on door! help - by daortir - 12-25-2013, 04:02 PM
RE: Crowbar won't work on door! help - by daortir - 12-25-2013, 07:12 PM
RE: Crowbar won't work on door! help - by daortir - 12-25-2013, 10:22 PM



Users browsing this thread: 1 Guest(s)