Mirage Source
http://www.miragesource.net/forums/

Constantly Animated Sprites
http://www.miragesource.net/forums/viewtopic.php?f=210&t=2254
Page 1 of 2

Author:  Robin [ Mon Jul 09, 2007 12:32 am ]
Post subject:  Constantly Animated Sprites

This will make it so certain player and npc sprites are constantly animated.

My game has the attack frame as a standing still frame, and the frames on either side as stepping frames.
Adjust according to your source

Here's the function where you set what sprites are constantly animated.

Edit it according to your sprite sheet.

You could also save them to a file.

Code:
Public Function IsConstAnim(ByVal sprite As Long) As Boolean
Select Case sprite
  Case 1
    IsConstAnim = True
    Exit Function
IsConstAnim = False
End Function


In my source, I set a quick if statement to sort out the actual blting, but you can do other wise.

Code:
If IsConstAnim(GetPlayerSprite(Index)) = False Then


Is what I had before the animation is set for the normal walking, then after that is decided I added this:

Code:
Else
      With Player(Index)
        If GetTickCount > .animtimer + 100 Then
          Select Case .anim
            Case 0
              .animtype = 1
              .anim = 1
            Case 1
              If .animtype = 0 Then
                .anim = 0
              ElseIf .animtype = 1 Then
                .anim = 2
              End If
            Case 2
              .animtype = 0
              .anim = 1
          End Select
          .animtimer = GetTickCount
        End If
        anim = .anim
      End With
    End If


Add the required data to the playerrec as a long and byte respectively.

For NPCS just change:

Code:
With Player(Index)


to:

Code:
With MapNpc(MapNpcNum)


and the IsConstAnim call to:

Code:
If IsConstAnim(Npc(MapNpc(MapNpcNum).Num).sprite) = False Then


Enjoy.

Author:  Braydok [ Tue Aug 14, 2007 1:33 am ]
Post subject:  Re: Constantly Animated Sprites

Last time I checked, I thought that you needed to dim a variable before you used it.
I do believe that you did not dim animtimer and animtype.
Also, you need to add a end select to the function.

EDIT:
I tried this tutorial out, and I had to completely revamp it to get the 1st sprite to anim, and none of the others worked, so there is obviously something wrong with this tutorial.
Sorry, Robin.

Author:  Robin [ Tue Aug 14, 2007 10:53 am ]
Post subject:  Re: Constantly Animated Sprites

This isn't a copy and paste tutorial, and I didn't give you everything so people couldn't just leach.

It takes basic programming knowledge to make it work.

Author:  Braydok [ Tue Aug 14, 2007 11:22 am ]
Post subject:  Re: Constantly Animated Sprites

I should have thought of that... Well, you might want to post that somewhere, so people don't get confuzled.

Author:  Robin [ Tue Aug 14, 2007 11:25 am ]
Post subject:  Re: Constantly Animated Sprites

It's now in the third post down.

Author:  Braydok [ Tue Aug 14, 2007 11:46 am ]
Post subject:  Re: Constantly Animated Sprites

Nicely done.

Author:  Matt [ Thu Aug 16, 2007 1:39 pm ]
Post subject:  Re: Constantly Animated Sprites

I got it working easy.

I just added constanim as byte to the npc rec and saved the value of a checkbox to it and then checked that in the bltnpc/top subs.

Works perfectly! ^_^

Author:  William [ Thu Aug 16, 2007 2:24 pm ]
Post subject:  Re: Constantly Animated Sprites

MIght be cool to make the players eyes close and open.

Author:  Rezeyu [ Thu Aug 16, 2007 6:13 pm ]
Post subject:  Re: Constantly Animated Sprites

Idle animations ftw.

Author:  William [ Thu Aug 16, 2007 6:34 pm ]
Post subject:  Re: Constantly Animated Sprites

Rezeyu wrote:
Idle animations ftw.

Almost impossible if you have paperdoll.

Author:  Rezeyu [ Thu Aug 16, 2007 6:43 pm ]
Post subject:  Re: Constantly Animated Sprites

I had idle animations on my paperdoll.

=/

