I know this can be done without needing to change class at a CP, this unitpack has a unit that does just that:
http://www.gametoast.com/viewtopic.php?f=35&t=27134
The DL link is broken, so here's the version I have if people want to have a look:
http://www.mediafire.com/file/di4ht5f9y ... FICIAL.zip
I don't have access to that source code, so I don't know how to replicate this but I would like to know.
Before someone asks, I've read the sticky link on setproperty() and tried to get it working before posting.
Instantly swap weapons via lua?
Moderator: Moderators
-
WiseKitsune
- Recruit Womprat Killer
- Posts: 8
- Joined: Sun Sep 25, 2016 3:57 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- AnthonyBF2
- Sith

- Posts: 1255
- Joined: Wed Aug 21, 2013 3:55 pm
- Projects :: PS2+PSP Overhaul
Re: Instantly swap weapons via lua?
The Gun Game Mode by Razac920 makes use of a function that instantly respawns the character in place with a new weapon when a condition is met. However, that user didn't publicly release the source files for that mod. I'd ask him for a copy of the source files, he may be busy so don't expect a quick reply. If you can get them, they could be used as a reference.
