IL-GSC/BO1/PC/ZM/maps/_sampan.gsc
2024-02-18 17:32:07 -05:00

32 lines
983 B
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include maps\_vehicle;
#include maps\_utility;
#using_animtree ("vehicles");
main()
{
if(IsDefined(self.script_string) && self.script_string == "sink_me")
{
level._effect["sink_fx"+ self.vehicletype] = LoadFX("vehicle/vexplosion/fx_vexp_sampan_machinegun");
level._effect["explo_fx"+ self.vehicletype] = LoadFX("vehicle/vexplosion/fx_vexp_sampan");
level.vehicle_death_thread[self.vehicletype] = ::delete_and_sink_fx;
}
}
delete_and_sink_fx()
{
self notify( "nodeath_thread" );
if(!IsDefined(self.weapon_last_damage))
{
self.weapon_last_damage = "hind_rockets";
}
if(self.weapon_last_damage == "hind_rockets")
{
PlayFX(level._effect["explo_fx"+ self.vehicletype], self.origin, AnglesToForward(self.angles));
self PlaySound("evt_sampan_explo");
}
else
{
PlayFX(level._effect["sink_fx"+ self.vehicletype], self.origin, AnglesToForward(self.angles));
self PlaySound("evt_sampan_sink");
}
waittillframeend;
self Delete();
}