Jump to content

Home

Pre-defined force powers?


count_coder

Recommended Posts

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

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

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

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...