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
[Solved] Using Boxes To Trigger Script?
Strembitsky Offline
Senior Member

Posts: 254
Threads: 37
Joined: Feb 2012
Reputation: 3
#1
[Solved] Using Boxes To Trigger Script?

Here is my code:

void OnStart()
{
    AddEntityCollideCallback("storage_box_1", "Throw2", "Barricade", true, 1);
    PlayMusic("02_amb_strange.ogg", true, 1, 0, 5, true);
}
void Barricade(string &in asParent, string &in asChild, int alState)
{
    AddPropForce("barrel01_1", 0, 2, 10, "World");
    AddPropForce("barrel01_2", 0, 2, 10, "World");
    AddPropForce("barrel01_3", 0, 2, 10, "World");
    AddPropForce("storage_box_wood02_moveable", 0, 2, 10, "World");
    AddPlayerSanity(25);
    PlaySoundAtEntity("DaughterRelief.ogg", "DaughterRelief.snt", "Player", 0, false);
}


Long story short, it doesn't work. Every entity is named correctly. Basically, this is making it so that when the storage box enters the area of "Throw2", it triggers the script. It doesn't work.

The Nightmares v1.0 - Dreadful Fires WIP
(This post was last modified: 02-11-2012, 07:16 AM by Strembitsky.)
02-11-2012, 06:54 AM
Find


Messages In This Thread
[Solved] Using Boxes To Trigger Script? - by Strembitsky - 02-11-2012, 06:54 AM
RE: Using Boxes To Trigger Script? - by flamez3 - 02-11-2012, 07:01 AM
RE: Using Boxes To Trigger Script? - by palistov - 02-11-2012, 07:03 AM
RE: Using Boxes To Trigger Script? - by palistov - 02-11-2012, 07:12 AM
RE: Using Boxes To Trigger Script? - by palistov - 02-11-2012, 07:17 AM



Users browsing this thread: 1 Guest(s)