News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Reply
 
Thread Tools Display Modes
Old 17th Jan 2004, 04:14 AM   #1
CybrSwami
Registered User
 
Join Date: Jan. 17th, 2004
Posts: 2
Perhaps this is simple

hello all,

this is my first post here on the beyond unreal forums and i am glad to see that the modding community for ut2k3 is alive and well. i have a question that might be overly simple and i apologies if it is in advance.

i have coded a series of melee weapons and the code for each weapon works without problem, i have modified the utclassic mutator code to get the new weapons to replace the weapons in the game in a mutator/arena style.

however, i am finding two problems with this.

Problem 1) if i use the ut classic as the base code for the mutator to get the weapons to work then the assault rifle does not change into my weapon, the sword. so you have the hands replacing teh shield gun but then you have this assault rifle with grenades as your second weapon and then axes adn clubs etc. for the other weapons, this ofcourse is extremely agravating. so the question is is there a simple line of code i am missing or need to add to get this mutator to also replace the assault rfile with the sword?

problem 2) when i cheat and use a second mutator to get work around the above problem i can get the sword in as the second weapon, however, none of the weapons appear in multiplayer, in single player vs bots all is fine all pickup work and all wepons work as they should but a second player can not pick anythign up and no pickup models exist and the second player does nto even ahve a weapon at all. thus i am assuming that the workaround is not working hence why i am here asking for some guidance and hopefully some help

thanks guys hope i have explained the problem if you would like i can paste the code.
CybrSwami is offline   Reply With Quote
Old 17th Jan 2004, 08:32 AM   #2
Sir_Brizz
More Than Just Mad Skill
 
Sir_Brizz's Avatar
 
Join Date: Feb. 3rd, 2000
Location: >:3
Posts: 25,485
you need to replace the weapons in the DefaultInventory. I'm at work just trying to get you started. There is an Inventory array for your Pawn that holds the weapons they are supposed to spawn with. You need to alter this array manually before the players spawn.
__________________
64 65 61 74 68 62 6f 6f 67 65 72 73 20 6d 6f 74 68 65 72 20 6f 66 20 63 6f 75 72 73 65

Liandri Archives - A veritable smorgasbord of information about the Unreal series
If Titanic taught me anything, it's to never let go until you're a frozen corpse staring hopelessly into a barren horizon.
Sir_Brizz is offline   Reply With Quote
Old 23rd Jan 2004, 04:17 AM   #3
CybrSwami
Registered User
 
Join Date: Jan. 17th, 2004
Posts: 2
thanks for the advice jsut a bit of clarification please as i am a bit stupid but is DefaultInventory in the Mutator code or should i put it in as a game rule?
CybrSwami is offline   Reply With Quote
Old 23rd Jan 2004, 02:50 PM   #4
meowcat
nothing new under the sun
 
meowcat's Avatar
 
Join Date: Jun. 7th, 2001
Posts: 750
What sir_brizz was talking about was that in the pawn class (take a a look at the default properties for xPawn in the xGame.u file specifically) there is an array that lists what weapons a pawns will always start. Since i don't have the script in front of me I don't remeber what code is responsible for spawning those weapons and giving them to the pawn, but i think you have two choices (for mutator code that is).
In the modifypawn function of the mutator class, you could search the pawn's inventory for the weapon and try to remove it if they already have it, and also change the entries in the "RequiredEquipment" array (This is important because then you would not have to do the inventory check again if they respawn) to either your weapons or no weapons. Or you could do your check in the checkreplace function and try to change the pawns required equipment there.
meowcat is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:03 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer