Author Topic: playing sequence animations with anything but states  (Read 1577 times)

i am trying to wrap my head around how to make a sequence play say "insert" when you call this function
Code: [Select]
function Remington870Image::onLight(%this, %obj, %slot)
{
%props = %obj.getItemProps();
%state = %obj.getImageState(%slot);

if (%props.count < 6 && (%state $= "Ready" || %state $= "Empty") && (%obj.bulletCount[%this.item.bulletType] >= 1 || %obj.bulletCount[%this.item.bulletType] == -1))
{
if ($Sim::Time - %obj.lastRemingtonInsert <= 0.2)
return 1;

%obj.lastRemingtonInsert = $Sim::Time;
if (%obj.bulletCount[%this.item.bulletType] != -1)
%obj.bulletCount[%this.item.bulletType]--;
%props.count++;
%obj.playThread(2, "plant");
serverPlay3D(Remington870InsertSound, %obj.getMuzzlePoint(%slot));

if (isObject(%obj.client))
%obj.client.updateDetailedGunHelp();

return 1;
}

return 0;
}
help me people of the blocklands

It's been asked before. It's an engine limitation so it's not possible to pull off. You could use a bot-weapon instead of an image, which would allow you to play animations at will using play thread. It would however trade-off aim down sights, but since ads in blockland is pretty stupid and unnecessary anyways it's actually a worthy tradeoff

well thats a big disappointment
either way thanks phanto

another thing you could do is create a second image "Remington870InsertImage" (use the same model with animations) and have that mount to the player hand until the image is finished, then remount the original image

You would want the Remington870InsertImage to activate > insert > done
when onDone is called, unmount the insertImage and remount the regular Remington870Image

another thing you could do is create a second image "Remington870InsertImage" (use the same model with animations) and have that mount to the player hand until the image is finished, then remount the original image

You would want the Remington870InsertImage to activate > insert > done
when onDone is called, unmount the insertImage and remount the regular Remington870Image
Yeah but then that'll reset it's state.

Yeah but then that'll reset it's state.
True but if he's using it for reloading it shouldn't really effect anything since the firing image would just start back from ready after being remounted, right?