Lauriel Posted June 4, 2020 Share Posted June 4, 2020 I had a rather humorous moment when my area script spawned a creature while there was a cloudkill spell in affect in the area. They did, basically, an Arte Johnson (ok, showing my age...from Laugh-In in the 60s or 70s). They waltzed in and fell right over. Ok, back to the drawing board. I worked around it, but it would be better if I could hold off on spawning them until the spell was finished. I do check for combat (CombatCounter(0)), but if the crew are off to the side of the spell's area of effect, it doesn't show them as being in combat - or so I would assume. There is dialogue that has probably happened, and I know that can throw off the accuracy of CombatCounter so it is very possible that is what has happened. Anyway, is there a way determine if my poor innocent unsuspecting spawns are doomed upon arrival? Quote Link to comment
temnix Posted June 5, 2020 Share Posted June 5, 2020 I don't know if there is a general and broadly applicable, convenient way to do this (but use "ActuallyInCombat()" instead of the combat counter, it works better), but you could invent something for special cases. For one area or for one type of creature with special effects on it. One possibility is to patch AOE spells (but how will you know all AOE spells out there?) with a double Set global variable effect, one immediately setting the global to 1 and the other delayed by 6 seconds setting it back to 0. The target should be Party - at least somebody will be alive there for the effect to latch on. Then you can script your creature to check for that global OnCreation() and DestroySelf() if it is set. It would look strange for creatures to blink out of existence, so you would need to equip them with a few effects - remove the feet circle and the animation for, say, 5 ticks, and give them protection from opposite allegiance for the same duration so that enemies don't start attacking empty air. Give them protection from Sleep too. 5 ticks should be enough to run the check and disappear without disturbing the burgers. If it's your area script doing the spawning, you won't even all that, just put in a check, but then you will be limited to that one area, whereas with the creatures themselves checking you can create something universal and interesting, like a spell that only summons monsters out of combat - or only in combat, for that matter. The best option in this case would be to summon an intermediary, an invisible minion with Translucency 255, no circle and with all these protections and "Hide status" to run the check. If all okays, the minion can do CreateCreatureObjectOffset off itself in any direction you want, at any distance, with any creature files, then eliminate itself. It needs an animation, not NULL_ANIMATION, to count off the offset. Other than that, this is very flexible and the only way to do many things. Quote Link to comment
Lauriel Posted June 5, 2020 Author Share Posted June 5, 2020 Hmmm, you just gave me some ideas, thank you! I will use the ActuallyInCombat() trigger and see if it helps, as well. Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.