![]() |
Now I have a question.
I am finally nearing the stage where the first village of my module is completed; I have only one quest left to add before I can move on to new areas. This one gives me some trouble though. The problem is that I can't figure out how to delay things in a script. Actions I can do, of course, and I can make creatures and conversations pause. But I've no idea how to delay an object's creation, a creature's spawning or a journal entry update. So far, I've been working around the problem by only updating the journal through conversations, keeping creatures in a waiting room and simply delaying the action of their jumping to a waypoint, and creating items in other people's inventories and delaying the action of giving the item to the PC. Although it works, it is not what I want to see, and it takes far more time than it should. So my question, how do I make a simple script like this work: Quote:
It's annoying, even the far more limited WC3 editor has a command that pauses the execution of the script for a while. |
Quote:
I don't think there's a function to delay the script from moving further but a work-around is possible |
Never actually tried this specifically and I would have done it like you have, using DelayCommand...obviously it does not work here.
I'm not near the toolset right now but I can mess around with it later and see what I can find. I am sure there is a workaround to this and if I don't stumble upon it I can ask around and find someone who has...I'll let ya know. |
Try ActionCreate
See NWN Lexicon for more info: http://www.reapers.org/nwn/reference/ DelayCommand only works for Action* functions. You can also call user-defined events to fire, but thats a level of scripting I'm not at yet. [img]smile.gif[/img] |
Quote:
DelayCommand will work to conjure up a creature, here is an example from the NWN lexicon that is used to make skeletons out of a pile of bones in the OC. It is a heartbeat script, but if used with an invisble object that fires a destroy object on itself after it spawns its mob you can make it spawn once and the heartbeat script disappears with the invisble object. Quote:
|
It would appear that delaying the execution of another script does indeed work. Yay :D
Unfortunately, that means I'll have even more miniscripts lying about. But it's small price, I guess. Thanks everyone [img]smile.gif[/img] |
Well I see you seem to have it sorted but I did talk to a friend of mine and his advice read as follows :
Quote:
[ 06-10-2003, 09:39 PM: Message edited by: SpiritWarrior ] |
It's not just about creating objects, but doing other things like adding journal entries and the like as well. In any case, I'm happy with the delayed execute script. I've found an easy way to add all the small scripts into a larger one using LocalInts and if/else lines so there's very little standing in the way of my finishing the Greensville area (for now).
I'll have to upload the new version someday soon. |
The OC uses the OnAquireItem event handler to trigger journal entries when the character recieves an item.
AddJournalQuestEntry is the function that, well, adds a journal quest entry. Using this a journal entry can be fired by just about any script, like by a trigger or a monster dying, but I dont know if it can be delayed. Hope this helps...good luck! [img]smile.gif[/img] [ 06-11-2003, 05:46 AM: Message edited by: Chewbacca ] |
All times are GMT -4. The time now is 04:36 PM. |
Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved