Lake
Member
Posts: 58
Threads: 20
Joined: Jul 2012
Reputation:
0
|
No Matching signatures
This is the error:
this is the script:
Void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "statue", true, 1);
SetLocalVarInt("suitorelement", 0);
}
void statue(string &in asParent, string &in asChild, int alState)
{
AddLocalVarInt("suitorelement", 1);
Func02();
SetEntityActive("enemy_suitor_2", true);
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_1", 2, "");
SetEntityActive("armour_rusty_complete_1", true);
SetEntityActive("armour_rusty_complete_2", true);
AddQuest("quest4", "quest4");
Global.hps:
void OnStart()
{
//level 2 to note level 1 start
SetLocalVarInt("suitorelement", 0);
}
void Func02()
{
if (GetLocalVarInt("suitorelement") == 1)
{
SetEntityActive("nota5", true);
}
}
(This post was last modified: 08-12-2012, 11:20 AM by Lake.)
|
|
08-12-2012, 10:34 AM |
|
palistov
Posting Freak
Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation:
57
|
RE: No Matching signatures
Unfortunately you can't define functions in global.hps and expect them to work. All scripts must be done in the level-specific file
Technically you CAN do all kinds of stuff in global.hps like control flow and your own functions and the like, but you don't have any access to the API, so you can't really do much of anything useful with it.
TL;DR solution: move Func02 definition to your level's script file. Global.hps isn't included in your levels' scripts.
|
|
08-12-2012, 10:39 AM |
|
Lizard
Member
Posts: 174
Threads: 23
Joined: Jul 2012
Reputation:
5
|
RE: No Matching signatures
move void func02 to the other .hps
Void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "statue", true, 1);
SetLocalVarInt("suitorelement", 0);
}
void statue(string &in asParent, string &in asChild, int alState)
{
AddLocalVarInt("suitorelement", 1);
Func02();
SetEntityActive("enemy_suitor_2", true);
}
void Func02()
{
if (GetLocalVarInt("suitorelement") == 1)
{
SetEntityActive("nota5", true);
}
}
CURRENT PROJECT:
A Fathers Secret == Just started
(This post was last modified: 08-12-2012, 10:42 AM by Lizard.)
|
|
08-12-2012, 10:42 AM |
|
Lake
Member
Posts: 58
Threads: 20
Joined: Jul 2012
Reputation:
0
|
RE: No Matching signatures
so how can I do to ensure that when the player goes in the script 1 a map, then something happens in another?
|
|
08-12-2012, 11:00 AM |
|
Lizard
Member
Posts: 174
Threads: 23
Joined: Jul 2012
Reputation:
5
|
RE: No Matching signatures
What exactly is it that you want?
CURRENT PROJECT:
A Fathers Secret == Just started
|
|
08-12-2012, 11:11 AM |
|
Lake
Member
Posts: 58
Threads: 20
Joined: Jul 2012
Reputation:
0
|
RE: No Matching signatures
I want that when the player steps into the ScriptArea_1 another map appears a note that was not there before
|
|
08-12-2012, 11:14 AM |
|
Lizard
Member
Posts: 174
Threads: 23
Joined: Jul 2012
Reputation:
5
|
RE: No Matching signatures
(08-12-2012, 11:14 AM)Lake Wrote: I want that when the player steps into the ScriptArea_1 another map appears a note that was not there before I dont know if that is possible
Would i would do was, to put an area in the map where the note is, so that when the player collides with the area, the note appears
CURRENT PROJECT:
A Fathers Secret == Just started
(This post was last modified: 08-12-2012, 11:16 AM by Lizard.)
|
|
08-12-2012, 11:15 AM |
|
Lake
Member
Posts: 58
Threads: 20
Joined: Jul 2012
Reputation:
0
|
RE: No Matching signatures
ok I understand, I'll think of some other idea for the custom
|
|
08-12-2012, 11:19 AM |
|
Lizard
Member
Posts: 174
Threads: 23
Joined: Jul 2012
Reputation:
5
|
RE: No Matching signatures
(08-12-2012, 11:19 AM)Lake Wrote: ok I understand, I'll think of some other idea for the custom There is also another option. You could have a item as trigger for the note.
Pick up an trigger item in one map, and when you enter the second the game should check if you have the trigger item in your inventory, and if you have the note should appear
CURRENT PROJECT:
A Fathers Secret == Just started
|
|
08-12-2012, 11:22 AM |
|
|