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
ooadrianoo Offline
Member

Posts: 82
Threads: 29
Joined: Apr 2012
Reputation: 0
#1
Monster spawn again after die

How can I script that the monster(s) spawn again after I die?

And one more question: How can a monster fall after a few seconds into dust?
(This post was last modified: 07-08-2012, 06:22 PM by ooadrianoo.)
07-08-2012, 06:19 PM
Find
Cruzore Offline
Senior Member

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

void FadeEnemyToSmoke(string& asName, bool abPlaySound);

Instantly fades an enemy to smoke.
For the first question, instead of deleting the callback after used, set it to false so it doesn't...

Think, before you speak Google, before you post
07-08-2012, 06:26 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#3
RE: Monster spawn again after die

You can't respawn monsters that kill you.

Tutorials: From Noob to Pro
07-08-2012, 06:29 PM
Website Find
Cruzore Offline
Senior Member

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

It does work some way. The monster will get spawned at the position in the level editor again, but I think the monster will then know your position and run towards you. Set the callback that sets the enemy Entity active false at the part where it deletes once activated.

Think, before you speak Google, before you post
07-08-2012, 06:39 PM
Find
ooadrianoo Offline
Member

Posts: 82
Threads: 29
Joined: Apr 2012
Reputation: 0
#5
RE: Monster spawn again after die

OK
Make a monster to dust is checked.
But I still not understand how to respawn a monster after a die.
--------------
New problem [problems over problems -.-] my extra_english.lang file doesn`t work.
<LANGUAGE>
<CATEGORY Name="My map">
<Entry Name="Description">My description</Entry>
</CATEGORY>
<CATEGORY Name="Journal">
    <Entry Name="Note_Hinweis1_Name">Welcome to my Mansion</Entry>
    <Entry Name="Note_Hinweis1_Text"Search the keys for the next room.[br]Have fun! MUHAHAHA</Entry>
    <Entry Name="Note_Hinweis2_Name">Advice</Entry>
    <Entry Name="Note_Hinweis2_Text">Use it to open the leveldoor</Entry>
    <Entry Name="Note_Hinweis3_Name">...</Entry>
    <Entry Name="Note_Hinweis3_Text">I hope you now what to do!</Entry>
</CATEGORY>
</LANGUAGE>
"Hinweis" is german and means clue.
I can`t read the clues in my custom story. There is not a text.
I used to try a sign, too, but it didn`t work.
07-08-2012, 07:19 PM
Find
ApeCake Offline
Member

Posts: 116
Threads: 20
Joined: Jun 2012
Reputation: 4
#6
RE: Monster spawn again after die

I am not sure about the monster - you could maybe edit it's setting in the Model Editor and perhaps change it so it doesn't despawn when you are dead? And about the .lang you have there, try adding <RESOURCES></RESOURCES>.

Don't put anything between the RESOURCES, just put it in the .lang, but make sure you paste it inside <LANGUAGE> </LANGUAGE>. Or try this;
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">My Description.</Entry>
</CATEGORY>
put that there INSTEAD of
<CATEGORY Name="My map">
<Entry Name="Description">My description</Entry>
</CATEGORY>

I think this is the problem. Hopefully that works.
Viel Glück und Spaß!
(This post was last modified: 07-08-2012, 07:28 PM by ApeCake.)
07-08-2012, 07:26 PM
Find
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
ooadrianoo Offline
Member

Posts: 82
Threads: 29
Joined: Apr 2012
Reputation: 0
#8
RE: Monster spawn again after die

The monster spawns again THX
But the extra_english.lang file still doesn´t work.
Yes I have EXACTLY the same name as the name in NoteText.
And there is not a description to my story :S
(This post was last modified: 07-08-2012, 08:45 PM by ooadrianoo.)
07-08-2012, 08:30 PM
Find
Cruzore Offline
Senior Member

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

<CATEGORY Name="My map">
< Entry Name="Description">My description</Entry>
Category name for the description must always be CustomStoryMain
so it's
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">My description</Entry>

Think, before you speak Google, before you post
07-08-2012, 08:56 PM
Find
ooadrianoo Offline
Member

Posts: 82
Threads: 29
Joined: Apr 2012
Reputation: 0
#10
RE: Monster spawn again after die

(07-08-2012, 08:56 PM)FastHunteR Wrote: < Entry Name="Description">My description

Category name for the description must always be CustomStoryMain

so it's



My description



It works. But if I insert
<CATEGORY Name="Journal">
    <Entry Name="Note_Hinweis1_Name">Welcome to my Mansion</Entry>
    <Entry Name="Note_Hinweis1_Text"Search the keys for the next room.[br]Have fun! MUHAHAHA</Entry>
    <Entry Name="Note_Hinweis2_Name">Advice</Entry>
    <Entry Name="Note_Hinweis2_Text">Use it to open the leveldoor</Entry>
    <Entry Name="Note_Hinweis3_Name">...</Entry>
    <Entry Name="Note_Hinweis3_Text">I hope you now what to do!</Entry>
    </CATEGORY>
between </CATEGORY> and </LANGUAGE> The lang file doesn´t work.
07-08-2012, 09:11 PM
Find




Users browsing this thread: 1 Guest(s)