nw_i0_spells and Basilisks too!
Zephirius
Member Posts: 419
Oh boy. Where to start.
I'm trying to alter the basilisks petrify attack. I need them to stop using their petrify attack and switch to their claws after I'm petrified. This bugs me to no end...
Is there an easy fix for this? I poked around nw_i0_spells and didn't find anything relating to being petrified???
Anyone have clue on how to tackle this?
I'm trying to alter the basilisks petrify attack. I need them to stop using their petrify attack and switch to their claws after I'm petrified. This bugs me to no end...
Is there an easy fix for this? I poked around nw_i0_spells and didn't find anything relating to being petrified???
Anyone have clue on how to tackle this?
0
Comments
I have a way to generally make creatures do what I want when certain conditions are met using custom AI overrides. It's a bit clunky but it works like this.
In nw_c2_default9 either uncomment the line that sets the creature to run END_COMBAT_ROUND_EVENTS or do this:
Make a basilisk copy and add the variable ECRE|Int|1 to it.
Change the creature's OnUserDefined script handle to x2_def_userdef
Now, at the end of every combat round, the basilisk will run this next part.
In x2_def_userdef in the section:
else if(nUser == EVENT_END_COMBAT_ROUND || GetUserDefinedEventNumber() == 1003) // END OF COMBAT
put code to check if the basilisk's attack target is petrified. If so, set a custom AI script to run.
Then make a basilisk_ai script. (using x2_ai_demo as the template)
I haven't tested this (so I'm sure there will be a problem ). To summarize, the creature runs normal AI. At the end of its combat round, it checks if the target it is attacking is petrified. If it is, then we set the custom AI script which just tells it to attack. If it isn't petrified, then it deletes the custom AI so that it goes back to standard AI stuff. There are limitations, of course. The custom AI doesn't try to find a new target if the other one died or disappeared, but it should return to regular AI to allow that. It doesn't respond well to another enemy doing stuff to it while it's attacking the petrified target or make use of other abilities should it have them. Anyway, I'm sure there's a better way, but maybe this is helpful.