![]() |
![]() |
|
#1
|
|||
|
|||
|
Im kinda new to UnrealScript, and trying to make a pistol only mod.
Somehow it doesnt work. Code:
//=======================================================================
// Pistol Only mod, DUH!
// Author: Moffia
// There are copyrights and sit on here :)
//=======================================================================
class PistolOnly extends Mutator;
function ModifyPlayer(Pawn Other)
{
Other.GiveWeapon("ROInventory.P08LugerWeapon");
Other.GiveWeapon("ROInventory.P38Weapon");
Other.GiveWeapon("ROInventory.TT33Weapon");
}
Compiler also gives no errors...
__________________
|
|
#2
|
||||
|
||||
|
Quote:
What you may have to do (and I'm guessing here.. so bear with me.. and I might be wholey off-base).. Make the mutator modify the weapons loadout for the roles. /me digs around in his UnCodeX dump from the sdk.... You can probably do this at a few points.. Mutate the RO Role Info's to force only certain weapons to be available After a player spawns, call ROEngine.ROPlayer.changeWeapons to force all players to only have the weapons loadout you want. and if you want to do this on a map-for-map basis, you could just open up the map, set the loadouts how you want, and save it under a different name :] I think there was a weapons mutator for the mod.. might want to try and track that down and see how they did it. |
|
#3
|
|||
|
|||
|
i think i have a better idea.
make my own 2 roles, for axis and allies and disable the other ones :O EDIT: all done, and i wanted to compile, but i get this strange error: Quote:
__________________
Last edited by Moffia; 06-29-2006 at 11:54 AM. |
|
#4
|
||||
|
||||
|
Quote:
|
|
#5
|
|||
|
|||
|
well, when i delete the RORoleInfo.uc in the pistolonly folder i get even more errors (4)
Quote:
__________________
|
|
#6
|
||||
|
||||
|
Quote:
No.. the error is simple.. the class you wrote has to Inheirt (extend) a different class.. Deleting a local version of your source RO classes won't help.. and as you saw, it's just making it worse. In a nutshell, I'd guess you are trying to extend the wrong class... at least according to the compiler. |
|
#7
|
|||
|
|||
|
FYI, I don't think you can add or remove the existing RORoleInfo objects in
existing maps because RORoleInfo has bStatic=True. If someone knows a way around this I would like to see it. It would be nice if the RO Dev team would change how the role system works so that mutators can modify the available roles. Maybe use an array in the ROLevelInfo. |
|
#8
|
|||
|
|||
|
the thing is i took for both Axis and Allies a sniperguy and edited, ant then only putted the needed .uc files in the golder. (I went looking @ at the extends)
man i can't find the problem, would it help if i put the code here?
__________________
Last edited by Moffia; 06-30-2006 at 02:37 AM. |
|
#9
|
|||
|
|||
|
Well, posting code would help find the error, however I think you're going about it wrong anyway.
This is what you need to do to create a pistol only mod. 1. iterate though each of the RORoleInfo objects in the PostBeginPlay() function of you Pistolonly class. example: foreach AllActors( class'ROEngine.RORoleInfo', A ) 2. In each RORoleInfo, clear out the PrimaryWeapons SecondaryWeapons arrays. Example: for( i=0; i < 3; i++) { A.SecondaryWeapons[i].Item = none; A.SecondaryWeapons[i].Amount = 0; A.SecondaryWeapons[i].AssociatedAttachment = none; 3. Add the Pistol class to the PrimaryWeapons of each A.PrimaryWeapons[0].Item = class'ROInventory.P38Weapon'; A.PrimaryWeapons[0].Amount = 1; |
|
#10
|
|||
|
|||
|
well, he says there is a wrong parameter with that code. however, i think it's not possible, becasue when i just try to compile the plain RORoles map there is a generic protection fault...
__________________
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|