![]() |
![]() |
|
#1
|
|||
|
|||
|
I am doing some simple mutators just for practice, and ran into a problem! I subclassed the Kar98Weapon file and edited some of its default properties. This compiled fine! I then subclassed the german rifleman file, and assigned it my newly edited Kar98 file. This compiled fine too! But surely subclassing isn't enough to make it work? Because it doesn't! I found out I need to bring it together using another file. This file would subclass the mutator class and assign the default properties (mutator name, description). But now I'm stumped! I'm not sure how to bring it together. Do I use modifyplayer()? Or checkreplacement? I'm not sure...
|
|
#2
|
|||
|
|||
|
In PostBeginPlay find all the RORoleInfo objects and change search the PrimaryWeapons array for the Kar98. When found replace it with your class.
|
|
#3
|
|||
|
|||
|
If you ever get this to work then please post the code (just the mutator). Im trying to do something similar with checkreplacement and am having the worst time with it.
|
|
#4
|
|||
|
|||
|
Yes, well I got this to work with my Melee-Only mutator. But I didn't use checkreplacement. I used an iterator to search through all the actors and it replace it with my own things. Go to the unreal wiki and type 'foreach' it's a type of iterator and it has a number of functions to go with it, like 'foreach AllActor()'. It worked for me....
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|