Frictional Games Forum (read-only)
Interact Area stays there! - 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: Interact Area stays there! (/thread-25466.html)



Interact Area stays there! - Radical Batz - 06-11-2014

Hi everybody, so I have another problem, ughh.

I made the player get a memento and get burnt by steam when touching the area.

I thought I could make it work, but instead when going in the level, I can touch the area, like it shows the hand where I can touch it. But nothing happens, the hand stays there that I still can touch it but when I do nothing happens, it just stays there. something I did wrong? I and my friend tried to do everything to solve it but no problem found unfortunately. :/

Maybe you guys can help me out Smile

This Is the code,,

PHP Code:
void OnStart()
{
    
AddUseItemCallback("""pipe_piece_1""putPipe""putpipe"true);
    
AddEntityCollideCallback("Player""SpawnBrute""SpawnBrute"true1);
}

void InteractPipe(string &in asEntity)
{
    
AddQuest("Steam""Steam");
    
PlayGuiSound("18_burn_steam.snt"1.0f);
    
GivePlayerDamage(5.0f"BloodSplat"false,false);
    
AddTimer(""1.0f"TimerInteractPipe");
}

void TimerInteractPipe(string &in asTimer)
{
    
SetEntityPlayerInteractCallback("putPipe""InteractPipe"true);
}

void putpipe(string &in asItemstring &in asEntity)
{
    
SetEntityActive("pipe_piece_static_1"true);
    
PlayGuiSound("17_pipe_attach.ogg"1);
    
AddPlayerSanity(3);
    
SetEntityActive("SpawnBrute"true);
    
StopSound("Sound_5"1);
    
DestroyParticleSystem("ParticleSystem_14");
}

void SpawnBrute(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("Brute"true);
    
GiveSanityDamage(30true);
    
AddEnemyPatrolNode("Brute""PathNodeArea_1"0.001f"");
    
AddEnemyPatrolNode("Brute""PathNodeArea_6"0.001f"");
    
AddEnemyPatrolNode("Brute""PathNodeArea_10"0.001f"");
    
AddEnemyPatrolNode("Brute""PathNodeArea_17"0.001f"");
    
AddEnemyPatrolNode("Brute""PathNodeArea_18"0.001f"");
    
AddEnemyPatrolNode("Brute""PathNodeArea_20"0.001f"");
    
}

void OnEnter()        
{
    
AutoSave();


and also in the level editor I put "InteractPipe" in the interact callback of the area, and unticked "ItemInteraction" and "playerlookatcallback" too, and every name is correct in level. so do you find any problems for this situation?


RE: Interact Area stays there! - DnALANGE - 06-11-2014

Just DEactivate the area?...

Also do the REMOVE interactcall back.
That will do the trick.
Then it only works 1 time.


RE: Interact Area stays there! - Radical Batz - 06-11-2014

(06-11-2014, 06:40 PM)DnALANGE Wrote: Just DEactivate the area?...

Also do the REMOVE interactcall back.
That will do the trick.
Then it only works 1 time.

Alright DnALANGE, for some reason it started working. I did nothing but it just started to work, so strange isn't it.

But yeah, thnx for trying to help me tough Smile

Gave ya + Rep for that custom story you made "Fear Amnesia" I think it was called, I like that cs and is in my favorite list. Good Job!