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
Enemy respawn?
Kirbypwnage Offline
Junior Member

Posts: 46
Threads: 4
Joined: Feb 2013
Reputation: 1
#14
RE: Enemy respawn?

(02-23-2013, 06:38 PM)Smoke Wrote:
(02-23-2013, 06:18 PM)Kirbypwnage Wrote:
(02-23-2013, 03:57 PM)tonitoni1998 Wrote: Thats why you need the cache. You save the map as it is and load it. I did not try that yet but thats my idea of it

Sounds like it should work, but I have no idea how to use the cache.

(02-23-2013, 03:52 PM)Smoke Wrote: Could you give us the script?

Of course. Sorry I didn't post that to start with. This is the checkpoint script, inside a function.

void Monsterfunction(string &in asParent, string &in asChild, int alState)
{
CheckPoint("checkpoint", "PlayerStartArea_2", "Monsterfunction", "Messages", "monsterhint");
SetMessage("Messages", "henrytalk4", 0);
SetEntityActive("floyd", true);
SetEntityActive("charles", true);
}

I mean your total script.

My total script for the whole map? Well... Okay. I dunno why you need the whole thing though.

But here it is:

void OnStart()
{
AutoSave();
SetPlayerMoveSpeedMul(1.0);
SetPlayerLookSpeedMul(1.0);
SetPlayerRunSpeedMul(1.0);
FadeIn(5.0f);
AddTimer("henrytalktimer", 5.0f, "Henrytalkfunction");
AddEntityCollideCallback("Player", "williammessage", "Williamfunction", true, 1);
AddEntityCollideCallback("Player", "henrytalk", "Henrytalk2function", true, 1);
AddEntityCollideCallback("Player", "henrytalk3", "Henrytalk3function", true, 1);
AddEntityCollideCallback("Player", "williammessage2", "Williamfunction2", true, 1);
AddEntityCollideCallback("Player", "monsters", "Monsterfunction", true, 1);
AddEntityCollideCallback("charles", "charlesbridge1", "Charlesbridgefunction1", true, 1);
AddEntityCollideCallback("charles", "charlesbridge2", "Charlesbridgefunction2", true, 1);
AddEntityCollideCallback("charles", "charlesfall1", "Charlesfallfunction1", true, 1);
AddEntityCollideCallback("charles", "charlesfall2", "Charlesfallfunction2", true, 1);
AddEntityCollideCallback("charles", "charlesdie", "Charlesdiefunction", true, 1);
AddEntityCollideCallback("floyd", "floydbridge1", "Floydbridgefunction1", true, 1);
AddEntityCollideCallback("floyd", "floydbridge2", "Floydbridgefunction2", true, 1);
AddEntityCollideCallback("floyd", "floydfall1", "Floydfallfunction1", true, 1);
AddEntityCollideCallback("floyd", "floydfall2", "Floydfallfunction2", true, 1);
AddEntityCollideCallback("floyd", "floyddie", "Floyddiefunction", true, 1);
AddEntityCollideCallback("Player", "williammessage3", "Williamfunction3", true, 1);
}
void Henrytalkfunction(string &in asTimer)
{
SetMessage("Messages", "henrytalk", 0);
SetPlayerActive(true);
}
void Williamfunction(string &in asParent, string &in asChild, int alState)
{
StartEffectEmotionFlash("Messages", "williammessage", "");
}
void Henrytalk2function(string &in asParent, string &in asChild, int alState)
{
SetMessage("Messages", "henrytalk2", 0);
}
void Henrytalk3function(string &in asParent, string &in asChild, int alState)
{
SetMessage("Messages", "henrytalk3", 0);
}
void Williamfunction2(string &in asParent, string &in asChild, int alState)
{
StartEffectEmotionFlash("Messages", "williammessage2", "");
}
void Monsterfunction(string &in asParent, string &in asChild, int alState)
{
CheckPoint("checkpoint", "PlayerStartArea_2", "Monsterfunction", "Messages", "monsterhint");
SetMessage("Messages", "henrytalk4", 0);
SetEntityActive("floyd", true);
SetEntityActive("charles", true);
}
void Charlesbridgefunction1(string &in asParent, string &in asChild, int alState)
{
AddEnemyPatrolNode("charles", "PathNodeArea_37", 0.001, "");
}
void Charlesbridgefunction2(string &in asParent, string &in asChild, int alState)
{
AddEnemyPatrolNode("charles", "PathNodeArea_38", 0.001, "");
}
void Charlesfallfunction1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("charlesblock", false);
SetEntityActive("beam1", false);
SetEntityActive("beam2", false);
PlaySoundAtEntity("", "explosion_rock_large", "Player", 0, false);
StartScreenShake(0.50f,0.50f, 0.50f,0.15f);
CreateParticleSystemAtEntity("break1_1", "ps_break_wood.ps", "beam2", true);
CreateParticleSystemAtEntity("break2_1", "ps_break_wood.ps", "beam1", true);
CreateParticleSystemAtEntity("break3_1", "ps_break_wood.ps", "beam1", true);
CreateParticleSystemAtEntity("break4_1", "ps_break_wood.ps", "beam2", true);
}
void Charlesfallfunction2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("charlesblock", false);
SetEntityActive("beam3", false);
SetEntityActive("beam4", false);
PlaySoundAtEntity("", "explosion_rock_large", "Player", 0, false);
StartScreenShake(0.50f,0.50f, 0.50f,0.15f);
CreateParticleSystemAtEntity("break1", "ps_break_wood.ps", "beam3", true);
CreateParticleSystemAtEntity("break2", "ps_break_wood.ps", "beam4", true);
CreateParticleSystemAtEntity("break3", "ps_break_wood.ps", "beam4", true);
CreateParticleSystemAtEntity("break4", "ps_break_wood.ps", "beam3", true);
}
void Charlesdiefunction(string &in asParent, string &in asChild, int alState)
{
SetMessage("Messages", "deadcharles", 0);
SetEntityActive("charles", false);
DestroyParticleSystem("charlesspark1");
DestroyParticleSystem("charlesspark2");
DestroyParticleSystem("charlesspark3");
}
void Floydbridgefunction1(string &in asParent, string &in asChild, int alState)
{
AddEnemyPatrolNode("floyd", "PathNodeArea_37", 0.001, "");
}
void Floydbridgefunction2(string &in asParent, string &in asChild, int alState)
{
AddEnemyPatrolNode("floyd", "PathNodeArea_38", 0.001, "");
}
void Floydfallfunction1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("floydblock", false);
SetEntityActive("beam1", false);
SetEntityActive("beam2", false);
PlaySoundAtEntity("", "explosion_rock_large", "Player", 0, false);
StartScreenShake(0.50f,0.50f, 0.50f,0.15f);
CreateParticleSystemAtEntity("break1_1", "ps_break_wood.ps", "beam2", true);
CreateParticleSystemAtEntity("break2_1", "ps_break_wood.ps", "beam1", true);
CreateParticleSystemAtEntity("break3_1", "ps_break_wood.ps", "beam1", true);
CreateParticleSystemAtEntity("break4_1", "ps_break_wood.ps", "beam2", true);
}
void Floydfallfunction2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("floydblock", false);
SetEntityActive("beam3", false);
SetEntityActive("beam4", false);
PlaySoundAtEntity("", "explosion_rock_large", "Player", 0, false);
StartScreenShake(0.50f,0.50f, 0.50f,0.15f);
CreateParticleSystemAtEntity("break1", "ps_break_wood.ps", "beam3", true);
CreateParticleSystemAtEntity("break2", "ps_break_wood.ps", "beam4", true);
CreateParticleSystemAtEntity("break3", "ps_break_wood.ps", "beam4", true);
CreateParticleSystemAtEntity("break4", "ps_break_wood.ps", "beam3", true);
}
void Floyddiefunction(string &in asParent, string &in asChild, int alState)
{
SetMessage("Messages", "deadfloyd", 0);
SetEntityActive("floyd", false);
DestroyParticleSystem("floydspark1");
DestroyParticleSystem("floydspark2");
DestroyParticleSystem("floydspark3");
}
void Williamfunction3(string &in asParent, string &in asChild, int alState)
{
StartEffectEmotionFlash("Messages", "williammessage3", "");
}
//===========================================
// This runs when the player leaves the map
void OnLeave()
{
}

