Is there any way to listen for certain plot flags to be set, let the original scripts fire, and then run an extra bit of scripting once the original script completes? For example, when the plot flag to remove the disguises in Rescue the Queen sets, I'd like my script with my custom function to fire immediately afterward. I've seen two methods that work but I'd like to avoid - overwriting plots or plot scripts and constant plot checking.
I've checked out Anakin's event manager, which on the surface seems like it would do what I want, but I've read in other threads that EVENT_TYPE_SET_PLOT can't be overridden. I don't really want to spend hours writing a script only to find out it's not possible. Anyone got any ideas?
Intercepting and amending EVENT_TYPE_SET_PLOT???
Débuté par
Karma
, janv. 17 2011 01:31
#1
Posté 17 janvier 2011 - 01:31
#2
Posté 17 janvier 2011 - 08:19
Uh, I have another idea, but it might affect performance (I don't think it would be noticeable). You could use a PRCSCR script to spawn an invisible creature somewhere in the area. Then, use that creature's script to check for the plot flag value for example each second (use a custom event and DelayEvent()). If the expected value has been set, then you just run your code and don't delay the custom event anymore.
Modifié par _L_o_B_o_, 17 janvier 2011 - 08:19 .
#3
Posté 17 janvier 2011 - 02:42
Your way is doable, though I'm worried about its performance on low-end systems. There must (or at least ought to) be a way to do this without plot checking so frequently.
Your post made me realize what I was doing wrong in my example. (I wasn't reapplying the CreateDisguise() when I changed areas. DUH! ) That problem is solved, though I'd still like to know if there's a way to check for flags only when a plot flag is actually set.
Your post made me realize what I was doing wrong in my example. (I wasn't reapplying the CreateDisguise() when I changed areas. DUH! ) That problem is solved, though I'd still like to know if there's a way to check for flags only when a plot flag is actually set.





Retour en haut







