[Solved] How to dissociate direct hit and AOE?

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

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

Re: [Solved] How to dissociate direct hit and AOE?

Post by steeffeen »

see http://forum.maniaplanet.com/viewtopic.php?t=27903 regarding the actual topic of this thread
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks
    User avatar
    fleo
    Posts: 304
    Joined: 02 Sep 2011, 12:56

    Re: [Solved] How to dissociate direct hit and AOE?

    Post by fleo »

    djhubertus wrote:I have the same, gauge sound are looping and to stop, player need to leave server.
    I found a trick to avoid that (at least the time to find where that glitch is from): Because that loop started only when a player eliminated his last opponent with his custom weapon in the Slot_A, I unequipped this weapon right after the elimination. So I put this line of code at the end of the OnArmorEmpty event:

    Code: Select all

    ActionBind(Event.Shooter,CSmMode::EActionSlot::Slot_A,CSmMode::EActionInput::None);
    It's no big deal because the round ends right after.
    Follow me on my maniaflash. Try the new elitealternative! Feedbacks on this post. :thumbsup:

    ♫ I need αεяø. I'm holding out for αεяø 'til the end of the night. ♫
    User avatar
    fleo
    Posts: 304
    Joined: 02 Sep 2011, 12:56

    Re: How to dissociate direct hit and AOE?

    Post by fleo »

    I have another question to come back to the actual topic of this thread:
    Cerovan wrote:Nevertheless, with a custom-created weapon, you can specify the damage done by a direct hit and those within an AoE (http://maniaplanet.github.io/documentat ... eapon.html).

    Look at the values "Damage Radius" and "Damage Radius Attenuation" in the Gameplay explosion tab of the bullet :thumbsup:
    I used that but I'm now wondering, is it possible to create a bullet which makes a +2 for a direct hit, a +1 for hit by aoe and nothing further? Because I put Damage Radius = 2 and Damage Radius Attenuation = 1 and damages = 200 so the weapon deals between 200 and 100 damages (+2 or +1) from a distance of 0 to 1m.

    The problem is if the explosion is not so close to the target (between 1 and 2m to be exact), damages are between 100 and 0. So it doesn't make a +1 (that's what I want) but the victim feels an impact (because of the sound triggered when you're hit, even if the damages are lower than 100 and event if I discard the onhit event). It's quite confusing during a play, you're not sure if you've been hit or not...

    Is it possible to create a damage attenuation between 200 and 100 then directly 0? Or something similar. Thx!
    Follow me on my maniaflash. Try the new elitealternative! Feedbacks on this post. :thumbsup:

    ♫ I need αεяø. I'm holding out for αεяø 'til the end of the night. ♫
    User avatar
    phil13hebert
    Posts: 564
    Joined: 29 Oct 2011, 14:11
    Location: Québec

    Re: [Solved] How to dissociate direct hit and AOE?

    Post by phil13hebert »

    You could just verify that the damage is under 100 and pass if it is.

    Code: Select all

    if (Event.Param1 == "damage" && ...) {
        if (Event.Param2[0] < 100) {
            PassOn(Event);
        } else {
            // Remove armor
        }
    }
    OS: Windows 7 64 bit
    CPU: Intel Core i7 3770 @ 3.40Ghz
    RAM: 8GB DDR3 798MHz
    GPU: Nvidia GeForce GTX 660 1536MB
    Motherboard: Intel 0KM92T
    Sound: 7.1
    Peripherals: Logitech G510, SteelSeries sensei raw, Corsair vengeance 1500
    User avatar
    fleo
    Posts: 304
    Joined: 02 Sep 2011, 12:56

    Re: [Solved] How to dissociate direct hit and AOE?

    Post by fleo »

    What's the difference between discard and passon? Because I'm doing what you said with the discard function. The victim is not really hit (no +1, no hit sound, no damages) but there is that disturbing sound, you know the same as during warm-up.

    I just thought about a simple solution, I'll short the radius to 1m and if a player gets some damages (from 1 to 199), I'll transform this amount to 100 to have a +1. Should work.
    Follow me on my maniaflash. Try the new elitealternative! Feedbacks on this post. :thumbsup:

    ♫ I need αεяø. I'm holding out for αεяø 'til the end of the night. ♫
    Post Reply

    Return to “ManiaScript”

    Who is online

    Users browsing this forum: No registered users and 1 guest