The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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 ON DOOR HELP
megsb927 Offline
Junior Member

Posts: 30
Threads: 10
Joined: Feb 2013
Reputation: 0
#1
Rainbow  CROWBAR ON DOOR HELP

ok so I followed the frictional games wiki tutorial and I checked my script a bunch of times and it all looks fine and the script areas are named the same as in the tutorial. Script area 1 tall and skinny next to door, script area 2 short and chubby on ground like in the pictures. The problem is when I try to open the door, I click the crowbar to the door, and then the crowbar just disappears, and the crowbar joint doesn't appear so that I can pull it and open the door. I seriously don't know what the problem is.
main crowbar to open door: crowbar_1
joint: crowbar_joint_1
door using crowbar on: castle_1
The script areas are the same as tutorial
SCRIPT**:
void OnStart()
{
AddUseItemCallback("", "Key5", "castle_3", "UsedKeyOnDoor3", true);
AddUseItemCallback("", "crowbar_1", "castle_1", "UsedCrowbarOnDoor", true);
AddEntityCollideCallback("crowbar_joint_1", "ScriptArea_1", "CollideAreaBreakDoor", true, 1);
}
void UsedKeyOnDoor3(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_3", false, false);
PlaySoundAtEntity("", "unlock_door", "castle_3", 0, false);
RemoveItem("Key5");
}
void UsedCrowbarOnDoor(string &in asItem, string &in asEntity)
{
AddTimer("", 0.2, "TimerSwitchShovel");
RemoveItem("crowbar_1");
}
void TimerSwitchShovel(string &in asTimer)
{
AddTimer("", 0.2, "TimerSwitchShovel");
RemoveItem("crowbar_1");
}

void CollideAreaBreakDoor(string &in asParent, string &in asChild, int alState)
{
AddPlayerSanity(25);
PlayMusic("10_puzzle01.ogg", false, 0.7, 0.1, 10, false);
SetSwingDoorLocked("castle_1", false, true);
AddPropImpulse("castle_1", 0, 0, -50, "World");
SetSwingDoorDisableAutoClose("castle_1", true);
SetSwingDoorClosed("castle_1", false, false);
SetMoveObjectState("castle_1", 1);
PlaySoundAtEntity("","break_wood_metal", "AreaBreakEffect", 0, false);
CreateParticleSystemAtEntity("", "ps_hit_wood", "AreaBreakEffect", false);
SetEntityActive("crowbar_joint_1", false);
SetLocalVarInt("Door", 1);
}

void UsedKeyOnDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_3", false, false);
PlaySoundAtEntity("", "unlock_door", "castle_2", 0, false);
RemoveItem("Key5");
}

void UsedKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_2", false, false);
PlaySoundAtEntity("", "unlock_door", "castle_2", 0, false);
RemoveItem("Key5");
}
void OnEnter()
{

}

void OnLeave()
{

}
04-13-2013, 02:55 AM
Find


Messages In This Thread
CROWBAR ON DOOR HELP - by megsb927 - 04-13-2013, 02:55 AM
RE: CROWBAR ON DOOR HELP - by PutraenusAlivius - 04-13-2013, 04:22 AM
RE: CROWBAR ON DOOR HELP - by Romulator - 04-13-2013, 04:25 AM



Users browsing this thread: 1 Guest(s)