![]() |
|
|
#1 |
|
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. |
|
|
|
|
|
#2 |
|
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. |
|
|
|
|
|
|
#3 |
|
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?
|
|
|
|
|
|
#4 |
|
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. |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|