int nHPs = GetCurrentHitpoints(oPC); // Get PC's current Hitpoint total
With this line I get a ERROR: PARSING VARIABLE LIST.
Current script:
/* Script generated byLilac Soul's NWN Script Generator, v. 2.3
For download info, please visit:http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
//Put this script OnEntervoid main(){
effect eVFX;
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
if (DoOnce==TRUE) return;
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
object oItem;oItem = GetFirstItemInInventory(oPC);
while (GetIsObjectValid(oItem)) { if (GetPlotFlag(oItem)) SetPlotFlag(oItem, FALSE);
DestroyObject(oItem);
oItem = GetNextItemInInventory(oPC); }
int nInt;for (nInt=0; nInt<NUM_INVENTORY_SLOTS; nInt++) { oItem = GetItemInSlot(nInt, oPC);
if (GetPlotFlag(oItem)) SetPlotFlag(oItem, FALSE);
DestroyObject(oItem); }
AssignCommand(oPC, TakeGoldFromCreature(GetGold(oPC), oPC, TRUE));
SetCutsceneMode(oPC, TRUE);
FadeFromBlack(oPC, FADE_SPEED_SLOW);
eVFX = EffectVisualEffect(VFX_COM_BLOOD_CRT_RED);DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oPC));
// Apply a visual effect. eVFX = EffectVisualEffect(491); ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oPC); DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oPC));
// Apply a visual effect. eVFX = EffectVisualEffect(VFX_COM_BLOOD_LRG_RED); ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oPC); DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oPC));
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_SPASM, 1.0f, 5.0f));
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_DEAD_FRONT, 1.0f, 15.0f));
AssignCommand(oPC, ActionSpeakString("Ugh...Mugged..."));
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_DEAD_FRONT, 1.0f, 15.0f));
object oTarget;oTarget = oPC;
// Apply a visual effect. eVFX = EffectVisualEffect(491); ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oPC); DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oPC));
// Apply a visual effect. eVFX = EffectVisualEffect(VFX_COM_BLOOD_LRG_RED); ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oPC); DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oPC));
SetCutsceneMode(oPC, FALSE);
int nHPs = GetCurrentHitpoints(oPC); // Get PC's current Hitpoint totaleffect eDamage = EffectDamage(nHPs - 2); // Damage = max Hitpoints - 2ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oPC); // Apply damage
}
Modifié par AstoundingArcaneArcher, 31 août 2011 - 11:18 .