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
daortir Offline
Senior Member

Posts: 422
Threads: 9
Joined: Sep 2013
Reputation: 18
#11
RE: Script help

Did you try removing script lines one by one to see where your problem is ? That's how I do it usually. If nothing works, you probably did something wrong with your files.

12-13-2013, 01:11 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#12
RE: Script help

PHP Code: (Select All)
//The code below was entered by me :P You dont need to copy this line, nor the next.
//Any errors I could find have a comment next to them :)

void OnEnter()
{
AddEntityCallback("Player""livingkey""monsterspawn"true1);
PlayMusic("amb_soft_mood.ogg"true10.1f0true);        //missing .ogg extension
AutoSave();
}

void monsterspawn(string &in asParentstring &in asChildint alState)   //missing callback parameters
{
SetEntityActive("tehmonster",true);
AddEnemyPatrolNode("tehmonster","PathnodeArea8",2,"");
AddEnemyPatrolNode("tehmonster","PathnodeArea11",6,"");
AutoSave();                            //missing brackets


Try that :3

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 12-13-2013, 03:13 PM by Romulator.)
12-13-2013, 03:09 PM
Find
ExpectedIdentifier Offline
Member

Posts: 234
Threads: 10
Joined: Sep 2012
Reputation: 11
#13
RE: Script help

Not on a pc at the moment but an easier way would be to use the property on the key in the editor that automatically creates a on interact callback. I'm assuming you're trying to make something happen when the player picks up a key. If you wana do it the way you're doing it now it's SetEntityPlayerInteractCallback("livingkey", "monsterspawn", true); Can't just be making up callbacks now :-)

Also, your monsterspawn function has no parameters, it should be void monsterspawn(string &in asEntity)

Closure ModDB page:

[Image: 16LO8Sx]
(This post was last modified: 12-15-2013, 05:55 AM by ExpectedIdentifier.)
12-15-2013, 05:50 AM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#14
RE: Script help

void OnEnter()
{
AddEntityCollideCallback("Player", "livingkey", "monsterspawn", true, 1);
PlayMusic("amb_soft_mood.ogg", true, 1, 0.1f, 0, true);
AutoSave();
}

void monsterspawn(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("tehmonster",true);
AddEnemyPatrolNode("tehmonster","PathnodeArea8",2,"");
AddEnemyPatrolNode("tehmonster","PathnodeArea11",6,"");
AutoSave();                  
}

Exactly everyone forgot that there are no scripts as AddEntityCallback or AddEntityInteract. Well, that happens Tongue
02-19-2014, 09:57 AM
Find
davide32 Offline
Junior Member

Posts: 27
Threads: 6
Joined: Nov 2013
Reputation: 0
#15
RE: Script help

AddEntityCallback doesn't exist in amnesia Scripting it might be
AddEntityCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide);
02-23-2014, 10:33 PM
Find
davide32 Offline
Junior Member

Posts: 27
Threads: 6
Joined: Nov 2013
Reputation: 0
#16
RE: Script help

AddEntityCollideCallback it's correct
03-20-2014, 03:01 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#17
RE: Script help

Why did you bump again? On top of that you're double posting.

"Veni, vidi, vici."
"I came, I saw, I conquered."
03-20-2014, 03:48 PM
Find




Users browsing this thread: 1 Guest(s)