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
Trying to script
Melaara Offline
Junior Member

Posts: 19
Threads: 2
Joined: Apr 2014
Reputation: 1
#1
Trying to script

Hi there, everybody.

I'm new to the forum and also to scripting in the game. I hope that someone might explain to me how to script a little better. xD First of all I would like that someone corrects my hps file. There's no error but some of the things just don't work. Right now my locked door won't open (when I try to use the key it says 'Item cannot be used this way') and my monster won't spawn. It might be that I placed some things wrong, because I just don't know any better. ^^" I hope anybody can help me.

hps file:




////////////////////////////
// Run first time starting map
void OnStart()

{
AddUseItemCallback("", "key_1", "mansion_1", "KeyOnDoor", true);
AddEntityCollideCallback("Player", "scr_enemy1", "MonsterFunction", true, 1);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0.001, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "");
SetEntityActive("servant_grunt_1", true);
}
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("key_1");
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)

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

}

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

}
(This post was last modified: 04-24-2014, 03:35 PM by Melaara.)
04-24-2014, 03:30 PM
Find


Messages In This Thread
Trying to script - by Melaara - 04-24-2014, 03:30 PM
RE: Trying to script - by PutraenusAlivius - 04-24-2014, 03:36 PM
RE: Trying to script - by Mudbill - 04-24-2014, 04:34 PM
RE: Trying to script - by Melaara - 04-24-2014, 05:36 PM
RE: Trying to script - by FlawlessHappiness - 04-24-2014, 06:19 PM
RE: Trying to script - by Melaara - 04-24-2014, 07:18 PM
RE: Trying to script - by Mudbill - 04-24-2014, 08:07 PM
RE: Trying to script - by Melaara - 04-24-2014, 11:26 PM



Users browsing this thread: 1 Guest(s)