Custom Modding and GSC Support
Featured Replies
Сейчас на странице 0
- Нет пользователей, просматривающих эту страницу
A better way to browse. Learn more.
A full-screen app on your home screen with push notifications, badges and more.
Используя этот сайт, вы соглашаетесь Условия использования.
If you haven't made mods before, this topic isn't for you. Any stupid replies will make me mad.
IW4M, as of r22, has an awesome feature. That feature, is loading custom gsc files.
In the past, you always had to overwrite another gsc file in order for your script to load, and in most cases, you overwrote _rank.gsc. (you murderer)
This worked good enough, until big mods started using the same file (again, _rank.gsc :| ), which lead to only one mod being loaded, and causing massive compatibility issues, also causing the need to merge mods.
IW4M fixes this. Now you can write your scripts without using any other file as a base. All you need to do is to put your custom script inside the scripts folder, for example, in an IWD:
Or in the raw folder:
If the raw folder doesn't exist, just create it.
As always, putting the IWD inside the 'mods' folder which is what aIW had will work too.
An example script to set you off:
#include common_scripts\utility; #include maps\mp\_utility; #include maps\mp\gametypes\_hud_util; init() { level thread onPlayerConnect(); } onPlayerConnect() { for(; { level waittill( "connected", player); player thread onPlayerSpawned(); player thread onJoinedTeam(); } } onJoinedTeam() { self endon("disconnect"); for(; { self waittill( "joined_team" ); //player joined team code here } } onPlayerSpawned() { self endon("disconnect"); for(; { self waittill("spawned_player"); //player spawned code here } }Note: init() must be defined. It is the function which IW4M will call on load.
Some example console printing of what should happen: