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 Help Broken Script
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#2
RE: Broken Script

wow your script is a chaos ^^



Let me rewrite it for you:

First Map:


////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "Monsterdoorkey", "Monsterdoor", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "PlayerCollide", "SpawnMonster", true, 0);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
RemoveItem(asItem);
}

void SpawnMonster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_3", true);
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "RoomTwoArea", "CollideRoomTwo", true, 0);
AddUseItemCallback("", "WaterDoorkey", "WaterDoor", "UsedKeyOnDoor", true);
}

void CollideRoomTwo(string &in asParent, string &in asChild, int alstate)
{
SetSwingDoorClosed("RoomTwoDoor", true, true);
GiveSanityDamage(90 , true);
PlayGuiSound("react_past", 1);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
RemoveItem(asItem);
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

Check so everything is spelled right Smile

(This post was last modified: 04-26-2012, 03:15 PM by SilentStriker.)
04-26-2012, 03:12 PM
Find


Messages In This Thread
Broken Script - by Manbearpig116 - 04-26-2012, 02:39 PM
RE: Broken Script - by SilentStriker - 04-26-2012, 03:12 PM



Users browsing this thread: 2 Guest(s)