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:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting noob, help needed!
willochill Offline
Member

Posts: 73
Threads: 27
Joined: Apr 2011
Reputation: 0
#1
Scripting noob, help needed!

I just starting scripting a level i made and in this level there is a bone saw (named bone_saw_2) in one room, and another room is blocked off with wooden boards. basically this is what i want to happen: when you use the saw with the boards the boards fall apart, and a grunt in the blocked off room awakens. so i have a set of inactive broken wooden boards (right near the intact boards) which i want to activate, and the intact boards will be deactivated, to create the illusion of the boards breaking. the grunt in the room is inactive and i want to activate it as well once the saw hits the intact boards. i scripted this but when i test it in the map it's still not working. i copied/pasted the script i wrote for the level below. please tell me what i'm doing wrong here, very confused!
(P.S. to have a script .hps file correspond to a certain map, do you just need to name them the same thing, or is it more complicated than that? also, i have all the maps im testing and their scripts (or at least this one i wrote) in a folder in the "maps" folder in common/amnesia tdd. should they be somewhere else for the script to correspond to it?)

void OnStart ()
{
AddEntityCollideCallback("bone_saw_2", "wooden_boards_block_1", "SawGruntAlert", true, 1);
}

void SawGruntAlert(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("wooden_boards_block_1", false);
SetEntityActive("wooden_boards_block_broken_1", true);
SetEntityActive("servant_grunt_1", true);
}
05-22-2011, 04:45 AM
Find


Messages In This Thread
Scripting noob, help needed! - by willochill - 05-22-2011, 04:45 AM
RE: Scripting noob, help needed! - by Kyle - 05-22-2011, 12:15 PM
RE: Scripting noob, help needed! - by Karai16 - 05-22-2011, 02:16 PM
RE: Scripting noob, help needed! - by Kyle - 05-22-2011, 02:26 PM
RE: Scripting noob, help needed! - by willochill - 05-26-2011, 04:19 AM



Users browsing this thread: 1 Guest(s)