Currently working on:
Archedale Castle: Cold Hunger
http://www.moddb.com/mods/archedale-castle
02-23-2013, 06:59 PM
Find


Messages In This Thread
Enemy respawn? - by Kirbypwnage - 02-23-2013, 02:13 PM
RE: Enemy respawn? - by PutraenusAlivius - 02-23-2013, 02:31 PM
RE: Enemy respawn? - by Kirbypwnage - 02-23-2013, 02:35 PM
RE: Enemy respawn? - by tonitoni1998 - 02-23-2013, 02:47 PM
RE: Enemy respawn? - by Kirbypwnage - 02-23-2013, 02:50 PM
RE: Enemy respawn? - by OriginalUsername - 02-23-2013, 02:56 PM
RE: Enemy respawn? - by Kirbypwnage - 02-23-2013, 02:59 PM
RE: Enemy respawn? - by OriginalUsername - 02-23-2013, 03:14 PM
RE: Enemy respawn? - by Kirbypwnage - 02-23-2013, 03:38 PM
RE: Enemy respawn? - by OriginalUsername - 02-23-2013, 03:52 PM
RE: Enemy respawn? - by tonitoni1998 - 02-23-2013, 03:57 PM
RE: Enemy respawn? - by Kirbypwnage - 02-23-2013, 06:18 PM
RE: Enemy respawn? - by OriginalUsername - 02-23-2013, 06:38 PM
RE: Enemy respawn? - by Kirbypwnage - 02-23-2013, 06:59 PM
RE: Enemy respawn? - by tonitoni1998 - 02-23-2013, 07:36 PM
RE: Enemy respawn? - by Kirbypwnage - 02-23-2013, 07:39 PM
RE: Enemy respawn? - by tonitoni1998 - 02-23-2013, 08:02 PM
RE: Enemy respawn? - by OriginalUsername - 02-23-2013, 08:19 PM
RE: Enemy respawn? - by Kirbypwnage - 02-24-2013, 11:48 AM
RE: Enemy respawn? - by PutraenusAlivius - 02-24-2013, 12:22 PM
RE: Enemy respawn? - by OriginalUsername - 02-24-2013, 01:35 PM
RE: Enemy respawn? - by Kirbypwnage - 02-24-2013, 02:34 PM
RE: Enemy respawn? - by OriginalUsername - 02-24-2013, 05:49 PM



Users browsing this thread: 1 Guest(s)