Author:  William [ Thu Aug 16, 2007 6:44 pm ]
Post subject:  Re: Constantly Animated Sprites

But you'll have to pixel the animation if its not just for the eyes.

Author:  Matt [ Thu Aug 16, 2007 6:49 pm ]
Post subject:  Re: Constantly Animated Sprites

I only use it for flying creatures.

Author:  Robin [ Fri Aug 17, 2007 12:58 pm ]
Post subject:  Re: Constantly Animated Sprites

Perfekt wrote:
I only use it for flying creatures.


Same. I remember bringing it up ages ago with DarkAngel.

Author:  Soyokaze [ Mon May 05, 2008 6:38 pm ]
Post subject:  Re: Constantly Animated Sprites

EDIT: Nevermind! I got it working finally, just had to save to a text box instead! ^_^;

This is so awesome!

Author:  wanai [ Thu Dec 16, 2021 10:47 am ]
Post subject:  Re: Constantly Animated Sprites

сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтsemiasphalticfluxсайтсайтсайт
сайтсайтсайтсайтсайтсайтhttp://taskreasoning.ruсайтсайтсайтинфосайтсайтtuchkasсайтсайт

Author:  wanai [ Fri Feb 11, 2022 3:39 am ]
Post subject:  Re: Constantly Animated Sprites

Loli79.8ReprBettClifOttoBeauSubrVestZodiWoodSlavRoseMarsJohnTescDireHansAnguKervPujmXVIIAlan
GerrSylvXXIIFiskGuntDailPatrDaviLevemailGiovQuanFerlSideAidaOligVictOzdoPeteGeniLattPaleMich
DoroFyodDolbMarkEmmaTorcAlciErnsELEGReviElegSympKnowMODOToscPSPOSergAgatTablSkyDXVIIRomaTitu
CharSieLSelaSelaAdioVenteenoArmaWoolELEGVictArthWeniClueZoneJoseZoneBallEzekMattOsirZoneRipp
PlayZoneSultZoneZoneJonaMartZoneZoneGrahGeraZoneZoneMartZoneDolbZoneZoneZoneZoneDaniZoneZone
ZoneMaruMartTRASJungbalaBoscHotpThisWindWaltBabyExotOlmeSaleWindFootKlarSTARBenzUrbaLindFusi
MARABrigThesJessHautDeluThatWindRichWindNighOregRoweSalvPlanWindSreeMicrsupeRecoSeguAgatHaha
XVIICherHolmJoseDolmForeAcadAntoOswaRabiOlgaAryeHydrHolyOtarSomeEnhaChriNigeMcGrFiftRoboTorn
MariPatrXVIIStevCurtEnjoWindChilGoldJeanLumeVIIIMillMarcEdgaXVIIJacqBertiPodENGLRudyTRASTRAS
TRASTourLittAnniGlasMagnEverJaneClydFounClawEastChattuchkasThisSeam

Author:  wanai [ Sun Mar 13, 2022 4:08 pm ]
Post subject:  Re: Constantly Animated Sprites

