Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ACTOR NuclearMissile //Single nuke.
- {
- Damage 1000
- Speed 30
- PROJECTILE
- +THRUGHOST
- +DONTSPLASH
- +SKYEXPLODE
- +EXPLODEONWATER
- DamageType "Superweapon"
- Obituary "%o surely couldn't run away from %k's guided nuclear missile!"
- Scale 1.1
- var int User_Guidance;
- States
- {
- Spawn:
- HEDM A 0 NoDelay A_PlaySound("Stalinowicz/Flew",5|CHAN_NOPAUSE,1,0)
- HEDM A 0 A_PlaySound("Deathhead/Loop3",6|CHAN_NOPAUSE,1,1)
- /*Is dumb missile firing mode active or not?*/
- HEDM A 0 A_JumpIf(CountInv("HeadMode", AAPTR_TARGET) <= 0, 1)
- Goto Looplet
- /*Doubled regular speed, and it returns to vanilla one when firing
- a guided missile, so you get a speed bonus on dumbfire nukes and
- keep the control on guided one.*/
- HEDM A 0 A_ScaleVelocity(0.5)
- /*To determine that the missile got fired while guided mode was active,
- instead of constant check of a firing mode on player. It was doing
- stupid thing before, like removing the camera from currently guided
- missile, if you fired a dumb nuke before and it exploded.*/
- HEDM A 0 A_SetUserVar("User_Guidance", 1)
- // Why the delay? Because zdoom is full-retard and doesn't register the
- // Tid change until after ten years. @_@ - KeksDose
- HEDM A 2 ACS_NamedExecuteAlways("Guided Rocket", 0, 0.02 * 65535)
- HEDM A 2 ACS_NamedExecuteAlways("Stalin Camera", 0, Tid)
- Looplet:
- HED2 A 1 Bright A_SpawnItemEx("DeathHeadSmokeTrail",-30+frandom(3.0,-3.0),random(3.0,-3.0),frandom(3.0,-3.0),0,0,0,0,SXF_CLIENTSIDE,0)
- HEDM A 0 A_SpawnItemEx("DeathHeadFlameTrail", -30,frandom(2.0,-2.0),frandom(2.0,-2.0),0,0,0,0,SXF_CLIENTSIDE,0)
- //Also checks for whether it's a guided missile, so it won't detonate dumb missiles as well.
- HEDM A 0 A_JumpIf(GetPlayerInput((INPUT_BUTTONS) & BT_ALTATTACK & User_Guidance > 0, AAPTR_TARGET), "Death")
- Loop
- Death:
- TNT1 A 0 {
- If(A_JumpIf(User_Guidance > 0, "Null")) //Remove the trigger if it was a guided nuke.
- {
- A_TakeInventory("CameraTrigger",1,AAPTR_TARGET);
- }
- A_PlaySound("Stalinowicz/Explode",5|CHAN_NOPAUSE);
- A_StopSound(6);
- A_SpawnItemEx("Nuke", 0, 0, 5, 0, 0, 0, 0,SXF_TRANSFERPOINTERS|SXF_NOCHECKPOSITION);
- A_SpawnItemEx("KaBoomer",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS,0);
- }
- Stop
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement