Okay I'm trying something at the moment...
Is it possible that if you pick up an ammo pack or something like that, you get a weapon? Maybe there's a lua command for this?
Pick up object ---> Give weapon?
Moderator: Moderators
-
Aman/Pinguin
- Jedi

- Posts: 1104
- Joined: Tue Jan 30, 2007 6:04 am
- Projects :: Inactive
- Location: Germany
-
Caleb1117
- 2008 Most Original Avatar
- Posts: 3096
- Joined: Sun Aug 20, 2006 5:55 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: X-Fire: caleb1117 ಠ_ಠ
Re: Pick up object ---> Give weapon?
It is possible, but it would affect every class of the type.
So you pick up a rifle, every other unit of whatever class you are, gets one too.
So you pick up a rifle, every other unit of whatever class you are, gets one too.
-
Aman/Pinguin
- Jedi

- Posts: 1104
- Joined: Tue Jan 30, 2007 6:04 am
- Projects :: Inactive
- Location: Germany
Re: Pick up object ---> Give weapon?
And HOW does it work? 
- 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: Pick up object ---> Give weapon?
I don't know much about this. Zerted has said it is possible to have pick-upable weapons. Does he mind if he explains how this might work publicly? 
-
Aman/Pinguin
- Jedi

- Posts: 1104
- Joined: Tue Jan 30, 2007 6:04 am
- Projects :: Inactive
- Location: Germany
Re: Pick up object ---> Give weapon?
Hopefuly... 
EDIT: Is there maybe a way, to activate award weapons with Picking up a item?
EDIT: Is there maybe a way, to activate award weapons with Picking up a item?
-
Syth
- General

- Posts: 784
- Joined: Thu Apr 13, 2006 8:46 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: happy fun island
Re: Pick up object ---> Give weapon?
Well im definitely not zerted, but basically picking up a flag is an "event", and on an event you can set things to happen, like changing a units inventory. But im pretty sure you can't have the game recognize what unit your currently useing, and i know the changes you make will apply to all of that specific unit.
So if as a clone sniper (if there was a way for the game to recognize you as a sniper) you pick up a weapon (technically a flag), all snipers will get that weapon(which may cause crashing).
So if as a clone sniper (if there was a way for the game to recognize you as a sniper) you pick up a weapon (technically a flag), all snipers will get that weapon(which may cause crashing).
-
Aman/Pinguin
- Jedi

- Posts: 1104
- Joined: Tue Jan 30, 2007 6:04 am
- Projects :: Inactive
- Location: Germany
Re: Pick up object ---> Give weapon?
Don't worry, I've got a solucion for this. I don't tell which one though
.
-
RepSharpshooter
- Gametoast Staff

- Posts: 1351
- Joined: Tue Jul 10, 2007 4:10 pm
Re: Pick up object ---> Give weapon?
I am interested in this as well. I'm trying to look through the luas to find something of use.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Pick up object ---> Give weapon?
When you modify a unit's weapon midgame, it basically will affect every unit of that class spawned thereafter. I've never tested it with multiple units of the same class on the field, but I don't think that a crash would be caused by increasing the amount of units.
Basically, the way it works is when an event is triggered (like the flag pickup mentioned earlier), you modify the property WeaponName in the unit's .odf through the .lua command SetClassProperty. You can only modify that property if it had a previously existing property, so you couldn't "create" a weaponslot if one didn't exist before.
Also, like I mentioned, this change is only applied to all units spawned after the change is made. Therefore, you'd have to make it so that the player either reselected the unit from a command post or that the player was forced to respawn.
Basically, the way it works is when an event is triggered (like the flag pickup mentioned earlier), you modify the property WeaponName in the unit's .odf through the .lua command SetClassProperty. You can only modify that property if it had a previously existing property, so you couldn't "create" a weaponslot if one didn't exist before.
Also, like I mentioned, this change is only applied to all units spawned after the change is made. Therefore, you'd have to make it so that the player either reselected the unit from a command post or that the player was forced to respawn.
