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

Posts: 141
Threads: 51
Joined: Mar 2012
Reputation: 3
#1
script help

void Onstart()
{
AddUseItemCallback("", "stone_hammer_chipper", "wooden_boards_block_1", "DestoryBlockage", true);
SetEntityPlayerInteractCallback("key_laboratory_1", "Scare", true);
AddEntityCollideCallback("Player", "Message_1", "Message1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "OpenDoor", true, 1);
AddUseItemCallback("OpenDoor", "key_laboratory_2", "level_wood_3", "UnlockLevelDoor", true);
}

void DestoryBlockage(string &in asItem, string &in asEntity)
{
AddPlayerSanity(25);
SetPropHealth("wooden_boards_block_1", 0.0f);
SetEntityActive("wooden_boards_block_broken_1",true);
RemoveItem("stone_hammer_chipper");
SetEntityActive("wooden_boards_block_1", false);
PlaySoundAtEntity("","break_wood_metal.snt", "ScriptArea_1", 0, false);
}

void UnlockLevelDoor(string &in item, string &in entity)
{
SetLevelDoorLocked(entity, false);
RemoveItem("key_laboratory_2");
PlaySoundAtEntity("", "unlock_door", "player", 0, false);
}

void Message1(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "PopupM", 0);
}

void Scare(string &in Entity)
{
SetEntityActive("armour_nice_complete_4", true);
SetEntityActive("armour_nice_complete_5", true);
SetEntityActive("armour_nice_complete_6", true);
}

void OnEnter()
{

}

void Onleave()
{

}

this whole room doesnt work i cant figure it out?
(This post was last modified: 04-13-2012, 11:29 AM by zombiehacker595.)
04-13-2012, 10:10 AM
Find
ClayPigeon Offline
Member

Posts: 214
Threads: 13
Joined: Mar 2012
Reputation: 8
#2
RE: script help

You can remove the item when the player enters the map and then give it to him again using:

void GiveItem(string& asName, string& asType, string& asSubTypeName, string& asImageName, float afAmount);
void RemoveItem(string& asName);
(This post was last modified: 04-13-2012, 10:21 AM by ClayPigeon.)
04-13-2012, 10:20 AM
Find
zombiehacker595 Offline
Member

Posts: 141
Threads: 51
Joined: Mar 2012
Reputation: 3
#3
RE: script help

(04-13-2012, 10:20 AM)ClayPigeon Wrote: You can remove the item when the player enters the map and then give it to him again using:

void GiveItem(string& asName, string& asType, string& asSubTypeName, string& asImageName, float afAmount);
void RemoveItem(string& asName);


yea i figured out the scripting was fine the whole room is actually screwed? none of the scripts in the room work for some weird reason?
04-13-2012, 10:24 AM
Find
ClayPigeon Offline
Member

Posts: 214
Threads: 13
Joined: Mar 2012
Reputation: 8
#4
RE: script help

Make sure the .hps file has the exact same name of the .map file of the room.
04-13-2012, 10:28 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#5
RE: script help

OnStart != Onstart.

Tutorials: From Noob to Pro
04-13-2012, 10:35 AM
Website Find
zombiehacker595 Offline
Member

Posts: 141
Threads: 51
Joined: Mar 2012
Reputation: 3
#6
RE: script help

(04-13-2012, 10:28 AM)ClayPigeon Wrote: Make sure the .hps file has the exact same name of the .map file of the room.


nah i figured it out i feel pretty stupid it was suposed to

be void OnStart

not void Onstart

geez i am so releived
04-13-2012, 10:35 AM
Find




Users browsing this thread: 1 Guest(s)