Support_SaveImageSlot

Author Topic: Support_SaveImageSlot  (Read 1607 times)

This support addon prevents default code like emote (used for pain and emotes) and burn from using image slot 3 to do their effects. This allows modders to use this extra image slot for things like armor or equipment or hats.

The downsides are that you may hear a bot mounting your player occasionally, upon taking damage or playing an emote, and that some emotes may play in a different spot/direction than expected. Unfortunately, I don't know how to fix this without removing the sound entirely from the game, so I've left it in.

https://leopard.hosting.pecon.us/dl/juebs/Support_SaveImageSlot.zip
« Last Edit: May 27, 2019, 04:31:30 PM by Conan »

https://forum.blockland.us/index.php?topic=298268.0

PhantOS'/Path's method here works as well, but it doesn't prevent emotes that dont have emitters on state 1, and completely nullifies the emote/effect rather than offsets it to an invisible bot.

Yeah that was before bot stuff became a staple. Glad some obscure code I posted got used in such a revolutionary support script. Sadly it's really late because a lot of armor add-ons use custom emote evasion. If I were you I'd check compatibility with a bunch of different armor mods to see if the mountimage parenting forgets up some old addons
« Last Edit: July 16, 2018, 05:48:23 PM by thegoodperry »

Also I suggest rather than mounting and deleting boots at will whenever an emote is done, just mount the bot when the player spawns and leave it on until the player dies. Then just mount all the emotes to that bot and unmount whenever. It means you'll never hear the bot mount sound and if you do it'll be when you spawn so it doesn't matter anyways

I doubt this will cause any significant performance issues, but just to be sure I'd make sure I would totally not do this on actual bot enemies because you'd be doubling the ai count
« Last Edit: July 16, 2018, 07:12:56 PM by thegoodperry »

If you don't want the mounting sound, then just use a different class. Armor is the only one that will play that sound.
The only functions you need to redefine are:
::onUnmount(%this,%obj,%vehicle,%node)
::doDismount(%this,%obj) (can just call Armor::doDismount for this one)
::onMount(%this,%obj,%slot)

If you don't want the mounting sound, then just use a different class. Armor is the only one that will play that sound.
The only functions you need to redefine are:
::onUnmount(%this,%obj,%vehicle,%node)
::doDismount(%this,%obj) (can just call Armor::doDismount for this one)
::onMount(%this,%obj,%slot)
how to make a mountable object with a non armor class?

Set the className of the datablock to something other than Armor.
I do find it odd that I apparently just used 'class' for my code yet you're supposed to use 'className' but it seems to have the same effect?

Default compared to what I have:
Code: [Select]
datablock PlayerData(PlayerStandardArmor){
className = Armor;

datablock PlayerData(Sword2PW)
{
class = "PW";

¯\_(ツ)_/¯

If you don't want the mounting sound, then just use a different class. Armor is the only one that will play that sound.
never considered this approach always just redefined the mount function for them :o
coolio

I do find it odd that I apparently just used 'class' for my code yet you're supposed to use 'className' but it seems to have the same effect?
if you set the field "class" on a player object it will just be a tagged field, however the lack of you defining 'className' (a member field) is effectively preventing any armor:: hooks

however the lack of you defining 'className' (a member field) is effectively preventing any armor:: hooks
THIS EXPLAINS SO MUCH THANK YOU VERY MUCH ♥