[Request][Scripting] Option to disable auto-resurrection GFX and SFX.

2 replies [Last post]
UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 1 year 15 weeks ago. Offline
Joined: 2016-06-26
Posts: 381

[1] Add a Global variable to enable or disable the visual effect when a hog is automatically "Resurrected" via the "SetEffect(hog, heResurrectable, 1)". Enabled by default.

[2] Add a Global variable to enable or disable the sound effect when a hog is automatically "Resurrected" via the "SetEffect(hog, heResurrectable, 1)". Enabled by default.


Reason: More customizability, and because why not.

Difficulty: I'm really sure it's really easy and simple, not even a single hassle for our devs.

Reward: A bouquet of appreciation, a hug, and a smile image. Three in one. An absolute must-have gift.


Thank you in advance!

╟───NW──────┼──────N╢

╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜

Wuzzy
Wuzzy's picture
User offline. Last seen 7 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1254

Rejected.

You can get rid of the visual effect (explosion sprite) by defining a function for the onGearResurrect callback. See LuaEvents.

This function gives you the ID of the visual gear that a heResurrectable resurrection creates. You can delete this visual gear by calling DeleteVisualGear on it. If you do this, there is no visual effect anymore.

Example:

function onGearResurrect(gear, vgear)
  DeleteVisualGear(vgear)
end

This does not get rid of the sound effect, however. But I don't see why getting rid of the sound effect is so important to you. What's the use case?

Hi, I am a Hedgewars developer. Smile I accept personal donations in bitcoin. Heart 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 1 year 15 weeks ago. Offline
Joined: 2016-06-26
Posts: 381

Wuzzy allegedly wrote:
This function gives you the ID of the visual gear that a heResurrectable resurrection creates. You can delete this visual gear by calling DeleteVisualGear on it. If you do this, there is no visual effect anymore.

Example: ...

This is new. It doesn't give the VGear id the last time I remembered, which is long ago.
Well, I fact-checked and yes, my scripts don't have any of that.
So this is definitely right to be rejected.

Wuzzy allegedly wrote:
This does not get rid of the sound effect, however. But I don't see why getting rid of the sound effect is so important to you. What's the use case?

Try to imagine if I want to hide the hog away after it "died", with a delay and relocation mechanic because I don't want the hog got killed multiple times in a short window, aka killed again right after respawned, cuz das suck. Now imagine if there's still a sound of it respawned but there's no hog visible. It doesn't sound or looks right, so that's why I need to get rid of the sound.

[+] GFX or SFX that is set in stone which is non-customizable would be limiting, and that's bad for modding, which is what I am currently doing, chillin' in Wyoming, all for scripting- Ok, that's enough rhyming.
⠀⠀⠀Let's say it's for a little more customizability in the principle of good modding, or something... This, in case if you need more reason.


Okay, thanks for answering. Now I'll wait for the next response.



[E.1] Food coloring.

╟───NW──────┼──────N╢

╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜

Copyright © 2004-2021 Hedgewars Project. All rights reserved. [ contact ]