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 Despawn
XeOnTricks Offline
Junior Member

Posts: 27
Threads: 12
Joined: Feb 2017
Reputation: 0
#1
monster Despawn

as i was creating my custom story i was trying to figure out how to stop a monster from disappearing after a player dies. can someone give my a script or tell me what i need to do?
02-26-2017, 05:35 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: monster Despawn

Before the player dies, you must set a checkpoint

PHP Code: (Select All)
CheckPoint (stringasNamestringasStartPosstringasCallbackstringasDeathHintCatstringasDeathHintEntry); 

Here you specify at what StartPos the player is going to respawn, and you also specify a callback. You're going to use this callback to set the enemy active again. I'm not sure whether you have to place a secondary inactive enemy that you're going to set active, or if you can use the first one.
You're going to have to experiment with that.

The syntax for the checkpoint callback is

PHP Code: (Select All)
void MyFunc(string &in asNameint alCount

Trying is the first step to success.
02-26-2017, 01:41 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#3
RE: monster Despawn

You can use SetEntityActive on the original monsters and they will spawn again in the original position after death (I was actually surprised about this when I found out).

02-26-2017, 07:04 PM
Find
XeOnTricks Offline
Junior Member

Posts: 27
Threads: 12
Joined: Feb 2017
Reputation: 0
#4
RE: monster Despawn

okay thank you! Smile
02-27-2017, 04:21 AM
Find




Users browsing this thread: 1 Guest(s)