Trex Posted May 1, 2012 Share Posted May 1, 2012 Simple question. What's wrong with this script that I'm not seeing? void main() { DelayCommand(6.5, CreateObject(OBJECT_TYPE_CREATURE, "wav6v4", Location(Vector(39.5,-9.3,0.2), 2.3))); } Link to comment Share on other sites More sharing options...
Fastmaniac Posted May 1, 2012 Share Posted May 1, 2012 DelayCommand only works with Actions. I mean functions like ActionJumpToLocation, etc.: // 7: Delay aActionToDelay by fSeconds. // * No return value, but if an error occurs, the log file will contain // "DelayCommand failed.". void DelayCommand(float fSeconds, action aActionToDelay); I'd suggest using ActionWait(seconds); Link to comment Share on other sites More sharing options...
Fallen Guardian Posted May 2, 2012 Share Posted May 2, 2012 If you don't want to use the Wait function you could always just make a separate script that fires this script through the ExecuteScript function, and then put a delay on the execute script command. Link to comment Share on other sites More sharing options...
Trex Posted May 3, 2012 Author Share Posted May 3, 2012 Thanks for the help. I ended up going with Fallen Guardian's sugeestion of executescript and it works perfectly. For the purposes of those finding this thread in the future, you need two scripts. First script should looks somthing like this: void main(){ DelayCommand(1.0, ExecuteScript("spawnr1v1", OBJECT_SELF)); } Second script, named in this case spawn1v1.ncs : void main() { CreateObject(OBJECT_TYPE_CREATURE, "wav1v1", Location(Vector(39.5,-9.3,0.2), 2.3)); CreateObject(OBJECT_TYPE_CREATURE, "wav1v2", Location(Vector(39.5,-9.3,0.2), 2.3)); CreateObject(OBJECT_TYPE_CREATURE, "wav1v3", Location(Vector(39.5,-9.3,0.2), 2.3)); } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.