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
Script is just... broken?
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#1
Script is just... broken?

I tried getting these two things in it to work, but it just seems broken. And by the way, I was attempting to replace a "needle" for a "key". I worked with both of these scripts on my other custom story and it work perfectly. Also for some reason, it won't set the lamp oil to 0... Sad

The entities in my game are: CastleDoor, CastleDoor2, and Needle.

Code:

void Onstart()
{
AddUseItemCallback("" , "Needle" , "CastleDoor2" , "UsedNeedleOnDoor" , false);
AddEntityCollideCallback("Player" , "ScriptArea_1" , "Collide01" , true , 1);
SetPlayerLampOil(0);
}
void Collide01(string &in asParent , string &in asChild , int alState)
{
SetSwingDoorClosed("CastleDoor" , true , true);
GiveSanityDamage(10 , true);
}
void UsedNeedleOnDoor(string &in asItem , string &in asEntity)
{
PlaySoundAtEntity("UnlockSound" , "unlock_door.snt" , asEntity , 0.0f , false);
SetSwingDoorLocked(asEntity , false , true);
SetLevelDoorLocked(asEntity , false);
}
void OnEnter()
{
}
void OnLeave()
{
}

Code:

<LANGUAGE>
<RESOURCES>
</RESOURCES>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">You awaken in a castle, not knowing of where you are. Some dark presence is following you, yet you cannot stop it.[br][br]You are alone...</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_Needle">Sewing Needle</Entry>
<Entry Name="ItemDesc_Needle">A simple needle that could be used to pick a lock.</Entry>
</CATEGORY>
</LANGUAGE>

10-15-2010, 02:02 AM
Find


Messages In This Thread
Script is just... broken? - by Kyle - 10-15-2010, 02:02 AM
RE: Script is just... broken? - by DamnNoHtml - 10-15-2010, 06:24 AM
RE: Script is just... broken? - by Kyle - 10-15-2010, 11:12 AM
RE: Script is just... broken? - by SLi78 - 10-15-2010, 05:11 PM
RE: Script is just... broken? - by Chilton - 10-15-2010, 05:52 PM
RE: Script is just... broken? - by Entih - 10-15-2010, 06:15 PM
RE: Script is just... broken? - by Kyle - 10-15-2010, 11:44 PM
RE: Script is just... broken? - by Entih - 10-16-2010, 02:37 AM
RE: Script is just... broken? - by Kyle - 10-16-2010, 02:48 AM
RE: Script is just... broken? - by Entih - 10-16-2010, 03:08 AM
RE: Script is just... broken? - by Kyle - 10-16-2010, 03:48 PM
RE: Script is just... broken? - by Entih - 10-16-2010, 05:58 PM
RE: Script is just... broken? - by Kyle - 10-17-2010, 01:40 AM
RE: Script is just... broken? - by Entih - 10-17-2010, 01:43 AM
RE: Script is just... broken? - by Kyle - 10-17-2010, 01:58 AM
RE: Script is just... broken? - by Equil - 10-17-2010, 02:04 AM
RE: Script is just... broken? - by Kyle - 10-17-2010, 03:02 AM



Users browsing this thread: 1 Guest(s)