mcjakki
Junior Member
Posts: 2
Threads: 1
Joined: Jun 2012
Reputation:
0
|
HELP ME PLZZ!!!!!!!!!
Hello if u read this plzz check my script error. I dont know what fails in my script.
This is Amnesia error:
FATAL ERROR; Could not load script file'custom_stories/Morso In Ur Ass/maps/Dodge.hps'!
main(47,2) : ERR : Unexpected end of file
And this is my script:
void OnStart()
{
AddUseItemCallback("", "avain_1", "ovi_2", "unLockDoor", true);
PlayMusic("01_amb_darkness.ogg", true, 1.0f, 0, 0, true);
SetEntityCallbackFunc("lantern_1", "Pickup1");
SetEntityCallbackFunc("avain_2", "Pickup2");
AddEntityCollideCallback("Player", "scare_area_1", "scare_1", true, 1);
}
void unLockDoor(string &in item, string &in door)
{
SetSwingDoorLocked("ovi_1", false, true);
PlaySoundAtEntity("", "unlock_door", "ovi_1", 0, false);
RemoveItem("avain_1");
}
void Pickup1(string &in asEntity, string &in type)
{
GiveSanityDamage(5.0f ,true);
SetEntityActive("mies_1" ,true);
PlaySoundAtEntity("Player", "24_iron_maiden.snt", "Player", 0, false);
}
void Pickup2(string &in asEntity, string &in type)
{
GiveSanityDamage(5.0f ,true);
SetEntityActive("servant_grunt" ,true");
ShowEnemyPlayerPosition("servant_grunt");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_11", 0, "");
}
void scare_1(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(5.0f ,true);
SetEntityActive("scare_1" ,true);
PlaySoundAtEntity("Player", "24_iron_maiden.snt", "Player", 0, false);
}
|
|
06-02-2012, 04:26 PM |
|
i3670
Posting Freak
Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation:
36
|
RE: HELP ME PLZZ!!!!!!!!!
Try this
void OnStart()
{
AddUseItemCallback("", "avain_1", "ovi_2", "unLockDoor", true);
PlayMusic("01_amb_darkness.ogg", true, 1.0f, 0, 0, true);
SetEntityCallbackFunc("lantern_1", "Pickup1");
SetEntityCallbackFunc("avain_2", "Pickup2");
AddEntityCollideCallback("Player", "scare_area_1", "scare_1", true, 1);
}
void unLockDoor(string &in item, string &in door)
{
SetSwingDoorLocked("ovi_1", false, true);
PlaySoundAtEntity("", "unlock_door", "ovi_1", 0, false);
RemoveItem("avain_1");
}
void Pickup1(string &in asEntity, string &in type)
{
GiveSanityDamage(5.0f, true);
SetEntityActive("mies_1", true);
PlaySoundAtEntity("Player", "24_iron_maiden.snt", "Player", 0, false);
}
void Pickup2(string &in asEntity, string &in type)
{
GiveSanityDamage(5.0f, true);
SetEntityActive("servant_grunt", true);
ShowEnemyPlayerPosition("servant_grunt");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_11", 0, "");
}
void scare_1(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(5.0f, true);
SetEntityActive("scare_1", true);
PlaySoundAtEntity("Player", "24_iron_maiden.snt", "Player", 0, false);
}
You should/could put the PlayMusic in the OnEnter instead of OnStart
(This post was last modified: 06-02-2012, 06:23 PM by i3670.)
|
|
06-02-2012, 05:31 PM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: HELP ME PLZZ!!!!!!!!!
The issue is in the Pickup2 function.
|
|
06-02-2012, 06:09 PM |
|
mcjakki
Junior Member
Posts: 2
Threads: 1
Joined: Jun 2012
Reputation:
0
|
RE: HELP ME PLZZ!!!!!!!!!
(06-02-2012, 05:31 PM)i3670 Wrote: Try this
void OnStart()
{
AddUseItemCallback("", "avain_1", "ovi_2", "unLockDoor", true);
PlayMusic("01_amb_darkness.ogg", true, 1.0f, 0, 0, true);
SetEntityCallbackFunc("lantern_1", "Pickup1");
SetEntityCallbackFunc("avain_2", "Pickup2");
AddEntityCollideCallback("Player", "scare_area_1", "scare_1", true, 1);
}
void unLockDoor(string &in item, string &in door)
{
SetSwingDoorLocked("ovi_1", false, true);
PlaySoundAtEntity("", "unlock_door", "ovi_1", 0, false);
RemoveItem("avain_1");
}
void Pickup1(string &in asEntity, string &in type)
{
GiveSanityDamage(5.0f, true);
SetEntityActive("mies_1", true);
PlaySoundAtEntity("Player", "24_iron_maiden.snt", "Player", 0, false);
}
void Pickup2(string &in asEntity, string &in type)
{
GiveSanityDamage(5.0f, true);
SetEntityActive("servant_grunt", true);
ShowEnemyPlayerPosition("servant_grunt");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("servant_grunt", "PathNodeArea_11", 0, "");
}
void scare_1(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(5.0f, true);
SetEntityActive("scare_1", true);
PlaySoundAtEntity("Player", "24_iron_maiden.snt", "Player", 0, false);
}
You should/could put the PlayMusic in the OnEnter instead of OnStart Thank Dude it works
|
|
06-03-2012, 02:43 PM |
|
i3670
Posting Freak
Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation:
36
|
RE: HELP ME PLZZ!!!!!!!!!
No problem, always glad to help.
|
|
06-03-2012, 05:13 PM |
|
|