Skip to content

Spawn in mystery. Confused.

When spawning in creatures to a waypoint they fall from the sky to the spawn point.creatures. Anyone know why this happens?

Im using the "spawndaemon" script.

Comments

  • ProlericProleric Member Posts: 1,281
    I don't have that script in front of me, but you probably need to change the bUseAppearAnimation parameter of CreateObject to FALSE.
  • TheTinmanTheTinman Member Posts: 72
    It doesnt always do it. Seems to be npc creatures only. tried with a rat and a dog from standard pallet and they spawn fine.
  • TheTinmanTheTinman Member Posts: 72
    Got it sorted. I accidently placed to spawn objcets in the area. LOL!! Spent two days to figure out something so simple.
  • ZephiriusZephirius Member Posts: 411
    TheTinman wrote: »
    Got it sorted. I accidently placed to spawn objcets in the area. LOL!! Spent two days to figure out something so simple.

    I hate it when that happens. :)
  • TheTinmanTheTinman Member Posts: 72
    Ok. Still confused. All npc's and humanoid creatures still fall from the sky when spawning in. Animals appear like normal. Switched to a different respawn method. Here are my scripts.

    //On Area Heartbeat Script

    void main()
    {
    int sq,x,sqt,sqdone,rr;
    string sqc;
    location sql;
    object curarea;
    curarea = GetArea(OBJECT_SELF);
    sq = GetLocalInt(curarea,"spawnqueue");
    if (sq >= 1) {
    x = 1;
    if (GetLocalInt(curarea,"rollover") == 1) {
    rr = 40;
    } else {
    rr = sq;
    }
    while (x <= rr) {
    sqt = GetLocalInt(curarea,"sqt" + IntToString(x));
    sqdone = GetLocalInt(curarea,"sqtdone" + IntToString(x));
    if (sqt == 0 || sqdone == 1) { }
    else {
    if (sqt > 1) {
    SetLocalInt(curarea,"sqt" + IntToString(x), sqt-1);
    } else {
    sqc = GetLocalString(curarea,"sqc" + IntToString(x));
    sql = GetLocalLocation(curarea,"sqt" + IntToString(x));
    CreateObject(OBJECT_TYPE_CREATURE,sqc,sql,TRUE);
    SetLocalInt(curarea,"sqtdone" + IntToString(x),1);
    }
    }
    x++;
    }
    }
    }


    // On Creature death script
    //::///////////////////////////////////////////////
    //:: Copyright (c) 2001 Bioware Corp.
    //:://////////////////////////////////////////////
    /*
    Shouts to allies that they have been killed
    */
    #include "NW_I0_GENERIC"
    void main()
    {
    int spawnqueue;
    int sq;
    object curarea;
    int nClass = GetLevelByClass(CLASS_TYPE_COMMONER);
    int nAlign = GetAlignmentGoodEvil(OBJECT_SELF);
    if(nClass > 0 && (nAlign == ALIGNMENT_GOOD || nAlign == ALIGNMENT_NEUTRAL))
    {
    object oKiller = GetLastKiller();
    AdjustAlignment(oKiller, ALIGNMENT_EVIL, 5);
    }
    curarea = GetArea(OBJECT_SELF);
    spawnqueue = GetLocalInt(curarea,"spawnqueue");
    if (spawnqueue >= 1) {
    sq = spawnqueue+1;
    if (sq == 41) { sq = 1; SetLocalInt(curarea,"rollover",1); }
    } else {
    sq = 1;
    }
    if (GetLocalInt(curarea,"rollover") == 1) {
    if (GetLocalInt(curarea,"sqtdone" + IntToString(sq)) == 0 && GetLocalInt(curarea,"sqt" + IntToString(sq)) > 0) {
    CreateObject(OBJECT_TYPE_CREATURE,GetLocalString(curarea,"sqc" + IntToString(sq)),GetLocalLocation(curarea,"sqt"+IntToString(sq)),TRUE);
    }
    }
    SetLocalInt(curarea,"spawnqueue",sq);
    SetLocalInt(curarea,"sqt" + IntToString(sq),6);
    SetLocalInt(curarea,"sqtdone" + IntToString(sq),0);
    SetLocalString(curarea,"sqc" + IntToString(sq), GetTag(OBJECT_SELF));
    SetLocalLocation(curarea,"sqt" + IntToString(sq),GetLocalLocation(OBJECT_SELF,"myspawn"));

    SpeakString("NW_I_AM_DEAD", TALKVOLUME_SILENT_TALK);
    //Shout Attack my target, only works with the On Spawn In setup
    SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
    if(GetSpawnInCondition(NW_FLAG_DEATH_EVENT))
    {
    SignalEvent(OBJECT_SELF, EventUserDefined(1007));
    }
    }


    // On Creature respawn script
    //::///////////////////////////////////////////////
    //:: Copyright (c) 2001 Bioware Corp.
    //:://////////////////////////////////////////////
    /*
    Determines the course of action to be taken
    after having just been spawned in
    */
    #include "NW_O2_CONINCLUDE"
    #include "NW_I0_GENERIC"
    void main()
    {
    // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) ****************************************************************************
    //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
    //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
    // This causes the creature to say a special greeting in their conversation file
    // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired
    // greeting in order to designate it. As the creature is actually saying this to
    // himself, don't attach any player responses to the greeting.
    //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
    // This will set the listening pattern on the NPC to attack when allies call
    //SetSpawnInCondition(NW_FLAG_STEALTH);
    // If the NPC has stealth and they are a rogue go into stealth mode
    //SetSpawnInCondition(NW_FLAG_SEARCH);
    // If the NPC has Search go into Search Mode
    //SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
    // This will set the NPC to give a warning to non-enemies before attacking
    //SetSpawnInCondition(NW_FLAG_SLEEP);
    //Creatures that spawn in during the night will be asleep.
    //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
    SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
    //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
    SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
    //This will play Ambient Animations until the NPC sees an enemy or is cleared.
    //NOTE that these animations will play automatically for Encounter Creatures.
    // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME.
    //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.)
    //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.)
    //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.)
    //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.)
    // CUSTOM USER DEFINED EVENTS
    /*
    The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the
    On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined
    events user 1000 - 1010
    */
    //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001
    //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
    //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
    //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
    //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
    //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
    //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
    //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007
    // DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) *****************************************************************************************
    SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to.
    WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
    // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them
    // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after
    // combat.
    GenerateNPCTreasure(); //* Use this to create a small amount of treasure on the creature
    SetLocalLocation(OBJECT_SELF,"myspawn",GetLocation(OBJECT_SELF));
    }

    If its not a script error could it be with framerate or vsync?
  • ProlericProleric Member Posts: 1,281
    Refer to my previous answer. You have the appear animation set to TRUE. Any creature which doesn't have a custom appear animation will fall out of the sky.
    CreateObject(OBJECT_TYPE_CREATURE,sqc,sql,TRUE);
    
    should read
    CreateObject(OBJECT_TYPE_CREATURE,sqc,sql);
    
  • TheTinmanTheTinman Member Posts: 72
    Proleric wrote: »
    Refer to my previous answer. You have the appear animation set to TRUE. Any creature which doesn't have a custom appear animation will fall out of the sky.
    CreateObject(OBJECT_TYPE_CREATURE,sqc,sql,TRUE);
    
    should read
    CreateObject(OBJECT_TYPE_CREATURE,sqc,sql);
    

    No change when I tried this. They still drop from the heavens.
  • TheTinmanTheTinman Member Posts: 72
    I believe i got it. I also commented out the SetSpawnInCondition lines in the On Creature respawn script.
    Thanks for the help everyone.
Sign In or Register to comment.