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
oscar1007 Offline
Member

Posts: 64
Threads: 24
Joined: Oct 2011
Reputation: 0
#9
RE: Scripts not working

(01-12-2012, 09:54 PM)Bozcovich Wrote: 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.

Instead of having this:
SetSwingDoorLocked(door, false, true);

Try this:
SetSwingDoorLocked("das door", false);

Or if its a level door:
SetLevelDoorLocked("das door", false);


peace out. hope it works!

Money can't buy you happiness. But I rather cry in my ferrari.

PROJECT:
http://www.moddb.com/mods/oscar1007
(This post was last modified: 01-13-2012, 11:14 PM by oscar1007.)
01-13-2012, 11:13 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: 4 Guest(s)