Frictional Games Forum (read-only)
[PLEASE HELP!!] Map/Script Changes Not Applying (Weird Glitch...) - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [PLEASE HELP!!] Map/Script Changes Not Applying (Weird Glitch...) (/thread-12048.html)

Pages: 1 2


[PLEASE HELP!!] Map/Script Changes Not Applying (Weird Glitch...) - SonOfLiberty796 - 12-24-2011

So for some odd reason, my map and it's script won't apply it's changes when I'm in game. It's like if there was no change in the map/script at all! I even removed the .hps file, and the map SOMEHOW still thought a script was running?!

An example is that on the OnStart func, I placed a script where I get a lantern automatically, however, if there was no .hps file for that map... HOW THE HELL did I get a lantern automatically still? Not to mention the script areas were still working as well (Monster spawns, music, everything!)

And yes, the "ForceCacheLoadingAndSkipSaving" is on "False" so the map changes SHOULD work.

What's the problem? This glitch has been driving me INSANE!!! Not to mention I finally have the feeling of work (and maybe finishing) my Full Conversion...but with this glitch, it's making me give up on it, because I don't know what's the problem :/

PLEASE HELP!!!


RE: [PLEASE HELP!!] Map/Script Changes Not Applying (Weird Glitch...) - flamez3 - 12-24-2011

(12-24-2011, 05:36 AM)Xvideogamer720X Wrote: So for some odd reason, my map and it's script won't apply it's changes when I'm in game. It's like if there was no change in the map/script at all! I even removed the .hps file, and the map SOMEHOW still thought a script was running?!

An example is that on the OnStart func, I placed a script where I get a lantern automatically, however, if there was no .hps file for that map... HOW THE HELL did I get a lantern automatically still? Not to mention the script areas were still working as well (Monster spawns, music, everything!)

And yes, the "ForceCacheLoadingAndSkipSaving" is on "False" so the map changes SHOULD work.

What's the problem? This glitch has been driving me INSANE!!! Not to mention I finally have the feeling of work (and maybe finishing) my Full Conversion...but with this glitch, it's making me give up on it, because I don't know what's the problem :/

PLEASE HELP!!!
Maybe posting your .hps could help us solve the problem? (Probably not but we might need to check everything)


RE: [PLEASE HELP!!] Map/Script Changes Not Applying (Weird Glitch...) - SonOfLiberty796 - 12-24-2011

Alright, here it is:


////////////////////////////
// Run first time starting map
void OnStart()
{
//Add the Lantern and 10 Tinderboxes when in Debug mode, always good to have light!
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
}
AddEntityCollideCallback("Player", "monsterchase", "startmonsterchase", true, 1);
AddEntityCollideCallback("Player", "startrunevent", "startrunevent", true, 1);
AddEntityCollideCallback("Player", "spawnmonstertwo", "spawnothermonster", true, 1);
AddEntityCollideCallback("Player", "whereisthistakingme", "darkpath", true, 1);
AddEntityCollideCallback("Player", "deadend", "deadendmessage", true, 1);
StopSound("monsterout", 0);
SetLanternDisabled(false);

}

void startmonsterchase(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("closetgrunt", true);
FadeInSound("monsterout", 0, false);
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_12", 0, "");
}

void startrunevent(string &in asParent, string &in asChild, int alState)
{
PlayMusic("run.ogg", true, 1, 1, 0, true);
ShowEnemyPlayerPosition("closetgrunt");
}

void spawnothermonster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("closetgrunt", false;
SetEntityActive("grunt", true);
ShowEnemyPlayerPosition("grunt");
}

void darkpath(string &in asParent, string &in asChild, int alState)
{
SetMessage("MessageDisplay", "Message_darkpath_Name", 2.5f);
}

void deadendmessage(string &in asParent, string &in asChild, int alState)
{
SetMessage("MessageDisplay", "Message_deadend_Name", 3.0f);
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

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

}


RE: [PLEASE HELP!!] Map/Script Changes Not Applying (Weird Glitch...) - Statyk - 12-24-2011

