Server Help

LVZ/LVL Questions - dynamic runtime LVZ options

CaptainPoopface - Sun Jan 04, 2009 4:56 pm
Post subject: dynamic runtime LVZ options
When considering a single sound or graphic event, is there a way to choose dynamically among multiple sounds and graphics? For example, say I have three different ship explosion animations, and whenever a ship explodes, I want the server/module to randomly show one of those three animations. Or when someone fires a bomb, I want to hear 1 of 3 slightly different firing sounds. How nitty-gritty do I need to get? I suspect I would have to black out the default explosions and have a module to detect these events, and do some objon stuff (I'm still new to lvz). I don't know if this would work with sounds though, or if the coordinates of these events are available, i.e., can a module find the coords where a player dies and put the lvz object there?

Another question: let's say I put an animation on the screen when a player dies. Can I customize that animation based on ship type? Based on the killed player's name? Based on the killing player's name? And can I do these same things with sound?
Samapico - Sun Jan 04, 2009 5:32 pm
Post subject:
You'd need to do that with mapobjects.

Or screenobjects if you don't mind if only the person who dies see it. In this case, you'd only need to set them in the middle of the screen.

Otherwise, the module would need to move the map object to fit with the player's position when he dies. There is a packet to move a mapobject, not sure how to use it though.
Doing the same for bombs would be impossible, because prox bomb explosions (and any weapon hit) are handled by the client and do not trigger any event. That is why sometimes you'll see someone 'eat'. The weapon did not hit them on their screen, even if it did on yours.

As for the sounds... I guess you could put in some custom bong sounds and have the bot play them with %###. For example, if you have a file named bong123.wav, anyone who types %123 in a message will hear the sound.
Would be quite easy to make only one player hear the sound, but pretty hard if you want the people around the explosion to hear it too, and to not make it ugly you'd need to make several versions of the sound with different volume levels, depending on the distance of the explosion...

As for all the other customization issues, the only way to do that would be to not use the LVZ's display type like 'PlayerDeath', but to handle everything via a module or bot plugin.
tcsoccerman - Sun Jan 04, 2009 7:09 pm
Post subject:
yes you can, i think theres a custom module that does that.
JoWie - Tue Jan 06, 2009 5:40 pm
Post subject:
You can easily detect bomb fires, but not hits.

Also: https://forums.minegoboom.com/viewtopic.php?t=7506
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group