I remember a few eons ago, someone posted a topic about 'pickupable' weapons. In that thread, Zerted said it would be possible to change the ODF ingame, but it would change all the units that share that ODF.
Now I'm interested in making a unit's ODF properties change ingame (regardless of the bug) for a map I'm working on. Would anyone know how to do that?
Changing ODF ingame
Moderator: Moderators
- trainmaster611
- Sith Lord

- Posts: 1779
- Joined: Thu Aug 24, 2006 5:22 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Building a railway to Coruscant
- Contact:
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Changing ODF ingame
You've got to tell us what you want to do. You can change some things, and you can't change others.
- trainmaster611
- Sith Lord

- Posts: 1779
- Joined: Thu Aug 24, 2006 5:22 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Building a railway to Coruscant
- Contact:
Re: Changing ODF ingame
I was going to change the weapon.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Changing ODF ingame
More specific. Melee weapons can't be changed, everything else can be changed using SetClassProperty (example below), provided it replaces an already-existing weapon (I did this in Spira: Besaid, if you want an example of how it would work).trainmaster611 wrote:I was going to change the weapon.
Ex.
Code: Select all
SetClassProperty("all_inf_unit", "WeaponName1", "all_weap_inf_weapon")
SetClassProperty("all_inf_unit", "WeaponAmmo1", "5")- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: Changing ODF ingame
Changing most weapon properties causes crashes for other players in MP games.
