I am at the very beginning of learning to script. So I do not know much about it. The script I need will do this once a PC enters a trigger
if pc has armor1 or armor2 or armor3 or armor4 or armor5 equipped do nothing
otherwise 1 point of damage is dealt to PC
so if the pc isn't wearing one of the 5 armors listed, they are damaged 1 point everytime they enter the trigger
I have this working with only one item, but I do not know how to make the script check for one of the five armors equiped.
This is my script for one item working from the script generator, but again, I don't know enough about scripting to be able to have the generator have or conditions nor do I know about scripting to write it out by hand.
any help is appreciated.
[
/* * Script generated by LS Script Generator, v.TK.0 * * For download info, please visit: *
http://nwvault.ign.c...il&id=1502 */// Put this script OnEnter.
void main(){ effect eVFX; effect eDamage;
// Get the creature who triggered this event. object oPC = GetEnteringObject();
// Only fire for (real) PCs. if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) ) return;
// If the PC does not have the item "coldprotectarmorlight" equipped. if ( "coldprotectarmorlight" != GetTag(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC)) ) { // Cause damage. eDamage = EffectDamage(1, DAMAGE_TYPE_COLD); eVFX = EffectVisualEffect(VFX_COM_HIT_FROST); ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oPC) ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX , oPC) }} ]
Modifié par harjoblog, 10 juillet 2012 - 09:47 .