Advertisement
Guest User

Untitled

a guest
Jul 24th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. ACTOR NuclearMissile //Single nuke.
  2. {
  3. Damage 1000
  4. Speed 30
  5. PROJECTILE
  6. +THRUGHOST
  7. +DONTSPLASH
  8. +SKYEXPLODE
  9. +EXPLODEONWATER
  10. DamageType "Superweapon"
  11. Obituary "%o surely couldn't run away from %k's guided nuclear missile!"
  12. Scale 1.1
  13. var int User_Guidance;
  14. States
  15. {
  16. Spawn:
  17. HEDM A 0 NoDelay A_PlaySound("Stalinowicz/Flew",5|CHAN_NOPAUSE,1,0)
  18. HEDM A 0 A_PlaySound("Deathhead/Loop3",6|CHAN_NOPAUSE,1,1)
  19. /*Is dumb missile firing mode active or not?*/
  20. HEDM A 0 A_JumpIf(CountInv("HeadMode", AAPTR_TARGET) <= 0, 1)
  21. Goto Looplet
  22. /*Doubled regular speed, and it returns to vanilla one when firing
  23. a guided missile, so you get a speed bonus on dumbfire nukes and
  24. keep the control on guided one.*/
  25. HEDM A 0 A_ScaleVelocity(0.5)
  26. /*To determine that the missile got fired while guided mode was active,
  27. instead of constant check of a firing mode on player. It was doing
  28. stupid thing before, like removing the camera from currently guided
  29. missile, if you fired a dumb nuke before and it exploded.*/
  30. HEDM A 0 A_SetUserVar("User_Guidance", 1)
  31. // Why the delay? Because zdoom is full-retard and doesn't register the
  32. // Tid change until after ten years. @_@ - KeksDose
  33. HEDM A 2 ACS_NamedExecuteAlways("Guided Rocket", 0, 0.02 * 65535)
  34. HEDM A 2 ACS_NamedExecuteAlways("Stalin Camera", 0, Tid)
  35. Looplet:
  36. 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)
  37. HEDM A 0 A_SpawnItemEx("DeathHeadFlameTrail", -30,frandom(2.0,-2.0),frandom(2.0,-2.0),0,0,0,0,SXF_CLIENTSIDE,0)
  38. //Also checks for whether it's a guided missile, so it won't detonate dumb missiles as well.
  39. HEDM A 0 A_JumpIf(GetPlayerInput((INPUT_BUTTONS) & BT_ALTATTACK & User_Guidance > 0, AAPTR_TARGET), "Death")
  40. Loop
  41. Death:
  42. TNT1 A 0 {
  43. If(A_JumpIf(User_Guidance > 0, "Null")) //Remove the trigger if it was a guided nuke.
  44. {
  45. A_TakeInventory("CameraTrigger",1,AAPTR_TARGET);
  46. }
  47. A_PlaySound("Stalinowicz/Explode",5|CHAN_NOPAUSE);
  48. A_StopSound(6);
  49. A_SpawnItemEx("Nuke", 0, 0, 5, 0, 0, 0, 0,SXF_TRANSFERPOINTERS|SXF_NOCHECKPOSITION);
  50. A_SpawnItemEx("KaBoomer",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS,0);
  51. }
  52. Stop
  53. }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement