08-23-2011, 04:03 PM
08-23-2011, 04:05 PM
2 ways mostly.
a) When this is last node monster to be and wait time is over, it should disappear automatically. I think player can't be very close then or shouldn't see him.
b) script it ^^
a) When this is last node monster to be and wait time is over, it should disappear automatically. I think player can't be very close then or shouldn't see him.
b) script it ^^
08-23-2011, 04:23 PM
(08-23-2011, 04:05 PM)Elven Wrote: [ -> ]2 ways mostly.
a) When this is last node monster to be and wait time is over, it should disappear automatically. I think player can't be very close then or shouldn't see him.
b) script it ^^
Umm. I'm asking how you script it :LL
08-23-2011, 04:26 PM
Put a script area over the node. Then put an AddEntityCallback that checks for the grunt. If he crosses it, make him deactivate.
08-23-2011, 04:28 PM
Oh that is easy. Everything is in your bible
Create script area where ur last node point is. And name it for example "monsterdisappear".
Add this into ur OnStart
AddEntityCollideCallback("MyNameIsBob_1", "monsterdisappear", "makemedisappear", true, 1);
and separately:
void makemedisappear(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("MyNameIsBob_1, true/false); //true if u want to play sound effect and false if not.
SetEntityActive("MyNameIsBob_1, false); //Its up to you which one you use. Second one instantly deletes it. First one makes it go into smoke with effect ^^
}
Create script area where ur last node point is. And name it for example "monsterdisappear".
Add this into ur OnStart
AddEntityCollideCallback("MyNameIsBob_1", "monsterdisappear", "makemedisappear", true, 1);
and separately:
void makemedisappear(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("MyNameIsBob_1, true/false); //true if u want to play sound effect and false if not.
SetEntityActive("MyNameIsBob_1, false); //Its up to you which one you use. Second one instantly deletes it. First one makes it go into smoke with effect ^^
}
08-23-2011, 04:50 PM
(08-23-2011, 04:28 PM)Elven Wrote: [ -> ]Oh that is easy. Everything is in your bible
Create script area where ur last node point is. And name it for example "monsterdisappear".
Add this into ur OnStart
AddEntityCollideCallback("MyNameIsBob_1", "monsterdisappear", "makemedisappear", true, 1);
and separately:
void makemedisappear(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("MyNameIsBob_1, true/false); //true if u want to play sound effect and false if not.
SetEntityActive("MyNameIsBob_1, false); //Its up to you which one you use. Second one instantly deletes it. First one makes it go into smoke with effect ^^
}
But what if I activate the trigger while the monster isn't active?
08-23-2011, 04:54 PM
"MyNameIsBob_1" in AddEntityCollideCallback means that only the grunt will activate the script area, the player won't.
08-23-2011, 06:00 PM
Basically it works anyway, but only when grunt goes inside it happens. Since grunt isnt active, it cant go inside - aka it wont work ^^
08-23-2011, 06:01 PM
Its like that the area is only going to activated when the grunt will walk/run into it.
bad part is if the player some how tricks the monster and runs behind the area and the monsters is chasing him his going to get deactivaded.
bad part is if the player some how tricks the monster and runs behind the area and the monsters is chasing him his going to get deactivaded.