daortir
Senior Member
Posts: 422
Threads: 9
Joined: Sep 2013
Reputation:
18
|
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 |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: Script help
//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", true, 1); PlayMusic("amb_soft_mood.ogg", true, 1, 0.1f, 0, true); //missing .ogg extension AutoSave(); }
void monsterspawn(string &in asParent, string &in asChild, int alState) //missing callback parameters { SetEntityActive("tehmonster",true); AddEnemyPatrolNode("tehmonster","PathnodeArea8",2,""); AddEnemyPatrolNode("tehmonster","PathnodeArea11",6,""); AutoSave(); //missing brackets }
Try that :3
Discord: Romulator#0001
(This post was last modified: 12-13-2013, 03:13 PM by Romulator.)
|
|
12-13-2013, 03:09 PM |
|
ExpectedIdentifier
Member
Posts: 234
Threads: 10
Joined: Sep 2012
Reputation:
11
|
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:
|
|
12-15-2013, 05:50 AM |
|
Neelke
Senior Member
Posts: 668
Threads: 82
Joined: Apr 2013
Reputation:
26
|
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
|
|
02-19-2014, 09:57 AM |
|
davide32
Junior Member
Posts: 27
Threads: 6
Joined: Nov 2013
Reputation:
0
|
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 |
|
davide32
Junior Member
Posts: 27
Threads: 6
Joined: Nov 2013
Reputation:
0
|
RE: Script help
AddEntityCollideCallback it's correct
|
|
03-20-2014, 03:01 PM |
|
PutraenusAlivius
Posting Freak
Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation:
119
|
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 |
|
|