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
help with areas and scripting
wargamer Offline
Junior Member

Posts: 2
Threads: 1
Joined: Mar 2012
Reputation: 0
#1
help with areas and scripting

Alright i am new to scripting and this is my first custom story. In my first room, im trying to make a door open as soon as a person walks into a script area right in front of the door.
however im getting these errors:
main (3,1) : INFO : Compiling void OnStart()
main (16,6) : RR : Expected "("

Here is my script so far:

////////////////////////////
// Run first time starting map
void OnStart()
{
//Add the Lantern and 10 Tinderboxes when in Debug mode
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");

for(int i=0;i<10;i++) GiveItemFromFile("potion_oil_large_"+i, "potion_oil_large.ent");
} for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
//Door opens by itself when moving into Trigger_Area1
{
AddEntityCollideCallback("Player", "ScriptArea1", "Collide_Area", true, 1);
}
void Collide_Area(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("prison_1", false, true);
SetSwingDoorDisableAutoClose("prison_1", true);
AddPropImpulse("prison_1", 900.0f, 0.0f, 0.0f, "");
}
}
(This post was last modified: 03-19-2012, 08:53 PM by wargamer.)
03-19-2012, 02:31 AM
Find


Messages In This Thread
help with areas and scripting - by wargamer - 03-19-2012, 02:31 AM
RE: help with areas and scripting - by Apjjm - 03-19-2012, 03:47 AM
RE: help with areas and scripting - by wargamer - 03-19-2012, 08:43 PM



Users browsing this thread: 1 Guest(s)