Darth_Kitty Posted October 26, 2005 Share Posted October 26, 2005 Hey there, I implemented this calss system into my SDK: http://www.mt-wudan.com/wu_tut.php?t=jk2_qboolean but how do I use it? When i run the game it appears to have done nothing. Is there more to do too show the classes? Link to comment Share on other sites More sharing options...
GangsterAngel Posted October 27, 2005 Share Posted October 27, 2005 yes, alot more DK . its mainly UI editing ( to get the heads to show for the right class ) and the heads that are not defined in a class to show in the normal headlist. heres a example of some of the JKG class code ( in UI ) UI_Main.c /* ================== UI_HeadCountByColor ================== */ static int UI_HeadCountByColor() { int i, c; char *teamname; c = 0; switch(uiSkinColor) { case TEAM_BLUE: teamname = "/blue"; break; case TEAM_RED: teamname = "/red"; break; case TEAM_HEROS: teamname="/hero"; break; case TEAM_DROIDS: teamname="/"; break; case TEAM_CLONES: teamname="/"; break; default: teamname = "/default"; } // Count each head with this color for (i=0; i<uiInfo.q3HeadCount; i++) { if (uiInfo.q3HeadNames[i] && strstr(uiInfo.q3HeadNames[i], teamname)) { if(HiddenHead(i)==1)continue; c++; } } return c; } int HiddenHead(int i) { char modelStr[MAX_QPATH]; char skin[MAX_QPATH]; char *skins; strcpy(modelStr,uiInfo.q3HeadNames[i]); if ( ( skins = strchr( modelStr, '/' ) ) == NULL) { skins = "default"; } else { *skins++ = 0; } strcpy(skin,modelStr); //=========================HEROS===============================// //xus_maulvms if(uiSkinColor!=TEAM_HEROS) { if (Q_stricmp (skin, "vadervmm") == 0 || Q_stricmp (skin, "maul") == 0 || Q_stricmp (skin, "grievous") == 0 || Q_stricmp (skin, "xus_maulvms") == 0 || Q_stricmp (skin, "hs_dooku") == 0 || Q_stricmpn(skin, "vader",5) ==0 ) { return 1; } } //=========================/HEROS===============================// //=========================CLONES===============================/ if(uiSkinColor!=TEAM_CLONES) { if(Q_stricmpn(skin, "mandolor",8) ==0 || Q_stricmpn(skin, "clonespac",9) ==0 || Q_stricmpn(skin, "new_clonepilot",14) ==0 ) { return 1; } } if(uiSkinColor==TEAM_CLONES) { if(Q_stricmpn(skin, "mandolor",8) ==0 || Q_stricmpn(skin, "clonespac",9) ==0 || Q_stricmpn(skin, "new_clonepilot",14) ==0 ) { return 0; }else{ return 1; } } //=========================/CLONES===============================// //========================= DROIDS =============================== if(uiSkinColor!=TEAM_DROIDS) { if(Q_stricmpn(skin, "droidika_player",15) ==0 || Q_stricmp(skin, "RCbattledroid") ==0 ) { return 1; } } if(uiSkinColor==TEAM_DROIDS) { if(Q_stricmpn(skin, "droidika_player",15) ==0 || Q_stricmp(skin, "RCbattledroid") ==0 ) { return 0; }else{ return 1; } } //========================= /DROIDS ================================ return 0; } theres quite alot of stuff to do for making classes in UI . u have to look around ui_main.c seach for "TEAM_RED" and evrywhere u find "TEAM_RED" do exactly the same but for example TEAM_DROIDS but obviously read the code and change it acordingly. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.