Advertisement
inkoalawetrust

ZScript code conversion example.

Jun 21st, 2022
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. //In ZScript you start with "Class" instead of "Actor", and actors need to explicitly inherit from the base Actor class.
  2. Class AllyMarine : Actor
  3. {
  4. //The actors' properties and flags have to be put inside a Default{} block, similar to how states are put in a States{} block.
  5. Default
  6. {
  7. //Actor properties need to have semicolons at the end.
  8. Health 200;
  9. GibHealth -50; //-35 orignal submission Default. -200 Vanilla Doom Default
  10. Radius 20;
  11. Height 56;
  12. Mass 100;
  13. SeeSound "Ally/Site";
  14. PainSound "Ally/Pain";
  15. DeathSound "Ally/Death";
  16. ActiveSound "Ally/Active";
  17. MaxTargetRange 2048;
  18. MaxStepHeight 32;
  19. MaxDropoffHeight 64;
  20. //Default speeds & pain chance for majority
  21. Speed 10;
  22. FastSpeed 12;
  23. PainChance 128;
  24. MONSTER;
  25. //Default Flags for majority
  26. +BOSS //But flags don't, though you could give them semicolons if you want.
  27. +FLOORCLIP
  28. +FRIENDLY
  29. +AVOIDMELEE
  30. +MISSILEMORE
  31. +QUICKTORETALIATE
  32. +SLIDESONWALLS
  33. +CANPUSHWALLS
  34. +CANUSEWALLS
  35. +JUMPDOWN
  36. +NODROPOFF
  37. +PUSHABLE
  38. //+NOTAUTOAIMED
  39. +NOBLOCKMONST
  40. +LOOKALLAROUND
  41. -COUNTKILL
  42. //Optional Flags that I'm leaving you to decide whether to use them
  43. //+NOTIMEFREEZE
  44. //+NOFEAR
  45. }
  46. States
  47. {
  48. //All state frames in ZScript need to have semicolors, even ones that don't contain anonymous functions.
  49. Crush:
  50. TNT1 A 0 A_XScream();
  51. POL5 R -1;
  52. Loop;
  53. }
  54. }
  55.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement