Frictional Games Forum (read-only)
MY CAPS LOCK BUTTON BROKE - 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: MY CAPS LOCK BUTTON BROKE (/thread-24187.html)

Pages: 1 2 3


RE: MY CAPS LOCK BUTTON BROKE - PutraenusAlivius - 12-23-2013

void NAMETHISYOURTIMER(string &in asTimer) //Never called
{
AddTimer("", 1.1, "TimerDoorCanClose");
}

Wait, the above function IS never called.


RE: MY CAPS LOCK BUTTON BROKE - Radical Batz - 12-23-2013

(12-23-2013, 02:11 AM)Romulator Wrote: TimerDoorCanClose() also appears twice, both seemingly do the same thing.
ok so I deleted the duplicate one, and now it's getting me a different 1 error! it's saying main (63,1): ERR: Unexpected token '{'
help anybody?


RE: MY CAPS LOCK BUTTON BROKE - Traggey - 12-23-2013

You need a flux capacitor.


RE: MY CAPS LOCK BUTTON BROKE - PutraenusAlivius - 12-23-2013

(12-23-2013, 02:16 AM)Traggey Wrote: You need a flux capacitor.

God dangit man do you want to help or not?

Spoiler below!

PHP Code:
void PickupKey(string &in asEntity, string &in asItem)

{ 

AddQuest("quest1", "TestQuest");
AddTimer("", 0.5f, "NeverCalledTimer"); //Change the time as long as you want

AddUseItemCallback("", "MasterBedroomKey", "bedroomdoor","UseMasterBedroomKey", true);

AddEntityCollideCallback("Player", "AreaMemento", "EventQuest", true, 1);

}

 

void UseMasterBedroomKey(string &in asItem, string &in asEntity)

{

SetMessage("message", "message1", 3);

}



void NeverCalledTimer(string &in asTimer)

{

AddTimer("", 1.1f, "TimerDoorStart");

}



void TimerDoorStart(string &in asTimer)

{ 

AddUseItemCallback("", "Crowbar", "Door", "UseCrowbarOnDoor", true);

AddEntityCollideCallback("Joint", "AreaBreak", "BreakDoor", true, 1);
SetSwingDoorDisableAutoClose("Door", false);

}



 
void UseCrowbarOnDoor(string &in asItem, string &in asEntity)

{

RemoveItem(asItem);

PlaySoundAtEntity("", "player_crouch.snt", "Player", 0.05, false);

AddTimer(asEntity, 0.2f, "TimerPlaceCrowbar");

} 



void TimerPlaceCrowbar(string &in asTimer)

{

SetEntityActive("Joint", true);

PlaySoundAtEntity("", "puzzle_place_jar.snt", asTimer, 0, false);

}



 
void BreakDoor(string &in asParent, string &in asChild, int alState)

{

SetEntityActive("Joint", false);

SetEntityActive("Broken", true);

SetSwingDoorLocked("Door", false, false);

SetSwingDoorClosed("Door", false, false);

SetSwingDoorDisableAutoClose("Door", true);

AddPropImpulse("Door", 0, 0, 3, "world");

CreateParticleSystemAtEntity("", "ps_hit_wood.ps", "Areaeffect", false);

PlaySoundAtEntity("", "break_wood_metal", "Areaeffect", 0, false);

GiveSanityBoostSmall();

PlayMusic("10_puzzle01.ogg", false, 0.7, 0.1, 10, false);

AddTimer("", 0.1f, "TimerPushDoor");

} 



void TimerPushDoor(string &in asTimer)

{

AddPropImpulse("Door", -4, 2, 1, "world");

AddTimer("", 1.1, "TimerDoorCanClose");

}



 
//void touchdoor(string &in asEntity, string &in type) //Where is it called at? Ignoring it for now.

//{

//AddQuest("door", "touchdoor");

//}

void EventQuest(string &in asParent, string &in asChild, int alState)

{

AddQuest("area", "enterarea");

} 




RE: MY CAPS LOCK BUTTON BROKE - Radical Batz - 12-23-2013

(12-23-2013, 02:17 AM)JustAnotherPlayer Wrote:
(12-23-2013, 02:16 AM)Traggey Wrote: You need a flux capacitor.

God dangit man do you want to help or not?

Spoiler below!

PHP Code:
void PickupKey(string &in asEntity, string &in asItem)

{ 

AddQuest("quest1", "TestQuest");
AddTimer("", 0.5f, "NeverCalledTimer"); //Change the time as long as you want

AddUseItemCallback("", "MasterBedroomKey", "bedroomdoor","UseMasterBedroomKey", true);

AddEntityCollideCallback("Player", "AreaMemento", "EventQuest", true, 1);

}

 

void UseMasterBedroomKey(string &in asItem, string &in asEntity)

{

SetMessage("message", "message1", 3);

}



void NeverCalledTimer(string &in asTimer)

{

AddTimer("", 1.1f, "TimerDoorStart");

}



void TimerDoorStart(string &in asTimer)

{ 

AddUseItemCallback("", "Crowbar", "Door", "UseCrowbarOnDoor", true);

AddEntityCollideCallback("Joint", "AreaBreak", "BreakDoor", true, 1);
SetSwingDoorDisableAutoClose("Door", false);

}



 
void UseCrowbarOnDoor(string &in asItem, string &in asEntity)

{

RemoveItem(asItem);

PlaySoundAtEntity("", "player_crouch.snt", "Player", 0.05, false);

AddTimer(asEntity, 0.2f, "TimerPlaceCrowbar");

} 



void TimerPlaceCrowbar(string &in asTimer)

{

SetEntityActive("Joint", true);

PlaySoundAtEntity("", "puzzle_place_jar.snt", asTimer, 0, false);

}



 
void BreakDoor(string &in asParent, string &in asChild, int alState)

{

SetEntityActive("Joint", false);

SetEntityActive("Broken", true);

SetSwingDoorLocked("Door", false, false);

SetSwingDoorClosed("Door", false, false);

SetSwingDoorDisableAutoClose("Door", true);

AddPropImpulse("Door", 0, 0, 3, "world");

CreateParticleSystemAtEntity("", "ps_hit_wood.ps", "Areaeffect", false);

PlaySoundAtEntity("", "break_wood_metal", "Areaeffect", 0, false);

GiveSanityBoostSmall();

PlayMusic("10_puzzle01.ogg", false, 0.7, 0.1, 10, false);

AddTimer("", 0.1f, "TimerPushDoor");

} 



void TimerPushDoor(string &in asTimer)

{

AddPropImpulse("Door", -4, 2, 1, "world");

AddTimer("", 1.1, "TimerDoorCanClose");

}



 
//void touchdoor(string &in asEntity, string &in type) //Where is it called at? Ignoring it for now.

//{

//AddQuest("door", "touchdoor");

//}

void EventQuest(string &in asParent, string &in asChild, int alState)

{

AddQuest("area", "enterarea");

} 

OMG Now it works, thank you so much man, you saved my custom story, thanks everybody for helping me! but the mementos and the crowbar don't work in the game :/


RE: MY CAPS LOCK BUTTON BROKE - Traggey - 12-23-2013

I told you it was the capacitor.