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
[SOLVED] How to use areas to kill monsters/poof them?
Strembitsky Offline
Senior Member

Posts: 254
Threads: 37
Joined: Feb 2012
Reputation: 3
#3
RE: How to use areas to kill monsters/poof them?

(02-04-2012, 11:01 PM)Elven Wrote: Make area. Use this:
void AddEntityCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates);


Calls a function when two entites collide.

Callback syntax: void MyFunc(string &in asParent, string &in asChild, int alState)

alState: 1 = enter, -1 = leave



asParentName - internal name of main object

asChildName - internal name of object that collides with main object (asterix (*) NOT supported!)

asFunction - function to call

abDeleteOnCollide - determines whether the callback after it was called

alStates - 1 = only enter, -1 = only leave, 0 = both
Then into response use one of those:
void SetEnemyIsHallucination(string& asName, bool abX);


Makes an enemy a hallucination. Hallucinations fade to smoke when they get near the player.

void FadeEnemyToSmoke(string& asName, bool abPlaySound);


Instantly fades an enemy to smoke.
Thanks. I am somewhat familiar with scripting, but I am unsure what I am supposed to copy and paste in your lines of code, and what I am supposed to change. Do I only copy and paste what you have given me?
02-04-2012, 11:04 PM
Find


Messages In This Thread
RE: How to use areas to kill monsters/poof them? - by Strembitsky - 02-04-2012, 11:04 PM



Users browsing this thread: 1 Guest(s)