68 lines
2.3 KiB
Plaintext
68 lines
2.3 KiB
Plaintext
void Balls ();
|
|
void main()
|
|
{
|
|
object oTarget = GetWaypointByTag("WP_ball_start");
|
|
object oSpawn = CreateObject(OBJECT_TYPE_ITEM, "skullball", GetLocation(oTarget));
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_TIME_STOP), GetLocation(oTarget));
|
|
|
|
|
|
object oRef = GetObjectByTag("referee");
|
|
object oWP1 = GetObjectByTag("WP_ref_2");
|
|
object oWP2 = GetObjectByTag("WP_ref_1");
|
|
object oWP3 = GetObjectByTag("WP_ref_3");
|
|
string sSoundName9 = "bf_large";
|
|
AssignCommand(oRef, SpeakString("Play Ball !", TALKVOLUME_SHOUT));
|
|
AssignCommand(oRef, ActionForceMoveToObject(oWP1));
|
|
DelayCommand(3.0, AssignCommand(oRef, ActionForceMoveToObject(oWP3)));
|
|
DelayCommand(300.0,AssignCommand(oRef, SpeakString("Half Way Point!", TALKVOLUME_TALK)));
|
|
DelayCommand(540.0,AssignCommand(oRef, SpeakString("1 Minute Left!", TALKVOLUME_SHOUT)));
|
|
DelayCommand(601.0, PlaySound(sSoundName9));
|
|
DelayCommand(602.0, AssignCommand(oRef, SpeakString("Game Over!", TALKVOLUME_SHOUT)));
|
|
DelayCommand(603.0, SetLocalInt(oRef, "GameState", 0));
|
|
DelayCommand(604.0, Balls());
|
|
DelayCommand(605.0, AssignCommand(oRef, ActionForceMoveToObject(oWP2)));
|
|
DelayCommand(608.0, AssignCommand(oRef, SpeakString("Red Team has scored "+IntToString(GetLocalInt(oRef, "Redpoints"))+" points" , TALKVOLUME_SHOUT)));
|
|
DelayCommand(609.0, AssignCommand(oRef, SpeakString("Blue Team has scored "+IntToString(GetLocalInt(oRef, "Bluepoints"))+" points" , TALKVOLUME_SHOUT)));
|
|
|
|
object oDoor = GetObjectByTag("dt_Doorupstadium");
|
|
DelayCommand(610.0, SetLocked(oDoor, FALSE));
|
|
|
|
object oDoor2 = GetObjectByTag("dt_Doordownstadium");
|
|
DelayCommand(611.0, SetLocked(oDoor2, FALSE));
|
|
|
|
}
|
|
|
|
void Balls()
|
|
{
|
|
//////////delete balls
|
|
object oArea=GetArea(OBJECT_SELF);
|
|
object oStuff=GetFirstObjectInArea(oArea);
|
|
while (GetIsObjectValid(oStuff))
|
|
{
|
|
if ((GetTag(oStuff)=="skullball") && (GetObjectType(oStuff)==OBJECT_TYPE_ITEM))
|
|
DestroyObject(oStuff,0.0);
|
|
oStuff=GetNextObjectInArea(oArea);
|
|
}
|
|
//now, go through all of players inventories!
|
|
object oPC=GetFirstPC();
|
|
while (GetIsObjectValid(oPC))
|
|
{
|
|
if (GetArea(oPC)==oArea)
|
|
{
|
|
object oStuff2 = GetFirstItemInInventory(oPC);
|
|
while (GetIsObjectValid(oStuff2))
|
|
{
|
|
if (GetTag(oStuff2)=="skullball") DestroyObject(oStuff2,0.0);
|
|
oStuff2 = GetNextItemInInventory(oPC);
|
|
}
|
|
}
|
|
oPC=GetNextPC();
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|