Files
HeroesStone_PRC8/_module/nss/item_flyto_261.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

35 lines
800 B
Plaintext

/* Fly to Location script
by Gaia_Werewolf
This script is used on an item with the "Unique Item" spell property. */
void main()
{
object oPC;
// Check if item target is valid.
if (GetIsObjectValid(GetItemActivatedTarget())
){
return;}
// Next, do a Fly/Land animation and send the PC over to whereever
// was clicked with the activated item.
effect eFly;
location lTarget;
oPC = GetItemActivator();
lTarget = GetItemActivatedTargetLocation();
eFly = EffectDisappearAppear(lTarget);
// Cutscene effects! Totally unnecessary, but eh.
DelayCommand(2.5, FadeToBlack(oPC, FADE_SPEED_FASTEST));
DelayCommand(4.2, FadeFromBlack(oPC, FADE_SPEED_FASTEST));
// Duration MUST be 3.0 or higher. Higher for busy areas.
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eFly, oPC, 4.0);
}