Results 1 to 8 of 8

Thread: [COD2][Request]Tutorial print hello world to screen/load gsc script's on server

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    There are a few things that get you started scripting wise in CoD2:
    - your map script gets called first
    - then the game calls maps/mp/gametypes/_callbacksetup::CallBack_StartGameType()
    - Kills, Damage, Player Connected, Player Disconnected events get called from the game in _callbacksetup.gsc
    - the gametypes setsup callbacks such that these calls gets redirected to the correct one in tdm.gsc/ctf.gsc etc.
    - images/huds/models and some more need to be 'precached' in the first frame of the game
    - start your game with +developer 1, so the console gives you error messages, there is no debugger, so iPrintln() and runtime errors are your only friends
    - this is only *.gsc files, for menu modding/weapon/effect/model modding its another story
    - https://scripts.zeroy.com/ & https://wiki.zeroy.com/index.php for more keywords etc
    - you call functions on objects: 'player thread myFunc()' -> in myFunc() you can refer to the caller as 'self'
    - minimal waittime (based on server framerate sv_fps is 1/20 = 0.05
    - you shouldn't have infinite loops, or you get a runtime error
    - you can activate bots to help a bit more, just see on tdm.gsc on top the commented out line on addTestClients()
    - gsc files and a few others are serverside, they can stay in your fs_game-folder and arent needed for the clients, images/models/sounds/menus need to be inside an iwd (zip) file and are downloaded on connect

  2. The Following 2 Users Say Thank You to serthy For This Useful Post:

    kung foo man (20th April 2020),vesicant (10th April 2022)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •