View Single Post
Old 10-26-2012, 07:18 PM   #257
Senior Member
JCarter426's Avatar
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,668
Originally Posted by Fallen Guardian View Post
I don't believe so, only NWScript-defined animations can be played via a script in K1.
That's unfortunate... but expected. Oh well.
Originally Posted by Darth Hayze View Post
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

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"
Another thing you can do is create a subroutine. The benefit of this is you can keep everything in one script, though in certain cases ExecuteScript works better. So, for example:
void SpawnNPC(int iNPC, location lLocation) {

SpawnAvailableNPC(iNPC, lLocation);


void main() {

DelayCommand(0.4, SpawnNPC(11, GetLocation(GetWaypointByTag("WP_ebon_atton"))));

Haven't tested it, but it should work. Theoretically.

JCarter426 is offline   you may: quote & reply,