I have an issue combining items. When I create items on the ground, they have their charges set to the max charges, but only for the triggers (so it is no visible). If a unit pick it, the item has the normal charges, and after drop the item works as intended for the triggers and won't produce this bug.
I'd like to know if there is a better fix than to use an invisible unit to drop every created items.
I thought item stacking was innate into the game. At least that is how UA3 ammo chests worked. The only issue started when combining different items such as magazine and ammo chest as the game does not do that automatically. Maybe you are asking a different question.
You should be able to both get and set item charges with triggers. It is possible that freshly created items may not have charge data attached to them until either they are picked up or a trigger sets it. If this is the case then try setting charges to the intended amount the instant you create the item. This can be done automatically without trigger coded constants by looking up the charge values for the items using catalog natives.
But maybe you can save some time for me, how do you set the charge of the item with a trigger ? It seems that I can only add charges (or negative charges) so if the charges are not set, I don't know which result it can have.
I finally understood.
So if anybody has the same issue, I remove charges from the max charges to get the number of charges initialized to the number I want. So if the number max is 10, and I want 3 charges, I remove 7 just after the item was created. And the charges are now initialized for the triggers =)
Now I need a fix for my insomnia, I work such faster in form =/
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello,
I have an issue combining items. When I create items on the ground, they have their charges set to the max charges, but only for the triggers (so it is no visible). If a unit pick it, the item has the normal charges, and after drop the item works as intended for the triggers and won't produce this bug.
I'd like to know if there is a better fix than to use an invisible unit to drop every created items.
I thought item stacking was innate into the game. At least that is how UA3 ammo chests worked. The only issue started when combining different items such as magazine and ammo chest as the game does not do that automatically. Maybe you are asking a different question.
You should be able to both get and set item charges with triggers. It is possible that freshly created items may not have charge data attached to them until either they are picked up or a trigger sets it. If this is the case then try setting charges to the intended amount the instant you create the item. This can be done automatically without trigger coded constants by looking up the charge values for the items using catalog natives.
It is exactly my question, thanks.
But maybe you can save some time for me, how do you set the charge of the item with a trigger ? It seems that I can only add charges (or negative charges) so if the charges are not set, I don't know which result it can have.
Hmm actually the result is that the item get max charges anyways. That is what I try to avoid.
I finally understood. So if anybody has the same issue, I remove charges from the max charges to get the number of charges initialized to the number I want. So if the number max is 10, and I want 3 charges, I remove 7 just after the item was created. And the charges are now initialized for the triggers =)
Now I need a fix for my insomnia, I work such faster in form =/