Aller au contenu

Photo

How to change the creature created by Placeable "Zombie Corpose"?


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

I tried to change sCreature variable to my creature blueprint, but it return the default zombie.

 

nw_o2_zombie

//::///////////////////////////////////////////////
//:: NW_O2_ZOMBIE.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
   Turns the placeable into a zombie
   if a player comes near enough.
*/
//:://////////////////////////////////////////////
//:: Created By:   Brent
//:: Created On:   January 17, 2002
//:://////////////////////////////////////////////
/*
Patch 1.71

- total rewrite from efficiency reasons - will use AOE instead of heartbeat
- spawn animation improved
*/

void main()
{
   if(GetObjectType(OBJECT_SELF) == OBJECT_TYPE_PLACEABLE)
   {
       location lLoc = GetLocation(OBJECT_SELF);
       object oNew = CreateObject(OBJECT_TYPE_PLACEABLE,"70_pl_zombie",lLoc,FALSE,GetTag(OBJECT_SELF));
       ApplyEffectAtLocation(DURATION_TYPE_PERMANENT,SupernaturalEffect(EffectAreaOfEffect(AOE_MOB_HORRIFICAPPEARANCE,"nw_o2_zombie","nw_o2_zombie","nw_o2_zombie")),lLoc);
       object oAOE = GetNearestObjectByTag("VFX_MOB_HORRIFICAPPEARANCE",oNew);
       SetLocalInt(oAOE,"X1_L_IMMUNE_TO_DISPEL",10);
       SetLocalObject(oAOE,"PLACEABLE",oNew);
       DestroyObject(OBJECT_SELF);
   }
   else if(!GetLocalInt(OBJECT_SELF,"DO_ONCE"))
   {
       object oCreature = GetEnteringObject();
       if(GetIsPC(oCreature) || GetIsPossessedFamiliar(oCreature))
       {
           effect eMind = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
           string sCreature = "NW_ZOMBWARR01";
           // * 10% chance of a zombie lord instead
           if (Random(100) > 90)
           {
               sCreature = "NW_ZOMBIEBOSS";
           }
           object oMonster = CreateObject(OBJECT_TYPE_CREATURE, sCreature, GetLocation(OBJECT_SELF));
           AssignCommand(oMonster, PlayAnimation(ANIMATION_LOOPING_DEAD_FRONT, 1.0, 2.0));
           ApplyEffectToObject(DURATION_TYPE_INSTANT, eMind, oMonster);
           SetPlotFlag(OBJECT_SELF, FALSE);
           DestroyObject(OBJECT_SELF);
           object oSource = GetLocalObject(OBJECT_SELF,"PLACEABLE");
           DestroyObject(oSource);
           SetLocalInt(OBJECT_SELF,"DO_ONCE",TRUE);
       }
   }
}


#2
MagicalMaster

MagicalMaster
  • Members
  • 2 003 messages

Considering that script spawns Zombie Warriors and Zombie Lords apparently, if you're getting the default zombie then maybe it's another script entirely.  What's the blueprint of the default zombie?


  • WhiteTiger aime ceci

#3
Pstemarie

Pstemarie
  • Members
  • 2 745 messages

I have a version somewhere that uses a variable stored on the placeable to store the resref of the creature that spawns. I'll see if I can find it.


  • WhiteTiger aime ceci

#4
henesua

henesua
  • Members
  • 3 879 messages

Here is something that I put together for these kinds of critters.

 

and just in case it is not clear… you can use local variables to specify the spawn using that stuff i did.


  • WhiteTiger aime ceci