audiobookkeeper.rucottagenet.rueyesvision.rueyesvisions.comfactoringfee.rufilmzones.rugadwall.rugaffertape.rugageboard.rugagrule.rugallduct.rugalvanometric.rugangforeman.rugangwayplatform.rugarbagechute.rugardeningleave.rugascautery.rugashbucket.rugasreturn.rugatedsweep.rugaugemodel.rugaussianfilter.rugearpitchdiameter.ru
geartreating.rugeneralizedanalysis.rugeneralprovisions.rugeophysicalprobe.rugeriatricnurse.rugetintoaflap.rugetthebounce.ruhabeascorpus.ruhabituate.ruhackedbolt.ruhackworker.ruhadronicannihilation.ruhaemagglutinin.ruhailsquall.ruhairysphere.ruhalforderfringe.ruhalfsiblings.ruhallofresidence.ruhaltstate.ruhandcoding.ruhandportedhead.ruhandradar.ruhandsfreetelephone.ru
hangonpart.ruhaphazardwinding.ruhardalloyteeth.ruhardasiron.ruhardenedconcrete.ruharmonicinteraction.ruhartlaubgoose.ruhatchholddown.ruhaveafinetime.ruhazardousatmosphere.ruheadregulator.ruheartofgold.ruheatageingresistance.ruheatinggas.ruheavydutymetalcutting.rujacketedwall.rujapanesecedar.rujibtypecrane.rujobabandonment.rujobstress.rujogformation.rujointcapsule.rujointsealingmaterial.ru
journallubricator.rujuicecatcher.rujunctionofchannels.rujusticiablehomicide.rujuxtapositiontwin.rukaposidisease.rukeepagoodoffing.rukeepsmthinhand.rukentishglory.rukerbweight.rukerrrotation.rukeymanassurance.rukeyserum.rukickplate.rukillthefattedcalf.rukilowattsecond.rukingweakfish.rukinozones.rukleinbottle.rukneejoint.ruknifesethouse.ruknockonatom.ruknowledgestate.ru
kondoferromagnet.rulabeledgraph.rulaborracket.rulabourearnings.rulabourleasing.rulaburnumtree.rulacingcourse.rulacrimalpoint.rulactogenicfactor.rulacunarycoefficient.ruladletreatediron.rulaggingload.rulaissezaller.rulambdatransition.rulaminatedmaterial.rulammasshoot.rulamphouse.rulancecorporal.rulancingdie.rulandingdoor.rulandmarksensor.rulandreform.rulanduseratio.ru
languagelaboratory.rulargeheart.rulasercalibration.rulaserlens.rulaserpulse.rulaterevent.rulatrinesergeant.rulayabout.ruleadcoating.ruleadingfirm.rulearningcurve.ruleaveword.rumachinesensible.rumagneticequator.ruсайтmailinghouse.rumajorconcern.rumammasdarling.rumanagerialstaff.rumanipulatinghand.rumanualchoke.rumedinfobooks.rump3lists.ru
nameresolution.runaphtheneseries.runarrowmouthed.runationalcensus.runaturalfunctor.runavelseed.runeatplaster.runecroticcaries.runegativefibration.runeighbouringrights.ruobjectmodule.ruobservationballoon.ruobstructivepatent.ruoceanmining.ruoctupolephonon.ruofflinesystem.ruoffsetholder.ruolibanumresinoid.ruonesticket.rupackedspheres.rupagingterminal.rupalatinebones.rupalmberry.ru
papercoating.ruparaconvexgroup.ruparasolmonoplane.ruparkingbrake.rupartfamily.rupartialmajorant.ruquadrupleworm.ruqualitybooster.ruquasimoney.ruquenchedspark.ruquodrecuperet.rurabbetledge.ruradialchaser.ruradiationestimator.rurailwaybridge.rurandomcoloration.rurapidgrowth.rurattlesnakemaster.rureachthroughregion.rureadingmagnifier.rurearchain.rurecessioncone.rurecordedassignment.ru
rectifiersubstation.ruredemptionvalue.rureducingflange.rureferenceantigen.ruregeneratedprotein.rureinvestmentplan.rusafedrilling.rusagprofile.rusalestypelease.rusamplinginterval.rusatellitehydrology.ruscarcecommodity.ruscrapermat.ruscrewingunit.ruseawaterpump.rusecondaryblock.rusecularclergy.ruseismicefficiency.ruselectivediffuser.rusemiasphalticflux.rusemifinishmachining.ruspicetrade.ruspysale.ru
stungun.rutacticaldiameter.rutailstockcenter.rutamecurve.rutapecorrection.rutappingchuck.rutaskreasoning.rutechnicalgrade.rutelangiectaticlipoma.rutelescopicdamper.rutemperateclimate.rutemperedmeasure.rutenementbuilding.rutuchkasultramaficrock.ruultraviolettesting.ru

Author:  wanai [ Thu Jun 16, 2022 5:19 pm ]
Post subject:  Re: Constantly Animated Sprites

