The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Mementos WILL WORK NOW! (completed)
MaxTheOne Offline
Junior Member

Posts: 4
Threads: 1
Joined: Jul 2020
Reputation: 0
#1
Mementos WILL WORK NOW! (completed)

ok so i have been working on a custom story for days now and for a whole day i was trying to figure out how to add mementos. i have watched 2 tutorial videos and i still cant do it. when i went to mudbill on one of his vids he replied once and did not reply to me when i asked him why the mementos wont work. maybe its so obvious why it wont work and thats why he stopped lol. so now i had to make an account on the forums as a last resort. my mementos wont work. i followed mudbills tutorial and it wont work. i looked through my whole script and no errors i see. the script must be working because the game does not crash but when i interact with the thing that will give a memento it will not. it refuses it. here is my WHOLE code line for the level. it has a key and crowbar function and they both work. but when i try to make a memento it wont work. i think it has something to do with putting the parts in incorrect places? if anyone looks through this and there are no errors in the code then i need to change something in the editor. 

void OnStart()
{  
AddUseItemCallback("", "Crowbar Used 2", "Grate", "UseCrowbarOnGrate", true);
AddEntityCollideCallback("Crowbar Joint 1", "GrateBreak", "BreakGrate", true, 1);
}

void UseCrowbarOnGrate(string &in asItem, string &in asEntity)
{
RemoveItem(asItem);
PlaySoundAtEntity("", "player_crouch.snt","Player", 0.05, false);
AddTimer(asEntity, 0.2, "TimerPlaceCrowbar");
}

void TimerPlaceCrowbar(string &in asTimer)
{
SetEntityActive("Crowbar Joint 1", true);
PlaySoundAtEntity("", "puzzle_place_jar.snt", asTimer, 0, false);
}

void BreakGrate(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Crowbar Joint 1", false);
SetEntityActive("Crowbar Used 1", true);

SetSwingDoorLocked("Grate", false, false);
SetSwingDoorClosed("Grate", false, false);
SetSwingDoorDisableAutoClose("Grate", true);

AddPropImpulse("Grate", 0, 9, 0, "world");

CreateParticleSystemAtEntity("", "ps_hit_metal.ps", "GrateDoorEffect", false);

GiveSanityBoostSmall();

PlaySoundAtEntity("", "close_gate.ps", "GrateDoorEffect", 0, false);

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

void TimerPushDoor(string &in asTimer)
{
AddPropImpulse("Grate", -9, 9, 0, "world");
AddTimer("", 1.1, "TimerDoorCanClose");
}

void TimerDoorCanClose(string &in asTimer)
{
SetSwingDoorDisableAutoClose("Grate", false);
AddUseItemCallback("", "Transept R Key", "Transept R", "UseKeyOnDoor2", true);
AddEntityCollideCallback("Player", "GrateLockedMem", "EventQuest", true, 1);
}

void UseKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("Transept R", false);
PlaySoundAtEntity("", "unlock_door.snt", "Transept R", 0, false);
RemoveItem(asItem);
}

void EventQuest(string &in asParent, string &in asChild, int alstate)
{
AddQuest("GrateLockedMem", "GrateLock");
}

if anyone can figure whats wrong with this i will credit at the end of my story or somethin idk. i really just want mementos. i almost just gave up on my story because it just wont work. the bottom of the script it the memento part.
(This post was last modified: 07-28-2020, 02:49 PM by MaxTheOne.)
07-25-2020, 09:56 PM
Find


Messages In This Thread
Mementos WILL WORK NOW! (completed) - by MaxTheOne - 07-25-2020, 09:56 PM
RE: Mementos WONT WORK! - by kirakatve - 07-27-2020, 09:30 AM
RE: Mementos WONT WORK! - by MaxTheOne - 07-27-2020, 11:31 PM
RE: Mementos WONT WORK! - by Mudbill - 07-27-2020, 02:05 PM
RE: Mementos WONT WORK! - by MaxTheOne - 07-27-2020, 11:30 PM
RE: Mementos WONT WORK! - by Mudbill - 07-28-2020, 03:06 AM
RE: Mementos WONT WORK! - by MaxTheOne - 07-28-2020, 12:38 PM



Users browsing this thread: 1 Guest(s)