Added more creature model overrides
Added more creature model overrides. Added another "boss" creature to the Labyrinth. Tweaked several other creatures. Full compile. Updated release archive.
This commit is contained in:
60
_module/nss/plcused_portal.nss
Normal file
60
_module/nss/plcused_portal.nss
Normal file
@@ -0,0 +1,60 @@
|
||||
//:: plcused_portal.nss
|
||||
//::
|
||||
//:: Reads destination waypoint from string var "DESTINATION" on self
|
||||
//::
|
||||
|
||||
void ClearAndJumpToObject(object oDestination);
|
||||
void ClearAndJumpToObject(object oDestination)
|
||||
{
|
||||
ClearAllActions();
|
||||
JumpToObject(oDestination);
|
||||
}
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
object oSelf = OBJECT_SELF;
|
||||
int nHench;
|
||||
object oHench;
|
||||
effect eVFX;
|
||||
object oTarget;
|
||||
string sDestination = GetLocalString(oSelf, "DESTINATION");
|
||||
|
||||
// Get the creature who triggered this event.
|
||||
object oPC = GetLastUsedBy();
|
||||
|
||||
// Find the location to which to teleport.
|
||||
oTarget = GetWaypointByTag(sDestination);
|
||||
|
||||
// Save the PC's current location for the return trip.
|
||||
SetLocalLocation(oPC, "ls_stored_loc", GetLocation(oPC));
|
||||
|
||||
// Teleport the PC.
|
||||
eVFX = EffectVisualEffect(VFX_IMP_UNSUMMON);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oPC);
|
||||
DelayCommand(3.0, AssignCommand(oPC, ClearAndJumpToObject(oTarget)));
|
||||
|
||||
// Also teleport associates (but no visual effect for them).
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
|
||||
DelayCommand(3.1, AssignCommand(oHench, ClearAndJumpToObject(oTarget)));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
|
||||
DelayCommand(3.1, AssignCommand(oHench, ClearAndJumpToObject(oTarget)));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
|
||||
DelayCommand(3.1, AssignCommand(oHench, ClearAndJumpToObject(oTarget)));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
|
||||
DelayCommand(3.1, AssignCommand(oHench, ClearAndJumpToObject(oTarget)));
|
||||
|
||||
// Support for multiple henchmen (includes horses).
|
||||
nHench = 1;
|
||||
oHench = GetHenchman(oPC, 1);
|
||||
while ( oHench != OBJECT_INVALID )
|
||||
{
|
||||
DelayCommand(3.1, AssignCommand(oHench, ClearAndJumpToObject(oTarget)));
|
||||
// Next henchman.
|
||||
oHench = GetHenchman(oPC, ++nHench);
|
||||
}
|
||||
|
||||
// Apply a visual effect.
|
||||
eVFX = EffectVisualEffect(VFX_COM_HIT_NEGATIVE);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSelf);
|
||||
}
|
Reference in New Issue
Block a user