Page 1 of 1
Mav's weapon pickup system [Solved]
Posted: Fri Jan 22, 2010 2:39 pm
by General_Nate
Ok guys. This may sound a bit odd, but I need to know how Mav did it. The entire mod relies on that one piece of code. Except, I want you to pickup a weapon once you destroy a prop. Also, if someone picks up a weapon, does the entire soldier class get it, or the entire
side?
Please, I really need to know this code! I usually come up with it on my own now, but this time, I need you help.
Thanks in advance.

Re: Mav's weapon pickup system
Posted: Fri Jan 22, 2010 3:53 pm
by Fiodis
If you look through his WIP for Bakura, you'd see pretty clearly that the dropped objects were flags and he used OnFlagPickup.
Also, I assume you know this, but it can't hurt to point it out just in case: changing a unit's weapon will cause a MP crash.
Re: Mav's weapon pickup system
Posted: Fri Jan 22, 2010 4:22 pm
by General_Nate
Fiodis wrote:If you look through his WIP for Bakura, you'd see pretty clearly that the dropped objects were flags and he used OnFlagPickup.
Also, I assume you know this, but it can't hurt to point it out just in case: changing a unit's weapon will cause a MP crash.
Yes I know all of that. Except the MP crash...

Well, I guess I have a work around for that...
So the weapon replacement code would be:
Code: Select all
SetClassProperty("inf_classname", "WeaponName1", "weap_inf_weaponname") ?
If so, that code would be under: OnObjectKill, right?
All of the sudden I feel real stupid...
If all of that jazz above is right, this can be solve-ified!
EDIT:
Just tried it and it works!
EDIT2:
Wait, what causes the MP crash? The flag pickup command? Or the SetClassProperty() command?
Re: Mav's weapon pickup system [UN-SOLVED]
Posted: Fri Jan 22, 2010 5:44 pm
by Sky_216
Entire class.
This may sound weird, but Mav's way actually seems like the easiest - I made it (flag version) and another (steal from enemy version) before bakura was released and flag works much better.
Re: Mav's weapon pickup system
Posted: Fri Jan 22, 2010 5:47 pm
by Fiodis
The weapon change itself, the SetClassProperty, causes the MP crash.
Re: Mav's weapon pickup system [UN-SOLVED]
Posted: Fri Jan 22, 2010 6:04 pm
by General_Nate
Skyhammer_216 wrote:Entire class.
This may sound weird, but Mav's way actually seems like the easiest - I made it (flag version) and another (steal from enemy version) before bakura was released and flag works much better.
Yeah I know, I already tried it. And sorry, I thought Mav was the first.
Fiodis wrote:The weapon change itself, the SetClassProperty, causes the MP crash.
Blast! Oh well, I guess my work around will work...
EDIT:
Oh yeah, can be solved.