By removing the "CUIConfig::EUISound::Silence" you hear the sound ? (or put a blank "")djhubertus wrote:Code: Select all
UIManager.UIAll.SendNotice(TextLib::Compose(_("$<%1$> has hit $<%2$>"), Event.Shooter.Name, Event.Victim.Name), CUIConfig::ENoticeLevel::PlayerInfo, Null, CUIConfig::EAvatarVariant::Default, CUIConfig::EUISound::Silence, 0);
[Solved] How to dissociate direct hit and AOE?
Moderator: English Moderator
Re: [Solved] How to dissociate direct hit and AOE?
Online Programmer & Meme Master ヾ(âŒâ– _â– )ノ
Access to your Player Page
You have troubles, please contact the Ubisoft Support
Maniaplanet Documentation (Editors, Scripting, Title Pack, etc...)
Access to your Player Page
You have troubles, please contact the Ubisoft Support
Maniaplanet Documentation (Editors, Scripting, Title Pack, etc...)
Re: [Solved] How to dissociate direct hit and AOE?
But what sounds are we talking about exactly?
Because I'm using a modified version of the Elite script and sounds are triggered manually there:
So I did the same for custom weapons, that's no big deal. The +1 visual notification is quite harder to code because I'm lost in all the manialinks in Elite 
And I'm quite confuse about how to use custom weapons. I currently use ActionLoad and ActionBind to equip them. I also use ActionBind(_Player,CSmMode::EActionSlot::Slot_X,CSmMode::EActionInput::None); to unequipped them. But I don't know if I have to unload them. For example if I want a custom weapon not to reload while I'm using a Storm weapon (same behaviour as in Combo for instance, a weapon doesn't reload when it's not equipped), should I unload the weapon from the player or should I modify the energy of the weapon like we do with SetPlayerAmmo? And the other way, how to prevent the Storm weapon to reload when I'm equipped of the custom one? I'm not sure that clear

Code: Select all
// Elim attacker
if (Players[G_AtkPlayerId].Armor - Event.Damage <= 0 && Event.Victim.Id == G_AtkPlayerId) {
PlaySound(CUIConfig::EUISound::VictoryPoint, 0);
AtkIsEliminated = True; ///< Set atk elimination at the frame of the hit, not the next OnArmorEmpty
}
// Hit attacker
else {
PlaySound(CUIConfig::EUISound::TiePoint, SoundVariant);
}

And I'm quite confuse about how to use custom weapons. I currently use ActionLoad and ActionBind to equip them. I also use ActionBind(_Player,CSmMode::EActionSlot::Slot_X,CSmMode::EActionInput::None); to unequipped them. But I don't know if I have to unload them. For example if I want a custom weapon not to reload while I'm using a Storm weapon (same behaviour as in Combo for instance, a weapon doesn't reload when it's not equipped), should I unload the weapon from the player or should I modify the energy of the weapon like we do with SetPlayerAmmo? And the other way, how to prevent the Storm weapon to reload when I'm equipped of the custom one? I'm not sure that clear

Follow me on my maniaflash. Try the new elitealternative! Feedbacks on this post. 
♫ I need αεÑø. I'm holding out for αεÑø 'til the end of the night. ♫

♫ I need αεÑø. I'm holding out for αεÑø 'til the end of the night. ♫
- djhubertus
- Translator
- Posts: 1097
- Joined: 09 Jul 2012, 18:30
- Location: Poland
- Contact:
Re: [Solved] How to dissociate direct hit and AOE?
Nope, still the same.Cerovan wrote:By removing the "CUIConfig::EUISound::Silence" you hear the sound ? (or put a blank "")
My Gamemodes:
MP4 - Countdown, Firefight
MP3 - Reduction, Overload, Flashpoint, Territory, SM Race, Escape
MP2 - Search & Destroy, Oscillation, Instagib
MP4 - Countdown, Firefight
MP3 - Reduction, Overload, Flashpoint, Territory, SM Race, Escape
MP2 - Search & Destroy, Oscillation, Instagib
Re: [Solved] How to dissociate direct hit and AOE?
In that case create a new manialink layer which handle the notification onlyfleo wrote:So I did the same for custom weapons, that's no big deal. The +1 visual notification is quite harder to code because I'm lost in all the manialinks in Elite

CSmMode::EActionInput::None will unequipped it, you have to do that in order to have pads working with the players.fleo wrote:And I'm quite confuse about how to use custom weapons. I currently use ActionLoad and ActionBind to equip them. I also use ActionBind(_Player,CSmMode::EActionSlot::Slot_X,CSmMode::EActionInput::None); to unequipped them. But I don't know if I have to unload them.
Actually there is two things to separe :fleo wrote:For example if I want a custom weapon not to reload while I'm using a Storm weapon (same behaviour as in Combo for instance, a weapon doesn't reload when it's not equipped), should I unload the weapon from the player or should I modify the energy of the weapon like we do with SetPlayerAmmo?
Code: Select all
LoadAction(Player, CSmMode::EActionSlot::Slot_A, NullId, 0);
Code: Select all
BindAction(Player, CSmMode::EActionSlot::Slot_A, CSmMode::EActionInput::None);
From there i think that you know what you've to do

