Programming & Scripting

View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

User avatar   Uber Modder Uber ModderMember since: 15.04.2008, 19:40Posts: 2321Location: London, UK Likes: 0
 

 Post Topic: Remove Claymore \ AVmine from inventory if ammo is depleted
PostPosted 03.01.2012, 21:15 
I faced a problem of items - Claymore \ C4 \ AVmine are still exist in player's inventory, even if ammo is depleted. How and where can I make a condition, which checks and removes the item, if it has no ammo?

User avatar   Trainee TraineeMember since: 04.12.2011, 13:56Posts: 191Location: United Kingdom Likes: 0
 

 Post Topic: Re: Remove Claymore \ AVmine from inventory if ammo is deple
PostPosted 23.01.2012, 17:02 
That is one weird question.
If u haven´t got any clays left, then there can´t be any left in inventory.

Plus, C4/Clay/AV Mine are all ammo/weapon combos. Carry 3 mines, place 3, then they should all be gone.

Otherwise probably change code.

DoS


AEGIS Support

Main Project:
Crysis Mod Patcher


Test Projects:
Left 2 Die
User avatar   Uber Modder Uber ModderMember since: 15.04.2008, 19:40Posts: 2321Location: London, UK Likes: 0
 

 Post Topic: Re: Remove Claymore \ AVmine from inventory if ammo is deple
PostPosted 23.01.2012, 17:18 
I already found an answer. But you are wrong. Claymore that you carry in your hand, and the one that you place on the ground, they are not the same. In standard DLL, Claymore weapon is still remaining in inventory, even after ClaymoreExplosive ammo is depleted. Inventory system shows each weapon as it is, so it's important and necessary to remove the Claymore\AVMine\C4 weapons, when they have no ammo.
I solved Claymore\AVMine.

But C4 is a real problem. If I remove it after last projectile fired (I mean, last C4Explosive planted), the detonator won't work properly. It will just not explode planted explosives. And I don't even know, how to fix that.
User avatar   Trainee TraineeMember since: 04.12.2011, 13:56Posts: 191Location: United Kingdom Likes: 0
 

 Post Topic: Re: Remove Claymore \ AVmine from inventory if ammo is deple
PostPosted 25.01.2012, 18:23 
Oh, thanks for telling me. I hadn´t expected that one still has stuff in inv after placing it.

Concernig C4: Hm....thats definitely tricky.You could try a delayed removal, but that wouldn´t help.I´m not sure whether u can do anything about that.

DoS


AEGIS Support

Main Project:
Crysis Mod Patcher


Test Projects:
Left 2 Die