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
Scripts not working
Bozcovich Offline
Junior Member

Posts: 11
Threads: 2
Joined: Jan 2012
Reputation: 0
#1
Scripts not working

Hey, ive recently started making a custom story (my first). I cant get the scripts to start working, i have a script to open a door with a key, but it doesnt work, and i have a script that gives the player a lantern in the begginning and that doesnt work either. Help please?


Here is the scripts:

Door:
void OnStart()

{
AddUseItemCallback("", "SUPER HAX KEY THAT SUCKS", "das door", "hax", true);
}

void hax(string &in item, string &in door)
{
SetSwingDoorLocked(door, false, true);
PlaySoundAtEntity("", "unlock_door", door, 0, false);
RemoveItem(item);

}




void OnEnter()
{

}


void OnLeave()
{

}


Lantern:

//===========================================

void OnStart()
{
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
SetPlayerLampOil(100.0f);

for(int i = 0;i < 10;i++)
{
GiveItemFromFile("tinderbox", "tinderbox.ent");
}
}
}


void OnEnter()
{
}


void OnLeave()
{
}
And i cant see the maps when i am in the folder if that is a problem. I have named the .hps file the same as the map.
(This post was last modified: 01-17-2012, 01:43 AM by Bozcovich.)
01-12-2012, 09:54 PM
Find


Messages In This Thread
Scripts not working - by Bozcovich - 01-12-2012, 09:54 PM
RE: Scripts not working - by Statyk - 01-13-2012, 12:23 AM
RE: Scripts not working - by flamez3 - 01-13-2012, 01:29 AM
RE: Scripts not working - by Bozcovich - 01-13-2012, 09:22 PM
RE: Scripts not working - by Unearthlybrutal - 01-13-2012, 10:34 PM
RE: Scripts not working - by Bozcovich - 01-13-2012, 10:53 PM
RE: Scripts not working - by Unearthlybrutal - 01-13-2012, 10:58 PM
RE: Scripts not working - by Bozcovich - 01-13-2012, 11:03 PM
RE: Scripts not working - by oscar1007 - 01-13-2012, 11:13 PM
RE: Scripts not working - by Bozcovich - 01-13-2012, 11:26 PM
RE: Scripts not working - by Unearthlybrutal - 01-14-2012, 12:13 PM



Users browsing this thread: 1 Guest(s)