It's time for me to look to the scripting gurus again for help.
In short, I need some help, (an example), on how a script should be written to give a player a TIMED quest. Should the player fail to complete the quest within the time limit, the quest will fail, & cannot be re-acquired.
I know that a lot of NwN2 scripts use the GUI to function properly, but I'm hoping to just use a "simple" script that will only post "floating text" above a player's head / chat window, that displays the quest timer in intervals, (i.e. 5 min. left, 2 min. left, 1 min. left, 30 sec. left, etc.).
MANY thanks to any / all suggestions!
-DotA
Timed Quest
Débuté par
Deus of the Apocalypse
, août 28 2010 09:13
#1
Posté 28 août 2010 - 09:13
#2
Posté 29 août 2010 - 01:09
First I believe you need to set the clock to run as true just like it was for MoTB. Do you have that running? If not, to get that started, it's just a matter of adding a line or two, or three to, I believe, mod's pcloaded event, and the mod's heartbeat. If you want to go that route, let us know and I'll look it up. Then we can work on the timed quest part.
If you don't want to do the clock part, I think it's possible to do what you want without it. Off hand, I would say a script is needed to activate the time quest by setting a variable. Then in the mod's heartbeat (or an area's heartbeat if the quest would take place only in that area), a script that checks to see if that variable has been set. If it has, then do a 'floating text' or however you want to do it, based on so many heartbeat cycles.
You would then need another script that would fire when the condition of the quest has been met. That could be as simple as changing the variable to a different variable.
When I have more time, I'll look into it further, unless someone else chimes in.
If you don't want to do the clock part, I think it's possible to do what you want without it. Off hand, I would say a script is needed to activate the time quest by setting a variable. Then in the mod's heartbeat (or an area's heartbeat if the quest would take place only in that area), a script that checks to see if that variable has been set. If it has, then do a 'floating text' or however you want to do it, based on so many heartbeat cycles.
You would then need another script that would fire when the condition of the quest has been met. That could be as simple as changing the variable to a different variable.
When I have more time, I'll look into it further, unless someone else chimes in.
#4
Posté 29 août 2010 - 08:36
Thanks for the "Timer" link Chaos. After looking at it, I believe that I've seen it once before in browsing the Vault, but completely forgot about it.
As for linking the timer to a quest... ya... I'll still need some help with that if you (Orion / Chaos), or anyone else, can help.
All links / script suggestions (examples) are GREATLY appreciated.
-DotA
As for linking the timer to a quest... ya... I'll still need some help with that if you (Orion / Chaos), or anyone else, can help.
All links / script suggestions (examples) are GREATLY appreciated.
-DotA
#5
Posté 29 août 2010 - 11:27
I was about to suggest the timer, but CW beat me to it. :-)
If you want long involved timed quests (e.g. ones which range over long periods) you're going to need some complicated(ish) scripting to do that, but for somehting like "kill the cultists before the ritual ends (i.e. ten minutes expires)" it should be just what you need.
I included a method of attaching a script which will fire when the timer expires. This means that all you need to do is write such a script which will do failure stuff (end the game, kill the player, release the demon, give an appropriate journal entry etc) and a script which will close the timer on success (e.g. an OnDeath script for the head cultist etc).
If you want long involved timed quests (e.g. ones which range over long periods) you're going to need some complicated(ish) scripting to do that, but for somehting like "kill the cultists before the ritual ends (i.e. ten minutes expires)" it should be just what you need.
I included a method of attaching a script which will fire when the timer expires. This means that all you need to do is write such a script which will do failure stuff (end the game, kill the player, release the demon, give an appropriate journal entry etc) and a script which will close the timer on success (e.g. an OnDeath script for the head cultist etc).
Modifié par The Fred, 29 août 2010 - 11:29 .
#6
Posté 30 août 2010 - 12:27
Thx Fred... haven't really looked into the Timer script much (yet), as I've been racking my brain on how to create an inventory-based script...... tho it'll most likely end up here (this site), so I can get second opinions / criticism (lol) from it.
-DotA
-DotA
Modifié par Deus of the Apocalypse, 30 août 2010 - 12:28 .





Retour en haut






