Skip to content

How flag creatures so they won't wander?

I'm trying to get a queen spider to: spawn, instantly stone skin itself and not do random wandering.
It looks like such things should be possible with the default scripts in place.
I've tried setting a few variable on the creature but it keep wandering and not getting instant stone skin.

Comments

  • ProlericProleric Member Posts: 1,316
    By default, creatures spawned by script don't wander.

    Ensure you don't have Tony K AI or similar mods installed.

    The OnSpawn script could include the following:
    SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS, FALSE);
    SetSpawnInCondition(NW_FLAG_FAST_BUFF_ENEMY);
    

    The first line is normally redundant, as it is the default.
    The second line should cast Stoneskin if you give the creature that spell in the toolkit.
  • ForSeriousForSerious Member Posts: 467
    No mods here.
    I was able to get the fast buff to work using what you suggested.
    Proleric wrote: »
    By default, creatures spawned by script don't wander.
    I want to challenge that statement. Creatures have always wander by default if spawned from an encounter. At least, in every module I've made.
    Calling:
    SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS, FALSE);
    in OnSpawn does not stop the creature from wandering.


  • ForSeriousForSerious Member Posts: 467
    Oh, I see. Yes. If created from a script, they don't.
    Sorry, I am exclusively using encounters to spawn creatures.
  • ForSeriousForSerious Member Posts: 467
    Found it in nw_c2_default1:
    	    if (GetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS)
                    || GetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS_AVIAN)
                    || GetIsEncounterCreature())
                {
                    PlayMobileAmbientAnimations();
                }
    
    The very act of using an encounter forces them to wander.
  • ProlericProleric Member Posts: 1,316
    Oh, encounters... I very rarely use them.

    You could just dummy out that statement before saving the script with a new name, for that creature only.
  • ForSeriousForSerious Member Posts: 467
    Well, I don't want anything to randomly wander. I removed the GetIsEncounterCreature() check. That way it will only happen if I want it to.
Sign In or Register to comment.