Scripts shared or zm or mp

Script Tips and Zone Files

Scripts in shared, in zm, or in mp

  • Any scripts found in scripts/shared can be used between zm and mp
  • Scripts in scripts/mp are for multiplayer only
  • Scripts in scripts/zm are for zombiemode only

#using

  • If using a function from another script put this at the beginning
    • #using scripts\subfoldername\nameofscript;
  • Do not use / inside the using, only use \

#namespace

  • You don't need a namespace, without one you would use the name of the script instead
  • If you add a namespace don't make it the same as your script name, that is redundant

#insert

  • Insert a gsh to use global variables and functions in the gsh

#precache

  • precache materials (shaders), fx, or models to use via script

Zone files

  • Add scripts with:
    • scriptparsetree,scripts/zm/nameofscript.gsc
    • do not use \ here, only /
    • do not add ; at the end
  • Add a material:
    • material,nameofmaterial
  • Add an fx:
    • fx,pathtofxandnamefromfxfolder
      • fx,custom/stuff