void DUH_HellstaffStorm(void) { accum basex = ACS_GetActorX(0); accum basey = ACS_GetActorY(0); accum basez = ACS_GetActorCeilingZ(0) - 12; int shooter = ACS_GetUserVariable(0, s"user_shooter"); int tics = ACS_GetUserVariable(0, s"user_stormTics"); while(tics) { accum x = basex + ACS_RandomFixed(-64, 64); accum y = basey + ACS_RandomFixed(-64, 64); accum z = basez; int tid = DU_MakeTID(); // Hack to not kill projectile if shooting from water. accum shooterx = ACS_GetActorX(shooter); accum shootery = ACS_GetActorY(shooter); accum shooterz = ACS_GetActorZ(shooter); ACS_SetActorPosition(shooter, shooterx, shootery, shooterz+16, false); ACS_SpawnProjectile(shooter, s"DUH_HellstaffMissile3", 0, 0, 0, 0, tid); if(ACS_SetActorPosition(tid, x, y, z, false)) { ACS_SetActorVelocity(tid, 0, 0, -5, false, false); --tics; } else ACS_Thing_Remove(tid); ACS_SetActorPosition(shooter, shooterx, shootery, shooterz, false); ACS_Delay(1); } ACS_Delay(23); ACS_Thing_Remove(ACS_ActivatorTID()); }
ACS_S_SCRIPT void WaypointSpawn (void) { if (!ACS_ActivatorTID()) ACS_Thing_ChangeTID(0, ACS_UniqueTID(-32768, 0)); int tid = ACS_ActivatorTID(); ACS_SetActivatorToTarget(0); int plrNum = ACS_PlayerNumber(); if (plrNum != -1) { player[plrNum].wayTid = tid; ACS_SetActorAngle(tid, player[plrNum].angle); ACS_SetActorPitch(tid, player[plrNum].pitch); ACS_SetActorProperty(player[plrNum].camTid, APROP_MasterTID, tid); ACS_GiveActorInventory(player[plrNum].camTid, s"ChaseCamWarp", 1); ACS_Delay(1); ACS_Thing_Remove(tid); } return; }