Frictional Games Forum (read-only)
Respawn To Begin the Sence again - 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: Respawn To Begin the Sence again (/thread-10577.html)



Respawn To Begin the Sence again - UnseenLegend ( NL ) - 10-03-2011

oke i made a Big Collapsing Sance
PHP Code:
void Cave_1(string &in asTimer)
{
SetEntityActive("cave_in_9"true);

when you died by the Cave i want To Reloadload the hole Sence again so SetEntityActive("cave_in_9", true);
Will Collaps again i made more then 130 Cave collapsingings
if i do an CheckPoint i will respawn in the collapsed area

btw sorry for the Bad Explaining.


RE: Respawn To Begin the Sence again - A Luna - 10-05-2011

(10-03-2011, 07:18 PM)UnseenLegend ( NL ) Wrote: oke i made a Big Collapsing Sance
PHP Code:
void Cave_1(string &in asTimer)
{
SetEntityActive("cave_in_9"true);

when you died by the Cave i want To Reloadload the hole Sence again so SetEntityActive("cave_in_9", true);
Will Collaps again i made more then 130 Cave collapsingings
if i do an CheckPoint i will respawn in the collapsed area

btw sorry for the Bad Explaining.
If you want I can translate it from dutch to english for you Tongue




RE: Respawn To Begin the Sence again - MrBigzy - 10-06-2011

You have to create a spawn point (player start area), and then set the checkpoint to spawn you there.



RE: Respawn To Begin the Sence again - UnseenLegend ( NL ) - 10-06-2011

i know that but that wont Reload The Sence Again



RE: Respawn To Begin the Sence again - Elven - 10-06-2011

Put it to spawn behind there and put all the conditions into checkpoint callback. This way it will load all these events again Smile!



RE: Respawn To Begin the Sence again - MrBigzy - 10-06-2011

Yeah, you use the callback to do things like ResetProp and such, and add callbacks that were already set off after the checkpoint.



RE: Respawn To Begin the Sence again - nemesis567 - 10-06-2011

Sense?



RE: Respawn To Begin the Sence again - Elven - 10-06-2011

For example. If at the beginning of the map there is script called:

OnStart()
{
AddEntityCollideCallback("Player", "deadarea", "deadarea", true, 0);
}

And you die in that dead area because of some reason, then set checkpoint before that area and add script inside check point respawn:

AddEntityCollideCallback("Player", "deadarea", "deadarea", true, 0);

BAsically, code would look like that:

Code:
OnStart()
{
AddEntityCollideCallback("Player", "deadarea", "deadarea", true, 0);
CheckPoint ("checkpoint1", "PlayerStartArea_1", "respawn1", "", "");

}

void deadarea(string &in asParent, string &in asChild, int alState)
{
//Do whatever you want to do there!
}

void respawn1(string &in asName, int alCount)
{
AddEntityCollideCallback("Player", "deadarea", "deadarea", true, 0);
}



RE: Respawn To Begin the Sence again - UnseenLegend ( NL ) - 10-07-2011

(10-06-2011, 07:41 PM)Elven Wrote: For example. If at the beginning of the map there is script called:

OnStart()
{
AddEntityCollideCallback("Player", "deadarea", "deadarea", true, 0);
}

And you die in that dead area because of some reason, then set checkpoint before that area and add script inside check point respawn:

AddEntityCollideCallback("Player", "deadarea", "deadarea", true, 0);

BAsically, code would look like that:

Code:
OnStart()
{
AddEntityCollideCallback("Player", "deadarea", "deadarea", true, 0);
CheckPoint ("checkpoint1", "PlayerStartArea_1", "respawn1", "", "");

}

void deadarea(string &in asParent, string &in asChild, int alState)
{
//Do whatever you want to do there!
}

void respawn1(string &in asName, int alCount)
{
AddEntityCollideCallback("Player", "deadarea", "deadarea", true, 0);
}
yea thanks for all the help i know it really but the Collapsing Sence is AsTimer so that will be Shitloads works i will do it.