(12-24-2011, 05:57 AM)Xvideogamer720X Wrote: Alright, here it is:


////////////////////////////
// Run first time starting map
void OnStart()
{
//Add the Lantern and 10 Tinderboxes when in Debug mode, always good to have light!
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
}

AddEntityCollideCallback("Player", "monsterchase", "startmonsterchase", true, 1);
AddEntityCollideCallback("Player", "startrunevent", "startrunevent", true, 1);
AddEntityCollideCallback("Player", "spawnmonstertwo", "spawnothermonster", true, 1);
AddEntityCollideCallback("Player", "whereisthistakingme", "darkpath", true, 1);
AddEntityCollideCallback("Player", "deadend", "deadendmessage", true, 1);
StopSound("monsterout", 0);
SetLanternDisabled(false);

}

void startmonsterchase(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("closetgrunt", true);
FadeInSound("monsterout", 0, false);
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_12", 0, "");
}

void startrunevent(string &in asParent, string &in asChild, int alState)
{
PlayMusic("run.ogg", true, 1, 1, 0, true);
ShowEnemyPlayerPosition("closetgrunt");
}

void spawnothermonster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("closetgrunt", false;
SetEntityActive("grunt", true);
ShowEnemyPlayerPosition("grunt");
}

void darkpath(string &in asParent, string &in asChild, int alState)
{
SetMessage("MessageDisplay", "Message_darkpath_Name", 2.5f);
}

void deadendmessage(string &in asParent, string &in asChild, int alState)
{
SetMessage("MessageDisplay", "Message_deadend_Name", 3.0f);
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

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

}
Try removing the bolded phrase and see what happens... >> Not sure what could be wrong but that's my guess.




RE: [PLEASE HELP!!] Map/Script Changes Not Applying (Weird Glitch...) - SonOfLiberty796 - 12-24-2011

Try removing the bolded phrase and see what happens... >> Not sure what could be wrong but that's my guess.
[/quote]


I'll try, but I doubt it too :p

The lantern isn't the problem, though, but hey, I have to try everything :p


RE: [PLEASE HELP!!] Map/Script Changes Not Applying (Weird Glitch...) - Statyk - 12-24-2011

(12-24-2011, 06:12 AM)Xvideogamer720X Wrote:
(12-24-2011, 06:08 AM)Statyk Wrote:
Try removing the bolded phrase and see what happens... >> Not sure what could be wrong but that's my guess.


I'll try, but I doubt it too :p

The lantern isn't the problem, though, but hey, I have to try everything :p
[/quote]


No but the script could be being funky and loading all the settings in the OnStart through the "ifScriptDebugOn" =\ Other than that, are you sure you're checking the correct .hps? lol


RE: [PLEASE HELP!!] Map/Script Changes Not Applying (Weird Glitch...) - SonOfLiberty796 - 12-24-2011

WAIT!! I FOUND A PROBLEM!!

I just spotted my error, I forgot to add a ")" sign on the "SetEntityActive("closetgrunt", false;" part!!!

Gonna check that out right now.

EDIT: WOW, I was for sure that was the problem... it wasn't! Still having the same problem! :/


RE: [PLEASE HELP!!] Map/Script Changes Not Applying (Weird Glitch...) - DRedshot - 12-24-2011

I know you said you have "ForceCacheLoadingAndSkipSaving" False, but you could try deleting your cache files manually, I have to do this sometimes. Just open your map folder and delete all the cache files, hopefully it will fix your problem, I can't see anything wrong withh your script file...


RE: [PLEASE HELP!!] Map/Script Changes Not Applying (Weird Glitch...) - palistov - 12-24-2011

What exactly happens when you try and launch the map? Does Amnesia crash or does your map load up fine -- but the script itself won't work. Details like this can help us locate your script errors.


RE: [PLEASE HELP!!] Map/Script Changes Not Applying (Weird Glitch...) - trollox - 12-24-2011

How did you learn to script like this? i'm working on my first cs but i got no clue how to script jumpscares/moster etc.. please help?