62 lines
1.6 KiB
Plaintext
62 lines
1.6 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: SQ_Building Spawn
|
|
//:: Based on HoTU hx_final_enter
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
This will spawn in any destructible buildings
|
|
for the ending.
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Brad Prince
|
|
//:: Created On: Sept 5, 2003
|
|
//:: Edited by Thomg for sq series mods
|
|
//:://////////////////////////////////////////////
|
|
#include "x2_inc_toollib"
|
|
|
|
|
|
void main()
|
|
{
|
|
//apply lava effect
|
|
if ( GetLocalInt( OBJECT_SELF, "fp1" ) )
|
|
{
|
|
return;
|
|
}
|
|
|
|
SetLocalInt( OBJECT_SELF, "fp1", 1 );
|
|
TLChangeAreaGroundTiles(OBJECT_SELF, X2_TL_GROUNDTILE_LAVA, 30, 30, 0.9);
|
|
|
|
int x = 0;
|
|
int y = 0;
|
|
int z = 0;
|
|
object oPC = GetEnteringObject();
|
|
object oBuild = GetObjectByTag("hx_meph_building", x);
|
|
int iVFX;
|
|
object oInvis = GetObjectByTag("hx_mephdstry_obj", y);
|
|
int iCut = 300;
|
|
object oWizRing = GetObjectByTag("hx_end_battle_protect", z);
|
|
|
|
if(GetIsPC(oPC))
|
|
{
|
|
// Do once
|
|
if (GetLocalInt(OBJECT_SELF, "nDoOncefp1") != 1)
|
|
{
|
|
|
|
SetLocalInt(OBJECT_SELF, "nDoOncefp1", 1);
|
|
|
|
// Spawn the visual effect buildings in.
|
|
while(GetIsObjectValid(oBuild))
|
|
{
|
|
// Get the effect.
|
|
iVFX = StringToInt(GetStringLeft(GetName(oBuild), 3));
|
|
// Apply the building effect.
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(iVFX), oBuild);
|
|
x = x + 1;
|
|
oBuild = GetObjectByTag("hx_meph_building", x);
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
}
|