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
Nothing is working.
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#1
Nothing is working.

I've had this problem for a while now and have yet found a solution. The issue I'm having is that even if the callbacks are called nothing is happening. I've split the script up and tested them each by individually and it seems that none of them work even though they work outside the map.

I tested with a simple "interact - something happens"- script on an area. The handicon appeared but when I clicked nothing happened.

Is there something wrong with the map itself? Because all other maps works just fine.

"What you think is irrelevant" - A character of our time

A Christmas Hunt
(This post was last modified: 09-12-2012, 12:47 PM by i3670.)
09-05-2012, 09:06 PM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#2
RE: Nothing is working.

We're probably going to need more information than that. Can you upload the script and map file you are using?
09-05-2012, 09:11 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#3
RE: Nothing is working.

I've had this problem... Simply what i did was closing Amnesia.exe. Then open it again.

Trying is the first step to success.
09-05-2012, 09:18 PM
Find
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#4
RE: Nothing is working.

Apjjm: sent download link to mapfile in pm
beecake: done that, didn't work.

Portcullis script
Spoiler below!

void OnStart()
{
ConnectEntities("D", "lever_simple01", "castle_portcullis_1", true, -1, "PortOpen1");
ConnectEntities("E", "lever_simple02", "castle_portcullis_2", true, -1, "PortOpen2");
ConnectEntities("F", "lever_simple03", "castle_portcullis_3", true, -1, "PortOpen3");
}
///Ports///
void PortOpen1(string &in asConnectionName, string &in asMainEntity, string &in asConnectEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("castle_portcullis_1", 1);
SetLeverStuckState("lever_simple01", 0, true);
}
else if(alState == -1)
{
SetMoveObjectState("castle_portcullis_1", 0);
}
}

void PortOpen2(string &in asConnectionName, string &in asMainEntity, string &in asConnectEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("castle_portcullis_2", 1);
SetLeverStuckState("lever_simple02", 0, true);
}
else if(alState == -1)
{
SetMoveObjectState("castle_portcullis_2", 1);
}
}

void PortOpen3(string &in asConnectionName, string &in asMainEntity, string &in asConnectEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("castle_portcullis_3", 1);
SetLeverStuckState("lever_simple03", 0, true);
}
else if(alState == -1)
{
SetMoveObjectState("castle_portcullis_3", 1);
}
}

///Ports End///



Graveyard script
Spoiler below!

void OnStart()
{
AddEntityCollideCallback("Player", "GraveArea_1", "Grave1", true, 1);
AddEntityCollideCallback("Player", "GraveArea_2", "Grave2", true, 1);
AddEntityCollideCallback("Player", "GraveArea_3", "Grave3", true, 1);
AddEntityCollideCallback("Player", "GraveArea_4", "Grave4", true, 1);

SetLocalVarInt("Var1", 0);

SetEntityPlayerLookAtCallback("GraceAreaCorpse_1", "CorpseDisappear1", true);
SetEntityPlayerLookAtCallback("GraceAreaCorpse_2", "CorpseDisappear2", true);
}

void Grave1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("GraceAreaCorpse_1", true);

AddLocalVarInt("Var1", 1);
func5();
}

void Grave2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("GraceAreaCorpse_2", true);

AddLocalVarInt("Var1", 1);
func5();
}

void Grave3(string &in asParent, string &in asChild, int alState)
{
AddLocalVarInt("Var1", 1);
func5();
}

void Grave4(string &in asParent, string &in asChild, int alState)
{
AddLocalVarInt("Var1", 1);
func5();
}

void func5()
{
if(GetLocalVarInt("Var1") == 4)
{
SetEntityActive("coffin_dirty_3", true);
SetEntityActive("Flask_03", true);
}
}

void CorpseDisappear1(string &in asEntity, int alState)
{
if (alState == 1)
{
SetPropActiveAndFade("graveyard_corpse03_1", false, 0.5f);
StartScreenShake(0.1f, 0, 0.1, 0.1);
PlayGuiSound("sanity_flick.snt", 0.5f);
PlayGuiSound("scare_wall_scratch_single.snt", 1);
PlayGuiSound("react_breath.snt", 1);
}
}

