Frictional Games Forum (read-only)
Please help me :( - 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 me :( (/thread-16080.html)

Pages: 1 2 3


RE: Please help me :( - Datguy5 - 06-12-2012

(06-12-2012, 06:20 PM)pdkgaming Wrote:
(06-12-2012, 06:19 PM)Datguy5 Wrote:
(06-12-2012, 06:18 PM)pdkgaming Wrote:
(06-12-2012, 06:15 PM)Datguy5 Wrote: You seem to have Setenemy to hallucination in between the collidecallbacks.Try moving it?
It doesn't matter where you put the function right? as long as they trigger an event.. right? And even so.. where should I move it to?

You dont actually even need that.You can go to the level editor and click the enemy and then click the hallucination button in the other tab.
Oh, lol.. I didn't know that xD Thanks! Smile
Np Big Grin


RE: Please help me :( - pdkgaming - 06-12-2012

(06-12-2012, 06:22 PM)Datguy5 Wrote:
(06-12-2012, 06:20 PM)pdkgaming Wrote:
(06-12-2012, 06:19 PM)Datguy5 Wrote:
(06-12-2012, 06:18 PM)pdkgaming Wrote:
(06-12-2012, 06:15 PM)Datguy5 Wrote: You seem to have Setenemy to hallucination in between the collidecallbacks.Try moving it?
It doesn't matter where you put the function right? as long as they trigger an event.. right? And even so.. where should I move it to?

You dont actually even need that.You can go to the level editor and click the enemy and then click the hallucination button in the other tab.
Oh, lol.. I didn't know that xD Thanks! Smile
Np Big Grin
oh... still doesn't work though xD

Do you know what I did wrong at the monster part?


void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "playsound", true, 1);
AddUseItemCallback("StudyKey", "studykey_1", "mansion_2", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "ScriptArea_2", "EnemyAppear", true, 1);
AddEntityCollideCallback("servant_grunt_1", "ScriptArea_3", "EnemyDisable", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "LookTimer", true, 1);
}

void playsound(string &in asParent, string &in asChild, int alState)
{
PlayMusic("break_wood1.ogg", false, 1, 0, 1.0, false);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_2", false, true);
PlaySoundAtEntity("unlock_door.snt", "unlock_door", "mansion_2", 0.0f, false);
RemoveItem("studykey_1");
}

void EnemyAppear(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 1, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
}

void EnemyDisable(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("servant_grunt_1", false);
}

EDIT: Nevermind :p for some reason, "servant_grunt_1" changed to "servant_grunt_2" in de level editor

But the first problem still exists :p


RE: Please help me :( - pdkgaming - 06-12-2012

Anyone? Sad


RE: Please help me :( - Adny - 06-12-2012

(06-12-2012, 08:11 PM)pdkgaming Wrote: Anyone? Sad
I have been staring at the provided script in notepad++ for the past 10-15 minutes and I really just can't find anything wrong. My only thought is that it must be wrong in the level editor, please double check the script area name as well as the name of the grunt.


RE: Please help me :( - Your Computer - 06-12-2012

(06-12-2012, 06:26 PM)pdkgaming Wrote: But the first problem still exists :p

What's that? Not looking at Compound_5? If so, compounds don't exist outside of the level editor.


RE: Please help me :( - pdkgaming - 06-13-2012

(06-12-2012, 11:00 PM)Your Computer Wrote:
(06-12-2012, 06:26 PM)pdkgaming Wrote: But the first problem still exists :p

What's that? Not looking at Compound_5? If so, compounds don't exist outside of the level editor.
so i need to undo the compound and select one entity? okay thanks, i'll try it when i get home Smile

EDIT: okay, undoing the compound works... but now the player only looks at "corpse_male_torso_1" and keeps staring at it... changed nothing else on the script except for the maximum speed on StartPlayerLookAt to 100.. Anyone? :p


RE: Please help me :( - pdkgaming - 06-13-2012

Sorry for another long post but... here is my script again (edited the monster part out for better understanding... so dont mind some callbacks on void OnStart().. only the last one is the problem)


void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "playsound", true, 1);
AddUseItemCallback("StudyKey", "studykey_1", "mansion_2", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "ScriptArea_2", "EnemyAppear", true, 1);
AddEntityCollideCallback("servant_grunt_2", "ScriptArea_3", "EnemyDisable", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "LookTimer", true, 1); // <-- This one!
}

// makes sure the player looks at corpse_male_torso_1
void LookTimer(string &in asParent, string &in asChild, int alState)
{
AddTimer("LookAtEntity_1", 0, "LookAt_1");
}

// makes sure the player looks at chest_of_drawers_nice_broken_1
void Timer_1(string &in asTimer)
{
StopPlayerLookAt();
AddTimer("LookAtEntity_2", 1, "LookAt_2");
}

// makes sure the player looks at painting03_1
void Timer_2(string &in asTimer)
{
StopPlayerLookAt();
AddTimer("LookAtEntity_3", 1, "LookAt_3");
}

//LookTimer
void LookAt_1(string &in asTimer)
{
StartPlayerLookAt("corpse_male_torso_1", 100, 100, "Timer_1");
}

// Timer_1
void LookAt_2(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("chest_of_drawers_nice_broken_1", 100, 100, "Timer_2");
}

// Timer_2
void LookAt_3(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("painting03_1", 100, 100, "Timer_3");
}

void OnLeave()
{

}


RE: Please help me :( - GrAVit - 06-13-2012

I'm not sure if timers work well with what happens when Player looks at entity.


RE: Please help me :( - pdkgaming - 06-13-2012

(06-13-2012, 09:31 PM)GrAVit Wrote: I'm not sure if timers work well with what happens when Player looks at entity.
owh.. but how can I make my player to look at 3 entities with 1 second between them? (or more seconds..)


RE: Please help me :( - GrAVit - 06-13-2012

(06-13-2012, 09:33 PM)pdkgaming Wrote:
(06-13-2012, 09:31 PM)GrAVit Wrote: I'm not sure if timers work well with what happens when Player looks at entity.
owh.. but how can I make my player to look at 3 entities with 1 second between them? (or more seconds..)
Yes.