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
Enemy hallucinate event
User01 Offline
Member

Posts: 97
Threads: 30
Joined: Feb 2013
Reputation: 0
#1
Enemy hallucinate event

Hi

I'm trying to check wheter an enemy disappears by hallucination.
GetEntityExists doesn't seems to work, the entity might be still active after the vanish.
I did something like this:
PHP Code: (Select All)
void enemy(string &in asTimer)
{
stuff
if (GetEntityExists("enemy") == false)
{
stuff
 
}
  } 
Nothing happens.
I don't know how GetEnemyStateName should work.
11-24-2017, 09:17 PM
Find
User01 Offline
Member

Posts: 97
Threads: 30
Joined: Feb 2013
Reputation: 0
#2
RE: Enemy hallucinate event

Anyone?
12-03-2017, 03:43 PM
Find
Red Offline
Posting Freak

Posts: 1,757
Threads: 49
Joined: Feb 2012
Reputation: 54
#3
RE: Enemy hallucinate event

The function only appears to be meant to check if the entity is active. Not the other way around, strangely.

EDIT: If you want something to happen if the enemy disables, use the "OnAutoDisable" function. That's the furthest thing I can come up with.
(This post was last modified: 12-03-2017, 10:28 PM by Red.)
12-03-2017, 10:23 PM
Find
Darkfire Offline
Senior Member

Posts: 371
Threads: 22
Joined: May 2014
Reputation: 15
#4
RE: Enemy hallucinate event

You could mathematically count the distance between the Player and the monster by using looping timers, GetEntityPosition and GetPlayerPosition (and Pythagorean Theorem), I guess you could skip the Y dimension for simplicity.

Then call SetEnemyIsHallucination or FadeEnemyToSmoke when it gets too close, and at the same time change a GlobalVariable, which would serve as an indicator of the fact whether the enemy is faded to smoke.

It's kind of an overshot for the effect you need, but I'm 99% sure it would work.

12-04-2017, 10:37 PM
Find




Users browsing this thread: 1 Guest(s)