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
Script Help AddUseItem Callback Not Working
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#5
RE: AddUseItem Callback Not Working

(04-07-2015, 07:14 AM)FlawlessHappiness Wrote:
(04-06-2015, 12:29 PM)Neelke Wrote: You're missing the collide callback for the crowbar and the area.

AddEntityCollideCallback("Crowbar", "NAME_OF_AREA", "BreakDoor", true, 1);

It's an AddUseItemCallback, not an AddEntityCollideCallback.

OT:
I can't see any problems. As Lange said, check your names again. For capitals and numbers.

Then what's this for?

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");
}

If you check the Guest Room in the main game, they use a collide function for being able to determine where the crowbar is located. If this script does not require collide function, then why is this function even here? This script require both an AddUseItemCallback and an AddEntityCollideCallback.

Derp.
(This post was last modified: 04-07-2015, 07:54 AM by Neelke.)
04-07-2015, 07:50 AM
Find


Messages In This Thread
RE: AddUseItem Callback Not Working - by DnALANGE - 04-06-2015, 10:30 AM
RE: AddUseItem Callback Not Working - by Neelke - 04-06-2015, 12:29 PM
RE: AddUseItem Callback Not Working - by Neelke - 04-07-2015, 07:50 AM
RE: AddUseItem Callback Not Working - by Neelke - 04-07-2015, 08:12 AM
RE: AddUseItem Callback Not Working - by Mudbill - 04-07-2015, 09:30 AM



Users browsing this thread: 2 Guest(s)