void CorpseDisappear2(string &in asEntity, int alState)
{
if (alState == 1)
{
SetPropActiveAndFade("graveyard_corpse02_1", false, 0.5f);
StartScreenShake(0.1f, 0, 0.1, 0.1);
PlayGuiSound("sanity_flick.snt", 0.5f);
PlayGuiSound("scare_wall_scratch_single.snt", 1);
PlayGuiSound("react_breath.snt", 1);
}
}
///Graveyard End///



Tunnel script
Spoiler below!

void OnStart()
{
AddEntityCollideCallback("Player", "WhisperArea_1", "WhisperTunnel_1", true, 1);
AddEntityCollideCallback("Player", "WhisperArea_2", "WhisperTunnel_2", true, 1);
AddEntityCollideCallback("Player", "WhisperArea_3", "WhisperTunnel_3", true, 1);
}

///Spike Tunnel///
void WhisperTunnel_1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "05_event_bottles.snt", "Player", 1.0f, false);
}

void WhisperTunnel_2(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "insanity_whisper.snt", "Player", 1.0f, false);
}

void WhisperTunnel_3(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "insanity_whisper.snt", "Player", 1.0f, false);
}

///Spike Tunnel End///


Lab script
Spoiler below!

void OnStart()
{
SetEntityInteractionDisabled("glass_container_1", true);

ConnectEntities("Ignite", "ValveIgnite", "Valve_1_AreaBottle", false, 0, "TurnOnAcidLab");
}

////////LAB///////
void TurnOnAcidLab(string &in asConnectionName, string &in asMainEntity, string &in asConnectEntity, int alState)
{
if(alState == 1)
{
for(int i=1;i<=4;i++) {
CreateParticleSystemAtEntity(asName+"Fire"+i, "ps_fire_candle.ps", "Valve_"+i+"_AreaBottle", false);

FadeLightTo("Valve_"+i+"_Light", -1, -1, -1, -1, 0.4f, 1);

SetWheelStuckState("Valve_"+i, 0, true);
}

PlaySoundAtEntity("IgniteSound", "general_fire_burning_low", "Valve_1_AreaBottle", 1, false);

SetWheelStuckState("ValveIgnite", 1, true);
}
else if(alState == -1)
{

}
}

///////LAB END//////


I don't have multiple OnStarts, it's just from when I split up the script.

"What you think is irrelevant" - A character of our time

A Christmas Hunt
09-05-2012, 10:08 PM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#5
RE: Nothing is working.

Firstly there is an error in the lab script section. Specifically in TurnOnAcidLab:
CreateParticleSystemAtEntity(asName+"Fire"+i, "ps_fire_candle.ps", "Valve_"+i+"_AreaBottle", false);
asName is undefined. What is this supposed to be? I commented this line out and the rest of the script ran fine.

Additionally, you are getting warnings from double->float conversions. These are in both CorpseDissappear functions:
StartScreenShake(0.1f, 0, 0.1, 0.1);

--should be-

StartScreenShake(0.1f, 0, 0.1f, 0.1f);
These warnings are harmless, but they do clutter up the error messages pane, so it's always good to fix them.

Aside from that, everything else seems to work. I cannot use the picked up jars on the flasks - but this is because you haven't added the relevant AddUseItemCallbacks yet.

If after doing the above fixes nothing still seems to work i suggest you look at renaming your map (e.g. storage_area) - perhaps there is a naming conflict, or you have two versions of the map and the game is loading an older one. Also make sure you have deleted any .map_cache files.
09-06-2012, 04:02 PM
Find
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#6
RE: Nothing is working.

I made all the changes and it still won't work. I even changed the name of the map and the .hps file.

btw I haven't added the AddUseItemCallback because I thought I'd be best if I solved this problem/s first.

"What you think is irrelevant" - A character of our time

A Christmas Hunt
09-06-2012, 07:51 PM
Find




Users browsing this thread: 1 Guest(s)