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 no effect when destroy door
DragonRuins Offline
Junior Member

Posts: 19
Threads: 4
Joined: Mar 2012
Reputation: 1
#6
RE: crowbar no effect when destroy door

Take a look at your TimerSwitchShovel Function.
void TimerSwitchShovel(string &in asTimer)
{
PlaySoundAtEntity("","puzzle_place_jar.snt", "", 0, false);
SetEntityActive("crowbar_joint_1", true);
}


PlaySoundAtEntity also requires an entity to be played at (this could also be a script area, or a normal entity). So what you need to do is this:


void TimerSwitchShovel(string &in asTimer)
{
PlaySoundAtEntity("","puzzle_place_jar.snt", "PUTENTITY NAME HERE", 0, false);
SetEntityActive("crowbar_joint_1", true);
}


So, for example, whenever I use crowbars I have that sound played at the crowbar being used. So the code that I have for mine is:


void TimerSwitchShovel(string &in asTimer)
{
PlaySoundAtEntity("", "puzzle_place_jar.snt", "crowbar_joint_1", 0, false);
SetEntityActive("crowbar_joint_1", true);
}


Also, here is your code for the CollideAreaBreakDoor:
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_no_grav_1", false, true);
AddPropImpulse("castle_no_grav_1", 0, 0, -50, "World");
SetSwingDoorDisableAutoClose("castle_no_grav_1", true);
SetSwingDoorClosed("castle_no_grav_1", false, false);
SetMoveObjectState("castle_no_grav_1", 1);
PlaySoundAtEntity("","break_wood_metal", "AreaBreakEffect", 0, false);
CreateParticleSystemAtEntity("", "ps_hit_wood", "AreaBreakEffect", false);
SetEntityActive("crowbar_joint_1", false);
SetLocalVarInt("Door", 1);
}

Now, You do actually have an entity defined for the sounds and PS effects. Have you created a script area with the name AreaBreakEffect and put it somewhere like the doorhandle? If not, you should try that and see if it works.

[Image: 76561198012068277.png]
06-24-2012, 02:11 AM
Website Find


Messages In This Thread
crowbar no effect when destroy door - by Hartmann - 06-21-2012, 08:34 PM
RE: crowbar no effect when destroy door - by DragonRuins - 06-24-2012, 02:11 AM



Users browsing this thread: 2 Guest(s)