generated from Jaysyn/ModuleTemplate
62 lines
1.6 KiB
Plaintext
62 lines
1.6 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Dismount Trigger OnEnter
|
|
//:: x3_tr_dismount
|
|
//:: Copyright (c) 2008 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
This script dismounts mounted objects entering it.
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Deva B. Winblood
|
|
//:: Created On: Jan 28th, 2008
|
|
//:: Last Update: Apr 12th, 2008
|
|
//:://////////////////////////////////////////////
|
|
|
|
|
|
#include "x3_inc_horse"
|
|
|
|
|
|
void main()
|
|
{
|
|
object oCreature=GetEnteringObject();
|
|
int bAnim=!GetLocalInt(OBJECT_SELF,"bDismountFast");
|
|
if (HorseGetIsMounted(oCreature)&&!HorseGetIsAMount(oCreature))
|
|
{ // is mounted
|
|
AssignCommand(oCreature,ClearAllActions(TRUE));
|
|
AssignCommand(oCreature,HORSE_SupportDismountWrapper(bAnim,TRUE));
|
|
|
|
{
|
|
|
|
|
|
|
|
RemoveHenchman(oPC, oTarget);
|
|
|
|
DestroyObject(oTarget);
|
|
|
|
oTarget = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
|
|
|
|
if (GetIsPossessedFamiliar(oTarget)) AssignCommand(oPC, UnpossessFamiliar(oTarget));
|
|
|
|
if (GetIsObjectValid(oTarget)) DestroyObject(oTarget);
|
|
|
|
oTarget = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
|
|
|
|
if (GetIsObjectValid(oTarget)) DestroyObject(oTarget);
|
|
|
|
oTarget = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
|
|
|
|
if (GetIsObjectValid(oTarget)) RemoveSummonedAssociate(oPC, oTarget);
|
|
|
|
if (GetIsObjectValid(oTarget)) DestroyObject(oTarget);
|
|
|
|
oTarget = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
|
|
|
|
if (GetIsObjectValid(oTarget)) RemoveSpecificEffect(EFFECT_TYPE_DOMINATED, oTarget);
|
|
|
|
if (GetIsObjectValid(oTarget)) DestroyObject(oTarget);
|
|
|
|
}
|
|
|
|
} // is mounted
|
|
}
|