hi
i just have a quick question. i want to run a cutscene after a certain group of enemies is dead. now i know you use the event_team_destroyed function and i have done that on put it in the module script but it seems to do nothing. I am wondering where do i put the script for it to detect a team is dead.
note the team is not in the first room of the level.
also i am wondering how do i spawn a specfic type of new creature in the same room.
if you know the syntax used please reply
best regards
bassline204
running scripts after team is dead
Débuté par
Bassline204
, avril 22 2011 09:41
#1
Posté 22 avril 2011 - 09:41
#2
Posté 22 avril 2011 - 01:22
I think team_destroyed belongs in the area script.
#3
Posté 23 avril 2011 - 05:44
Yes, you need something like this in the area script:
An easy and efficient way of spawning a new creature is to place it in the area from the outset, but make it inactive. Use SetObjectActive in the appropriate script when you want it to appear.
You can also use CreateObject to spawn creatures dynamically, but this is less efficient, and may cause engine stagger if over-used.
case EVENT_TYPE_TEAM_DESTROYED:
{
int nTeam = GetEventInteger(ev, 0); // the team number that was destroyed
// etc
}
An easy and efficient way of spawning a new creature is to place it in the area from the outset, but make it inactive. Use SetObjectActive in the appropriate script when you want it to appear.
You can also use CreateObject to spawn creatures dynamically, but this is less efficient, and may cause engine stagger if over-used.
Modifié par Proleric1, 23 avril 2011 - 05:45 .





Retour en haut






