Modifié par MiraQ, 07 janvier 2011 - 03:16 .
A trigger that spawns an exact copy of the PC as a hostile creature?
Débuté par
MiraQ
, janv. 07 2011 02:29
#1
Posté 07 janvier 2011 - 02:29
How can I create one of these? I have seen it done before. Is it available at the NWVault? Is it even an original feature to NWN? I can't find it, but then I hardly know what to search for...
#2
Posté 07 janvier 2011 - 06:13
This should do what you are looking for:
-420
void main()
{
object oTarget = GetEnteringObject();
//Make sure target is a PC
if(!GetIsPC(oTarget)) return;
location lSpawn = GetLocation(GetWaypointByTag("clonewp"));
//Create clone
object oClone = CopyObject(oTarget, lSpawn, OBJECT_INVALID, "clone");
//Change to hostile and set AI level
ChangeToStandardFaction(oClone, STANDARD_FACTION_HOSTILE);
SetAILevel(oClone, AI_LEVEL_VERY_HIGH);
//Prevent items and gold from being dropped
int iCounter;
object oItem;
for (iCounter = 0; iCounter <= NUM_INVENTORY_SLOTS; iCounter++)
{
oItem = GetItemInSlot(iCounter, oClone);
SetDroppableFlag(oItem, FALSE);
SetItemCursedFlag(oItem, TRUE);
}
oItem = GetFirstItemInInventory(oClone);
while(GetIsObjectValid(oItem))
{
SetDroppableFlag(oItem, FALSE);
SetItemCursedFlag(oItem, TRUE);
oItem = GetNextItemInInventory(oClone);
}
TakeGoldFromCreature(GetGold(), oClone, TRUE);
}
You may want to add a few things like maybe a ForceRest so the clone gets all its spells and hit points. And a DetermineCombatRound if the clone doesn't attack right away.-420
#3
Posté 08 janvier 2011 - 03:04
Alternatively check out "Soul Mirror by Joachim the DM" on the vault. There is a link to it in the resource thread in the toolset area.
TR
TR
#4
Posté 08 janvier 2011 - 01:12
If your gonna have an immediate fight you may also want to copy over any buffs the PC has up. I fiddled with this a bit a long while back, and found that an unbuffed copy could be dropped pretty quick.





Retour en haut






