AmmoGain with multiple weapons

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

Post Reply
User avatar
Kyb
Posts: 383
Joined: 18 Aug 2011, 20:50

AmmoGain with multiple weapons

Post by Kyb » 08 Jun 2013, 17:11

Hi,

I would like to know how to have an ammo gain for weapons that aren't in player's hand ? (like Combo or SDpro) I looked at the Combo script, but I haven't found the function that allowed to do that.

Any idea ?

User avatar
steeffeen
Translator
Translator
Posts: 2472
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: AmmoGain with multiple weapons

Post by steeffeen » 08 Jun 2013, 19:05

you can't set different AmmoGain's for each weapon

if you really want to modify the current ammo of a specific weapon you could use

Code: Select all

Void 	SetPlayerAmmo (CSmPlayer Player, EWeapon Weapon, Integer Count);
Void 	AddPlayerAmmo (CSmPlayer Player, EWeapon Weapon, Real DeltaCount);
(didn't test it though)
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks

    User avatar
    Kyb
    Posts: 383
    Joined: 18 Aug 2011, 20:50

    Re: AmmoGain with multiple weapons

    Post by Kyb » 08 Jun 2013, 20:15

    Ok, thanks.
    I will try to make a function based on the last switch Time and the AmmoGain I want for the weapon to add an amount of ammo when the player will switch weapon. But i need to know the AmmoGain Multiplier for each Weapon (or the time to reload 1 ammo with AmmoGain = 1).
    Someone know when I can find these values ?

    User avatar
    steeffeen
    Translator
    Translator
    Posts: 2472
    Joined: 14 Oct 2012, 16:22
    Location: Germany

    Re: AmmoGain with multiple weapons

    Post by steeffeen » 08 Jun 2013, 20:19

    easiest way to get these values is calculating the time between 2 shots
    (spam out all your ammunition and keep holding "shoot", then measure the delay between the shots)
      Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

      ManiaControl, FancyManiaLinks

      Post Reply

      Return to “ManiaScript”

      Who is online

      Users browsing this forum: No registered users and 2 guests