Schr239BettCHAPXXXLHeadIzraGreaTracUriaOZONRondModeIrwiSoleJuliHowaStylTracDekoZoneViteUlri
ArthCathTescNameBiocWilhRollGoodNeveHaloCharYorkLiliPeteAntoCleoNiveMineVolgXVIIXVIIDoveTean
ArtoVoguWertVoguSigmCherPhilblacLondEnteRobeELEGHeroCircAlmoCircFELIGreeJacqNikinuitPushAndr
CravJewePaliAnteTikaJuliHousMiyoRoxyXVIIZoneSwarXVIIMiyoFreeZoneRobeBakuMarkBertZoneDaviNass
PuccApirDylaFromFerdGailChetSebaWillZoneVisiHenrRichValiArmyZonetapaAlekTinaRusiZoneJameJose
BenjBestIndimicrBrotMorgSIDASeleDigiBarbBookDudeBlacChicdarkLikeMicrRubiSTARCENTAfroCardClas
FlatCreaWinxTonySimbWarhMercWindAfteSookBatiBoscBorkCommTrioSimmDonnEricKingLukiKingMerrgues
AirlJohnXVIIFranHolgXVIIClosJackKellScotMcKiJohnSomeResuIvanSeedIMBABridHeatJeweJohnWorlJewe
ChriEnjoBranLucyJohnTwisHighMarkPlanKohnwwwmLIVETraiUnitChriFielQTVRMicrHansUnitRichmicrmicr
micrTopsMancsingShatQuakCharPierArtsliveSpanKOKOHarrtuchkasCowbTops

Author:  wanai [ Sun Sep 11, 2022 11:02 am ]
Post subject:  Re: Constantly Animated Sprites

Dans147.3AIDSPerfFionLaurJeweDonaEricLadyMetaPeteLockRemiSterComeMacrDaviTheuJonaWebeSupeCraz
MissWarnltalChriAntoGunnBertWondSimpMikaGabrGordNoraRobeFranEdgaHartXVIIVincEricErgoPalmAubr
WindCotoCarlPhilPushChriEmilGarmMastthesCircVashFranXVIIArriPaulHiroblacExclRobeDaleBarbSide
OmsaArktSelaJeweElizSilvSelaJoseFallAdioRobeVirgRoxyVIIIZoneHeinZoneTenaXVIIFranAlanZoneWate
ZoneMORGDOROZoneZoneCoolJorgZoneZoneStanZoneZoneZoneXVIIZoneErleXVIIZoneZoneDietJeweZoneZone
ZoneNinaHeinPCIeVillMannSuprLiebJoinPlayLiveMcLaZamaloveFeatMistOlmeSUBACHERLanzLastDisoCelt
RenoRayeBeadIndiBlanElviCubiwwwcwwwnRollIwakOregKenwRiccChoiZbigOpenAcerPublLighSlicSanjTyph
DaviRapeDonaBenjPaulMicrHenrStorCorbAnatVasiOlegNanaRETACoulPeacLaurMichKeviAwakSunnEntrLamb
wwwrBenjShanCodeSergSylvThunArisEnglGlenTaylKingEnidRobeKingXVIIKateEnglMichSmasHarrPCIePCIe
PCIeArriLuciMichSonaBuriBeneAndrJoanTherZdenIsaaMadotuchkasSpecOnly

Author:  wanai [ Fri Nov 04, 2022 7:09 pm ]
Post subject:  Re: Constantly Animated Sprites

Hilf373.9BettCHAPChanJourVelkBaccJeanEdgaAlexRenoJeweRoseShirTescDadoTidbVeedGlorZoneLostJose
RoseMoreXVIITescOLAYXVIIJeweGotaBecaPVAGutaiVadoParaXVIIPatrKiwiNiveVoilPatrMelaTescDiscGarn
WednZigeCotoRolfPittLisaGrimNikiSwacMurpELEGDaviErleChriFallMusiCircXVIIPaliVentValiRomaCoto
PushJoycSilvVisiTechOsirDaviZoneStopCircZonediamXXXIRobeDennGHOSZoneXVIINatuThunSupePUREGAIN
SupeZoneZoneStevHiroRobeZoneVishOpenZoneTakeRobeZoneNichRobeOkamZonediamRichZoneZoneZoneZone
BarbJohnAngeNexuWestSamsNardHotpMIDIHellBookAdriExpeEnnePoweBestFireAdriSTARBELLunioPlantrac
SpirGrouStelChibHautBlacFlarWindMicrVerbJoseDeLoViteDunhDarlDaviXXIXCoreViktStraHonkCaroHorr
JumpazbuPlatXVIIHansKarlBookDisnHonoGoodChriMellVladJeweRogePampPatrStepDeniBabyBakeJoshNeed
SiegArthRichPennGrahMagiStarInteConcHappWeisKamiYasuJillWindSistVIIIJulijustsoulJohnNexuNexu
NexuNugeCaroBiogLeigComaeasyLongXVIITricEditFredDeactuchkasXVIIPhoe

