count_coder Posted October 7, 2004 Share Posted October 7, 2004 Hello, first I just wanted to thank everyone who still hangs out around here to answer all my silly and sometimes retarded questions.. Everyone of you are a great help.. Thank you.. Anyway, on to my question.. I've made a simple class system.. Basically I have Dark Jedi and Light Jedi.. I want them to spawn with set force powers.. I'm not sure how to do this. I know how to spawn them with unique weapons but I can't figure out how to do this.. Also, on a some what related note.. is it possible to spawn with the jet pack or cloaking device? I know when you type /giveall or whatever you get them.. anyway.. Thank you very much:bdroid2: Link to comment Share on other sites More sharing options...
razorace Posted October 8, 2004 Share Posted October 8, 2004 Can't really help you with the forcepowers but I do know that you could make players spawn with the jet pack or cloak by editting the clientspawn function in g_client (I think). Link to comment Share on other sites More sharing options...
count_coder Posted October 8, 2004 Author Share Posted October 8, 2004 do you know where to put it? i thought it would be where i have my custom class switch (client->pers.playerclass) { case PCLASS_SCOUT: client->ps.stats[sTAT_WEAPONS] |= (1 << WP_BLASTER); client->ps.ammo[AMMO_BLASTER] = 100; client->ps.cloakFuel = 100; client->ps.stats[sTAT_HOLDABLE_ITEMS] |= ( 1 << HI_CLOAK ); client->ps.stats[sTAT_WEAPONS] |= (1 << WP_REPEATER); client->ps.ammo[AMMO_METAL_BOLTS] = 100; break; the weapons work but the cloak does not.. :/ any ideas? thanks Link to comment Share on other sites More sharing options...
razorace Posted October 8, 2004 Share Posted October 8, 2004 hmmm, interesting. Try checking how the cloak power-up item acts when it's get picked up. Link to comment Share on other sites More sharing options...
count_coder Posted October 8, 2004 Author Share Posted October 8, 2004 What do you mean how it acts? do you mean /*QUAKED item_seeker (.3 .3 1) (-8 -8 -0) (8 8 16) suspended 30 seconds of seeker drone */ { "item_cloak", "sound/weapons/w_pkup.wav", { "models/items/psgun.glm", //FIXME: no model 0, 0, 0} , /* view */ NULL, /* icon */ "gfx/hud/i_icon_cloak", /* pickup */// "Seeker Drone", 120, IT_HOLDABLE, HI_CLOAK, /* precache */ "", /* sounds */ "", "@MENUS_CLOAK_DESC" // description }, under bg_misc? anyway Also I tried just starting with the seeker and a medpac (bactca canister?) and i still dont spawn with them.. In fact I can't seem to find bacta or a seeker drone as pick ups in any level in ja, do you know a level that has one of these? client->ps.stats[sTAT_HOLDABLE_ITEMS] |= ( 1 << HI_MEDPAC ); client->ps.stats[sTAT_HOLDABLE_ITEMS] |= ( 1 << HI_SEEKER ); Link to comment Share on other sites More sharing options...
razorace Posted October 9, 2004 Share Posted October 9, 2004 hmmm, interesting. My guess is that you placed the code in a spot where it only works for some gametypes. Link to comment Share on other sites More sharing options...
count_coder Posted October 9, 2004 Author Share Posted October 9, 2004 yeah.. i have it for my custom gametype (which is just ffa with a fancy new name) and for duel.. those two gametypes are the only ones that my classes work for. Link to comment Share on other sites More sharing options...
razorace Posted October 9, 2004 Share Posted October 9, 2004 Are you sure that the clientspawn is trying to set it for that gametype then? Link to comment Share on other sites More sharing options...
count_coder Posted October 9, 2004 Author Share Posted October 9, 2004 BOTF is my gametype but I also have the class thing workable for duel and ffa if (g_gametype.integer == GT_BOTF || GT_FFA || GT_DUEL) { client->ps.stats[sTAT_WEAPONS] &= ~(1 << WP_BRYAR_PISTOL); client->ps.stats[sTAT_WEAPONS] &= ~(1 << WP_SABER); client->ps.stats[sTAT_WEAPONS] |= (1 << WP_MELEE); if (client->ps.stats[sTAT_WEAPONS] & (1 << WP_SABER)) { client->ps.weapon = WP_SABER; } else if (client->ps.stats[sTAT_WEAPONS] & (1 << WP_BRYAR_PISTOL)) { client->ps.weapon = WP_BRYAR_PISTOL; } else { client->ps.weapon = WP_MELEE; } switch (client->pers.playerclass) { case PCLASS_SCOUT: client->ps.stats[sTAT_WEAPONS] |= (1 << WP_BLASTER); client->ps.ammo[AMMO_BLASTER] = 100; client->ps.cloakFuel = 100; client->ps.stats[sTAT_HOLDABLE_ITEMS] |= ( 1 << HI_CLOAK ); client->ps.stats[sTAT_HOLDABLE_ITEMS] |= ( 1 << HI_MEDPAC ); client->ps.stats[sTAT_HOLDABLE_ITEMS] |= ( 1 << HI_SEEKER ); break; thats my code.. its right after the siege stuff.. about lines 3333 I'm not sure if this is what you asked.. For some reason I'm not getting it 100% I guess i'm slow today Link to comment Share on other sites More sharing options...
razorace Posted October 9, 2004 Share Posted October 9, 2004 Well, first off, your code is kind of sloppy. The first two lines remove the pistol and saber and then you do some checks as if you still might have them. Secondly, from experience I don't think the g_gametype.integer == GT_BOTF || GT_FFA || GT_DUEL will nessicarily work. I've had situations where I had to do it like.... g_gametype.integer == GT_BOTF || g_gametype.integer == GT_FFA || g_gametype.integer == GT_DUEL Anyway, I don't know why your class code isn't actually working. Have you tried using breakpoints to determine if the data path is going to there? Link to comment Share on other sites More sharing options...
count_coder Posted October 9, 2004 Author Share Posted October 9, 2004 I know the saber stuff is sloppy.. I couldn't figure out how to disable sabers for the non jedi classes..but I have since figured it out and I just haven't gone around and deleted that old code.. Anyway... Thanks for your help.. I have another question.. If you don't mind.. Since u don't know how to make pre-defined force powers.. How hard would it be to swap out the force powers? Like make force saber throw a dark side power.. I would have to edit the UI source, along with alot of other stuff right? Link to comment Share on other sites More sharing options...
razorace Posted October 9, 2004 Share Posted October 9, 2004 Uh, actually, try checking out the clientspawn for how it sets the force powers for the siege classes. That should help you out. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.