Default Weapon. -1 reply

Please wait...

Skrie

Teh Totalconverterer !

50 XP

29th December 2006

0 Uploads

114 Posts

0 Threads

#1 10 years ago

Is there a way to change the default weapon that the player starts with in multiplayer ? (so... say: Instead of starting with just the blaster_pistol... start with the demp2 )

Or a way to add an extra initial weapon ?

I know I can lay it right in front of em at the spawn but that's not the point. ;)




Guest

I didn't make it!

0 XP

 
#2 10 years ago

I know there is a method that works for Quake III, so it should work for JKA. I haven't done it for a while, but I think I remember, but if this doesn't work, I'll have to install radiant and take a look at what I did.

Anyways:

Step 1. Create a info_player deathmatch or similar spawn point.

Step 2. Put the weapon you want the player to start with right next to the player.

Step 3. Select the weapon and then the spawn point and press ctr+k to link the two. You may have to reverse the select order to make the player point to the weapon instead, but one of the two should work. If not, you will probably have to script it in, and I have no clue how to do any scripting.

I hope that helps, if it does, I believe you can add armor and other items as well, if not I will take a closer look to see if I missed a step.




Skrie

Teh Totalconverterer !

50 XP

29th December 2006

0 Uploads

114 Posts

0 Threads

#3 10 years ago

seancsnm;4416020I know there is a method that works for Quake III, so it should work for JKA. I haven't done it for a while, but I think I remember, but if this doesn't work, I'll have to install radiant and take a look at what I did.

Anyways:

Step 1. Create a info_player deathmatch or similar spawn point.

Step 2. Put the weapon you want the player to start with right next to the player.

Step 3. Select the weapon and then the spawn point and press ctr+k to link the two. You may have to reverse the select order to make the player point to the weapon instead, but one of the two should work. If not, you will probably have to script it in, and I have no clue how to do any scripting.

I hope that helps, if it does, I believe you can add armor and other items as well, if not I will take a closer look to see if I missed a step.

It worked as in: the player gets the weapon after spawn.

So... props to you for that. :bows:

But... My intention was to have no visible spawning weapon. But have it in the players inventory from spawn. (I don't like the look of those HUGE emiters at my spawn. ^^ )




JaedenRuiner

Crazy Coding SP Guy...

50 XP

27th December 2002

0 Uploads

168 Posts

0 Threads

#4 10 years ago

Personally, I would most likely not try to attempt it with the maps, but using the source. If you can work on the MP source for this I'd recommend looking at .\cgame\cg_main.c, and the function CG_Init(...); From there you'll see an initial structuring of the initialization of the client game system.

Next, work within .\game\g_client.c, paying particular attention to ClientSpawn(...) which has a lot of Initial spawn data for each player/bot/npc entity. From there you could determine a whole slew of initial starting parameters for each type of game play.

Jaeden "Sifo Dyas" al'Raec Ruiner




Guest

I didn't make it!

0 XP

 
#5 10 years ago

Wait, you mean you see the weapon on the ground before getting it? Hmm, I guess I'd better see if I can figure anything out with that. Also, going by the source would work, but that would eliminate being able to use other mods in your map, so...




heath1992

A well-oiled toaster oven

50 XP

26th January 2007

0 Uploads

298 Posts

0 Threads

#6 10 years ago

Another way to do this is through scripting. Open up BehavEd and add an "affect" command. Double-click it in the script flow, and change "DEFAULT" to "kyle". This makes it so it will affect the current player.Click 'OK'. Now add a "set" command (the first varient). Double-click it in the script flow and use the drop-down menu to find and select "SET_WEAPON". Next, change the "DEFAULT" the the weapon you want the player to have. Here's a list of the the names: WP_STUN_BATON WP_MELEE WP_SABER WP_BRYAR_PISTOL WP_BLASTER WP_DISRUPTOR WP_BOWCASTER WP_REPEATER WP_DEMP2 WP_FLECHETTE WP_ROCKET_LAUNCHER WP_THERMAL WP_TRIP_MINE WP_DET_PACK WP_CONCUSSION Save the script as whatever you want (ex: scripts/test/spawn.txt") and then compile it. Here's a pic of what my script looks like:

Spoiler: Show
script.jpg

Now open up Radiant. Create a brush around your info_player_start, cover it in system/trigger, and make it a trigger_once. Now make a target_scriptrunner. Add the key: 'usescript' and value: 'test/spawn' (or whatever your script was named) to the target_scriptrunner. Control-K link the trigger_once to the target_scriptrunner, save your map, compile, and you're ready to go! I hope this helps.




Guest

I didn't make it!

0 XP

 
#7 10 years ago

I know it would help me!