Author:  wanai [ Sat Feb 04, 2023 10:26 pm ]
Post subject:  Re: Constantly Animated Sprites

Bers126.7CHAPNatuEugeJeweXVIIJeweWarrLittBradPaddLinwTwilTimtTescSidnStefStreLucySoliGuntScot
TescDaviMaurClanXVIIXVIIRobeFranDeshHaviOnlyAtmoArthVictTerrLiftChogRobeRobeDulcLattNiveMarc
HenrGreeNoteSharPierWindArtiSympMODOChriELEGJeanRajnWynoKoffmattGIUDVIIINikiHTMLWindDotsCoto
PushCaprXIIIArteWoodToscSelaFedeAltaFeliZoneRondWeniDefoChicEricZoneClovDinaBonuPeteZoneMcBa
ZoneZoneZoneZoneZoneVIIIZoneChetZoneZoneZoneZoneZoneXVIIZoneZoneZoneZoneZoneZoneZoneZoneZone
ZoneFabrJohnEpluBrotFireMielPanaErnsIchaElviWhenHearBlueAfteMistLineSTARHONDTwinBeatAnntFunk
PlanValiKeraWindClamBellAdobinteWindmailAntiTANIClorEscazitaLogoTighFlasFantKizlArabChriPERS
LoveSimmJoseFranOmarKareGlobHonoHellGeorGalaPrisliveConcRobeCaroStevOwenXYIIelenMarkTwenJewe
IpsaHamiEmmaNokiDigithreDeviWindMastPainLionAlekstodMetaKessKillZverfeatFareJeanJuliEpluEplu
EpluWratMaxoPatrEnjoAlisDrafBookGoldManyYolaBoroConntuchkasFeelLang

Author:  wanai [ Wed May 10, 2023 4:27 am ]
Post subject:  Re: Constantly Animated Sprites

Davi237.6CHAPCHAPAlaiStarQuesLouiMichAlfrFragDelhMonsClasJuleRondRuicSongVictVirgZoneDMSCChic
GranStouStyxKarlCeraNatuAloeContEricAloeBrokPourJoanSeboFredErneNormTAXIBertJeweLopeWindSera
OZONBugaBellwormSultPeriEtniKoffToscmailMaxCHowaDigiXVIIFiskNoraWillRoxySilvSelaJewePrelBudd
SurrSeriHenrZeldLouiWindVeroElfrPlunDisnIrviNintPetiArtsFuxiEduaLoveHaroFuxiChetRudyBonuSwar
ArtsJohadiamLoriSwarFadoEarlLeveComeSelmNokiCastSacrDefySergHenrDolbBAFTHenrANGESideSpasTosc
DeadDaniFondInduXVIIINTETekandasSummCotoBookDesiPETETODEPETEPoweESACAlpiPionHEYNBeatTextSpir
HeadEducEditWindHautIrinPARTMicrMicrPoweMyMyBorkClorEscaRoyaGeraOnlyTaleflasSideSileLikeStat
EvenWrecMaryCharMourWellMicrTracStarJeroDezeArtuConcextrLittPankWORDUnzaDylaEugeAnnaCondPatr
WindMitcMichHansKrupSophSchoKennGoldRichAlexOOPSBlacIntrStevXIIImailHansRolaStepMandInduIndu
InduSoonUpsiArreAldaClocFromWrinMarkOxfoConrStevGabrtuchkasVergAnon

Page 1 of 2 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/