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
Repeat monster
Karai16 Offline
Member

Posts: 164
Threads: 24
Joined: Apr 2011
Reputation: 0
#1
Repeat monster

And yet again it's time for Rairai's Question Hour! In today's episode, I have to ask you:
How do you let a monster respawn?
I'll explain the situation: I at one moment let a monster spawn which will break the door ahead of you, so that you can progress. It is, however, also so that the monster will chase after the player, and potentialy kill him. If this happens before the monster breaks the door, you'll respawn, to find yourself monsterless, and with the door you need to go to, still firmly locked.
is there a way I can reuse the monster + scriptarea, so that it'll spawn a second time, if the player has died too early?

note: disabling triggers for the monster is not an option, for it'll ruin the scare.

Custom stories:
Her Games (100% Complete)
Her Games, All Bugs Fixed (100% Complete)
06-18-2011, 10:30 PM
Find
Nye Offline
Senior Member

Posts: 250
Threads: 8
Joined: Jan 2011
Reputation: 2
#2
RE: Repeat monster

Maybe set a checkpoint, and create a callback to a procedure that will set the grunt active (or an a timer)

CheckPoint(string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);

Alternatively, just create a collide area, that isn't destroyed when the player crosses it; so the player can cross it again after they have died and respawn the monster.

(This post was last modified: 06-18-2011, 10:44 PM by Nye.)
06-18-2011, 10:42 PM
Find
Karai16 Offline
Member

Posts: 164
Threads: 24
Joined: Apr 2011
Reputation: 0
#3
RE: Repeat monster

(06-18-2011, 10:42 PM)Nye Wrote: Maybe set a checkpoint, and create a callback to a procedure that will set the grunt active (or an a timer)

CheckPoint(string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);

Alternatively, just create a collide area, that isn't destroyed when the player crosses it; so the player can cross it again after they have died and respawn the monster.

god I feel dumb now, I have no idea of to make/use both of your suggestions v.v

Custom stories:
Her Games (100% Complete)
Her Games, All Bugs Fixed (100% Complete)
06-18-2011, 10:54 PM
Find
Nye Offline
Senior Member

Posts: 250
Threads: 8
Joined: Jan 2011
Reputation: 2
#4
RE: Repeat monster

Someone else can explain, I'm on my phone xD

06-18-2011, 10:56 PM
Find
DamnNoHtml Offline
Senior Member

Posts: 469
Threads: 34
Joined: Sep 2010
Reputation: 16
#5
RE: Repeat monster

(06-18-2011, 10:54 PM)Karai16 Wrote:
(06-18-2011, 10:42 PM)Nye Wrote: Maybe set a checkpoint, and create a callback to a procedure that will set the grunt active (or an a timer)

CheckPoint(string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);

Alternatively, just create a collide area, that isn't destroyed when the player crosses it; so the player can cross it again after they have died and respawn the monster.

god I feel dumb now, I have no idea of to make/use both of your suggestions v.v


I'm assuming you know how to use the Entity Collide callback. Make the auto-remove true. In your OnStart() add:

CheckPoint("", "StartPosition", "Reset", "", "");

Then, somewhere outside of your OnStart(), add:

void Reset (string &in asName, int alCount)
{
          //The same collide callback goes here
}


Basically all this does is check when you die, respawns you at StartPosition and runs the function Reset. Inside Reset, is a simple line that re-adds an EntityCollideCallback so that it will function again but only after you die.

Creator of Wake, Through the Portal, Insomnia, and Cycles What to do with HPL3....
(This post was last modified: 06-19-2011, 12:00 AM by DamnNoHtml.)
06-18-2011, 11:59 PM
Find
Russ Money Offline
Senior Member

Posts: 360
Threads: 25
Joined: Dec 2010
Reputation: 4
#6
RE: Repeat monster

(06-18-2011, 10:56 PM)Nye Wrote: Someone else can explain, I'm on my phone xD

Nye, quit calling me!

06-19-2011, 12:15 AM
Find
Nye Offline
Senior Member

Posts: 250
Threads: 8
Joined: Jan 2011
Reputation: 2
#7
RE: Repeat monster

(06-19-2011, 12:15 AM)Russ Money Wrote:
(06-18-2011, 10:56 PM)Nye Wrote: Someone else can explain, I'm on my phone xD

Nye, quit calling me!

Shhhhhhhh

06-19-2011, 03:01 AM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#8
RE: Repeat monster

They're sexting....
06-19-2011, 12:38 PM
Find




Users browsing this thread: 1 Guest(s)