|
Lurker
Join Date: Oct 2012
Posts: 7
Current Game: Revenge of Revan
|
Okay, I'm trying to compile this script with a lot of DelayCommand functions, most of them work fine, but the ones that are like this
Code:
DelayCommand(0.4, SpawnAvailableNPC(11, GetLocation(GetWaypointByTag("WP_ebon_atton"))));
i.e. spawning a NPC
return this error when compiling "Error: Type mismatch in parameter 2 in call to Delay Command"
at first I thought it might be becuase the problem commands are within if statements, but moving them outside the statement still gives the error. There are other DelayCommands used in this script, and they aren't giving me this error. What gives?
Code:
void main() {
SetGlobalFadeOut(0.0, 0.0, 0.0, 0.0, 0.0);
NoClicksFor(2.0);
object oKreia = GetObjectByTag("Kreia", 0);
object oHandmaiden = GetObjectByTag("Handmaiden", 0);
object oVisasMarr = GetObjectByTag("VisasMarr", 0);
AssignCommand(GetObjectByTag("hologram", 0), ActionPlayAnimation(204, 1.0, 0.0));
DelayCommand(0.2, DestroyObject(oKreia, 0.0, 0, 0.0, 0));
DelayCommand(0.2, DestroyObject(oVisasMarr, 0.0, 0, 0.0, 0));
DelayCommand(0.2, DestroyObject(oHandmaiden, 0.0, 0, 0.0, 0));
//
if (IsAvailableCreature(4)) {
DelayCommand(0.4, SpawnAvailableNPC(4, GetLocation(GetWaypointByTag("WP_ebon_brianna"))));
DelayCommand(0.4, CreateObject(1, "oKreia", GetLocation(GetObjectByTag("WP_ebon_kreia", 0))));
DelayCommand(0.4, SpawnAvailableNPC(9, GetLocation(GetObjectByTag("WP_ebon_visas", 0))));
DelayCommand(0.4, SpawnAvailableNPC(0, GetLocation(GetObjectByTag("WP_ebon_atton", 0))));
}
else
if (IsAvailableCreature(11)) {
DelayCommand(0.4, SpawnAvailableNPC(11, GetLocation(GetWaypointByTag("WP_ebon_atton"))));
DelayCommand(0.4, CreateObject(1, "oKreia", GetLocation(GetObjectByTag("WP_ebon_kreia", 0))));
DelayCommand(0.4, SpawnAvailableNPC(9, GetLocation(GetObjectByTag("WP_ebon_visas", 0))));
DelayCommand(0.4, oHandmaiden = CreateObject(1, "p_handmaiden", GetLocation(GetWaypointByTag("WP_ebon_hand")), 0));
DelayCommand(0.4, CreateObject(1, "p_sister", GetLocation(GetWaypointByTag("WP_ebon_sister1")), 0));
DelayCommand(0.4, CreateObject(1, "p_sister2", GetLocation(GetWaypointByTag("WP_ebon_sister2")), 0));
}
else {
DelayCommand(0.4, SpawnAvailableNPC(0, GetLocation(GetWaypointByTag("WP_ebon_atton"))));
DelayCommand(0.4, CreateObject(1, "oKreia", GetLocation(GetObjectByTag("WP_ebon_kreia", 0))));
DelayCommand(0.4, SpawnAvailableNPC(9, GetLocation(GetObjectByTag("WP_ebon_visas", 0))));
DelayCommand(0.4, oHandmaiden = CreateObject(1, "p_handmaiden", GetLocation(GetWaypointByTag("WP_ebon_hand")), 0));
DelayCommand(0.4, CreateObject(1, "p_sister", GetLocation(GetWaypointByTag("WP_ebon_sister1")), 0));
DelayCommand(0.4, CreateObject(1, "p_sister2", GetLocation(GetWaypointByTag("WP_ebon_sister2")), 0));
}
DelayCommand(0.5, AssignCommand(GetObjectByTag("Kreia", 0), SetFacingPoint(GetPosition(GetObjectByTag("hologram", 0)))));
DelayCommand(0.5, AssignCommand(GetObjectByTag("Atton", 0), SetFacingPoint(GetPosition(GetObjectByTag("hologram", 0)))));
DelayCommand(0.5, AssignCommand(GetObjectByTag("Sister1", 0), SetFacingPoint(GetPosition(GetObjectByTag("hologram", 0)))));
DelayCommand(0.5, AssignCommand(GetObjectByTag("Sister2", 0), SetFacingPoint(GetPosition(GetObjectByTag("hologram", 0)))));
DelayCommand(0.5, AssignCommand(GetObjectByTag("Handmaiden", 0), SetFacingPoint(GetPosition(GetObjectByTag("hologram", 0)))));
DelayCommand(0.5, AssignCommand(GetObjectByTag("Visas", 0), SetFacingPoint(GetPosition(GetObjectByTag("hologram", 0)))));
DelayCommand(0.5, AssignCommand(GetObjectByTag("Disciple", 0), SetFacingPoint(GetPosition(GetObjectByTag("hologram", 0)))));
DelayCommand(0.6, AssignCommand(oKreia, ActionStartConversation(GetPCSpeaker(), "pcdead", 0, 0, 0, "", "", "", "", "", "", 0, 0xFFFFFFFF, 0xFFFFFFFF, 0)));
}
|