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
Prevent monsters from expiring
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#1
Prevent monsters from expiring

After some testing i realized that monsters tend to automatically expire when the user is at a certain distance after having come near the area where the monster is at. This is undesirable for my custom story. Is it possible to have the monster's life exist "forever"?

Tutorials: From Noob to Pro
08-01-2011, 08:15 AM
Website Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Prevent monsters from expiring

My current workaround is constantly activating the monster entity, but i'm hoping to find a better way of keeping the monster alive. I am not sure what the consequences of constantly setting the entity to an active state are.

Tutorials: From Noob to Pro
08-01-2011, 05:46 PM
Website Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#3
RE: Prevent monsters from expiring

If they have no patrol path and are too far from the player they de-activate. To counter this, have it repeatedly being re-assigned a patrol path by using collide callbacks with areas.

08-01-2011, 05:48 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Prevent monsters from expiring

(08-01-2011, 05:48 PM)palistov Wrote: If they have no patrol path and are too far from the player they de-activate. To counter this, have it repeatedly being re-assigned a patrol path by using collide callbacks with areas.
So even though the function has the word "patrol" in it, the path node gets automatically removed from the monster's, uh, "destination memory" upon reaching the point?

Tutorials: From Noob to Pro
(This post was last modified: 08-01-2011, 06:13 PM by Your Computer.)
08-01-2011, 06:12 PM
Website Find
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#5
RE: Prevent monsters from expiring

a decent solution is to click on your monster, then look at the callbacks. Then use the first callback (i think its just called callback) then add a function in your hps

void Callback(string &in asEntity , string &in asType)
{
if(asType=="AutoDisable"){
SetEntityActive("Monster" , true);
}
}

The description tells you what 'asType' can be, but i cant remember it's exact name.

This will just spawn the monster if it's disabled. Maybe go into the model editor and remove the enabled sound if it plays too often

(This post was last modified: 08-01-2011, 07:14 PM by DRedshot.)
08-01-2011, 07:13 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#6
RE: Prevent monsters from expiring

(08-01-2011, 07:13 PM)DRedshot Wrote: a decent solution is to click on your monster, then look at the callbacks. Then use the first callback (i think its just called callback) then add a function in your hps
This appears to be causing performance issues for me, cutting my frames in half. Apparently, as the debugging messages (that scroll to the top of the screen) imply, the monster is being automatically disabled constantly. It seems i'm going to have to deal with collisions.

Tutorials: From Noob to Pro
08-01-2011, 08:31 PM
Website Find




Users browsing this thread: 1 Guest(s)