Tripwire Interactive Forums

Go Back   Tripwire Interactive Forums > Red Orchestra: Ostfront 41-45 Forums > Red Orchestra Modifications > Coding

Reply
 
Thread Tools Display Modes
  #1  
Old 08-01-2006, 04:27 PM
Sent666 Sent666 is offline
Member
 
Join Date: Jun 2006
Posts: 72
Default Bringing it all together!

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...
Reply With Quote
  #2  
Old 08-01-2006, 05:55 PM
Crube Crube is offline
Member
 
Join Date: Mar 2006
Posts: 56
Default

In PostBeginPlay find all the RORoleInfo objects and change search the PrimaryWeapons array for the Kar98. When found replace it with your class.
Reply With Quote
  #3  
Old 08-06-2006, 02:01 AM
IconoclastDX IconoclastDX is offline
Senior Member
 
Join Date: Mar 2006
Posts: 156
Default

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.
Reply With Quote
  #4  
Old 08-06-2006, 02:47 PM
Sent666 Sent666 is offline
Member
 
Join Date: Jun 2006
Posts: 72
Default

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....
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 -4. The time now is 09:51 PM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2005 - 2013, Tripwire Interactive, LLC