Just set the ammo of the Storm weapon at 0fleo wrote:And the other way, how to prevent the Storm weapon to reload when I'm equipped of the custom one? I'm not sure that clear

@djhubertus : ok it's strange, in that case trigger the sound manually

Online Programmer & Meme Master ヾ(âŒâ– _â– )ノ
Access to your Player Page
You have troubles, please contact the Ubisoft Support
Maniaplanet Documentation (Editors, Scripting, Title Pack, etc...)
Access to your Player Page
You have troubles, please contact the Ubisoft Support
Maniaplanet Documentation (Editors, Scripting, Title Pack, etc...)
Re: [Solved] How to dissociate direct hit and AOE?
Ok thanks, so there is no way pause the energy reloading? I mean if my shotgun was half-loaded when I switched to rockets, is it possible to have it half-loaded when I switch back to it? With these functions I only could let it loading continuously or empty it completely.
I have another question, tell me if I should create another topic. Is it possible to create a custom rocket deny? Working with laser and a projectile of a custom weapon.
I have another question, tell me if I should create another topic. Is it possible to create a custom rocket deny? Working with laser and a projectile of a custom weapon.
Follow me on my maniaflash. Try the new elitealternative! Feedbacks on this post. 
♫ I need αεÑø. I'm holding out for αεÑø 'til the end of the night. ♫

♫ I need αεÑø. I'm holding out for αεÑø 'til the end of the night. ♫
Re: [Solved] How to dissociate direct hit and AOE?
About sound, I've tried to add the UIGunChanged.wav sound for custom weapons because by default there is no sound to indicate that you switched your weapon. I didn't find this sound as a CUIConfig::EUISound so I can't call it through the PlaySound() function. So I decided to play it in the manialink like this:
Just before switching weapon, but it takes like half a second to play, that's pretty disturbing...any suggestion?
Code: Select all
UI.ManialinkPage = """//{{{Now}}}
<audio looping="0" hidden="1" play="1" data="Media/Sounds/UIGunChanged.wav"/>""";
Follow me on my maniaflash. Try the new elitealternative! Feedbacks on this post. 
♫ I need αεÑø. I'm holding out for αεÑø 'til the end of the night. ♫

♫ I need αεÑø. I'm holding out for αεÑø 'til the end of the night. ♫
Re: [Solved] How to dissociate direct hit and AOE?
You could use the functions from the audio manager. You can load and play a sound with a script in a manialink. Then you can use a netwrite variable to play the sound from the mode script.fleo wrote:Just before switching weapon, but it takes like half a second to play, that's pretty disturbing...any suggestion?
Re: [Solved] How to dissociate direct hit and AOE?
Ok I'll try that, thanks
I have a sound glitch with the custom weapon in attack. When a player kills a def (or at least the last def, I have to check) with his custom weapon, a sound loop starts. It sounds a little like the pole sound before it's capturable or a weapon reloading. It lasts until the player is in attack again and equips his custom weapon again.
It's happening only for the attacker and only with his custom weapon. And stops only when he equips this same weapon again.
There is a video: http://youtu.be/o_RBRKuprAo
My scripts are here, but I have no clue about where it's from because even when I disable every sounds played in the mode, the glitch still happens...

I have a sound glitch with the custom weapon in attack. When a player kills a def (or at least the last def, I have to check) with his custom weapon, a sound loop starts. It sounds a little like the pole sound before it's capturable or a weapon reloading. It lasts until the player is in attack again and equips his custom weapon again.
It's happening only for the attacker and only with his custom weapon. And stops only when he equips this same weapon again.
There is a video: http://youtu.be/o_RBRKuprAo
My scripts are here, but I have no clue about where it's from because even when I disable every sounds played in the mode, the glitch still happens...
Follow me on my maniaflash. Try the new elitealternative! Feedbacks on this post. 
♫ I need αεÑø. I'm holding out for αεÑø 'til the end of the night. ♫

♫ I need αεÑø. I'm holding out for αεÑø 'til the end of the night. ♫
- djhubertus
- Translator
- Posts: 1097
- Joined: 09 Jul 2012, 18:30
- Location: Poland
- Contact:
Re: [Solved] How to dissociate direct hit and AOE?
I have the same, gauge sound are looping and to stop, player need to leave server.
My Gamemodes:
MP4 - Countdown, Firefight
MP3 - Reduction, Overload, Flashpoint, Territory, SM Race, Escape
MP2 - Search & Destroy, Oscillation, Instagib
MP4 - Countdown, Firefight
MP3 - Reduction, Overload, Flashpoint, Territory, SM Race, Escape
MP2 - Search & Destroy, Oscillation, Instagib
Re: [Solved] How to dissociate direct hit and AOE?
see http://forum.maniaplanet.com/viewtopic.php?t=27903 regarding the actual topic of this thread
Who is online
Users browsing this forum: No registered users and 1 guest