![]() |
WHAT IS WRONG?!!!!!!!!!!!!! - 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: WHAT IS WRONG?!!!!!!!!!!!!! (/thread-25439.html) Pages:
1
2
|
RE: WHAT IS WRONG?!!!!!!!!!!!!! - ProyectV - 06-07-2014 (06-07-2014, 12:36 PM)Mudbill Wrote: eSpeed1 is defined as a float in the parameter of Again. The other Again that uses a string parameters does not conflict with the float one. Only constructors with the same parameters can conflict. For example, you can make OnStart("Answer") and OnStart(42) and neither of them will cause any issues for the normal OnStart() with no parameters. Yeah, but the problem is that if i use a checkpoint function the monster will disappear and so far i know that if you use a checkpoint function you'r progress on the level will be saved and i want to start all the CS from the beginning. At least that's what i'be seen so far on the game... Btw. I already checked the possibility of the dead script, the function Again doesn't interfere with the rest of the script, so we can set that aside RE: WHAT IS WRONG?!!!!!!!!!!!!! - Mudbill - 06-07-2014 You can use a CheckPoint and then in the asCallback (which is made by just adding a void Respawn() if you name it Respawn), you can reset the monster by reactivating it. SetEntityActive("MonsterName", true); will re-enable the monster after you respawn, and it should be re-enabled from its original location. If you use any variables, you can reset those by just setting them back to the initial value. Whatever you put in OnStart will not happen again when you respawn or re-enter the level. You can, however, add all these checks to OnEnter (which it kinda looks like you've done already) and have them re-execute by reloading the map. I'd prefer to reset the level as much as possible without loading another map, but if you want, you can reload it. In the CheckPoint callback, do a ChangeMap script to a small and empty map that just simply has a ChangeMap within its OnEnter block to return you to the previous level. It's a bit awkward perhaps to change levels twice in a row, but it should reset mostly anything in the map (except things that use FullGameSave). |