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
Monster spawn again after die
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#7
RE: Monster spawn again after die

There is no problem with the extra_english.lang file. Make sure you used the option "NoteText" when you select a note, not the name.
For the respawn monster part:
I'll give you an example script:
PHP Code: (Select All)
void OnStart()
{
 
AddEntityCollideCallback("Player""SCRIPT_AREA_NAME_HERE""SpawnMonster"false1);
//The false makes it so the callback won't get removed once triggered
}
void SpawnMonster(string &in asParentstring &in asChildint alState)
{
SetEntityActive("ENEMY_NAME_HERE"true);
//All the path nodes go here!
AddEnemyPatrolNode("ENEMY_NAME_HERE""PathNodeArea_1"0"");
AddEnemyPatrolNode("ENEMY_NAME_HERE""PathNodeArea_2"0"");
AddEnemyPatrolNode("ENEMY_NAME_HERE""PathNodeArea_3"0"");

If you instead want the monster to stop reappearing after, let's say, 3 deaths, or you want the monster to appear RIGHT after you respawned instead of going through a script area first, you will have to do a bit more work that will include a Local Variable and/or the command
CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);
Might want to know that the monster WILL know your position and WILL run full speed towards you after he's set active again.
If you instead ment a way of reappearing like a patrolling grunt who is not supposed to know your position once spawned, you can try making a bunch of grunts set inactive at the same position, and at every death(checkpoint command used)you set a variable higher by 1 and the enemy_variable will be set active. I think 5 should be the max, I don't think anyone would fail 5 times there. And if someone does, you can add a troll message like "the enemy will no longer appear, because you suck too much to avoid it" or something.

Think, before you speak Google, before you post
(This post was last modified: 07-08-2012, 07:42 PM by Cruzore.)
07-08-2012, 07:31 PM
Find


Messages In This Thread
Monster spawn again after die - by ooadrianoo - 07-08-2012, 06:19 PM
RE: Monster spawn again after die - by Cruzore - 07-08-2012, 06:26 PM
RE: Monster spawn again after die - by Cruzore - 07-08-2012, 06:39 PM
RE: Monster spawn again after die - by ooadrianoo - 07-08-2012, 07:19 PM
RE: Monster spawn again after die - by ApeCake - 07-08-2012, 07:26 PM
RE: Monster spawn again after die - by Cruzore - 07-08-2012, 07:31 PM
RE: Monster spawn again after die - by ooadrianoo - 07-08-2012, 08:30 PM
RE: Monster spawn again after die - by Cruzore - 07-08-2012, 08:56 PM
RE: Monster spawn again after die - by ooadrianoo - 07-08-2012, 09:11 PM
RE: Monster spawn again after die - by Cruzore - 07-08-2012, 09:22 PM
RE: Monster spawn again after die - by ooadrianoo - 07-08-2012, 09:30 PM



Users browsing this thread: 1 Guest(s)