31 lines
708 B
Plaintext
31 lines
708 B
Plaintext
|
|
||
|
void main()
|
||
|
|
||
|
{
|
||
|
|
||
|
int nInt;
|
||
|
object oTarget;
|
||
|
object oSpawn;
|
||
|
location lTarget;
|
||
|
|
||
|
object oPC = GetPCSpeaker();
|
||
|
|
||
|
oTarget = GetWaypointByTag("WP_SPn_nofmist");
|
||
|
|
||
|
lTarget = GetLocation(oTarget);
|
||
|
|
||
|
oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "nofmist", lTarget);
|
||
|
|
||
|
oTarget = oSpawn;
|
||
|
|
||
|
//Visual effects can't be applied to waypoints, so if it is a WP
|
||
|
//the VFX will be applied to the WP's location instead
|
||
|
|
||
|
nInt = GetObjectType(oTarget);
|
||
|
|
||
|
if (nInt != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SMOKE_PUFF), oTarget));
|
||
|
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SMOKE_PUFF), GetLocation(oTarget)));
|
||
|
|
||
|
}
|
||
|
|