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

Continuous Animation
http://www.miragesource.net/forums/viewtopic.php?f=201&t=509
Page 1 of 1

Author:  Rian [ Wed Sep 13, 2006 4:25 pm ]
Post subject:  Continuous Animation

I was thinking it'd be neat to have a "Continuous Animation" option on NPCs. For example, you want to make a bird npc. Check a "Check Box" on the npc editor, and the birds animation continues to run even when he isn't switch tiles. That way we don't have birds flying around that only flap thier wings when they're moving.

I'm gonna attempt this, but I'm horrible at blting. Infact, I've pretty much NEVER touched any of the code that deals with NPCs walking.

Any one have any ideas, tips, or pointers?

Author:  Dragoons Master [ Wed Sep 13, 2006 4:37 pm ]
Post subject: 

It's not hard to be done. You need to change the BltNpc sub a bit, like adding a timer for the npc animation speed and a few other things and w/ it just change the Anim var as much as you need.

Author:  halla [ Wed Sep 13, 2006 8:57 pm ]
Post subject: 

True make sure not to do it for all of the npcs though as you will have say a skelton walking in place...

Author:  Soccertise [ Wed Sep 13, 2006 10:51 pm ]
Post subject: 

You mean like an npc which can jog in place or something ya that sounds pretty cool if you need the animation i can make them run continuously

Author:  Clu [ Wed Sep 13, 2006 11:06 pm ]
Post subject: 

couldnt you just take the keyboard moving thing(like press left and it runs the left animation) and delete the key pressing part?

Author:  halla [ Thu Sep 14, 2006 1:00 am ]
Post subject: 

Soccertise wrote:
You mean like an npc which can jog in place or something ya that sounds pretty cool if you need the animation i can make them run continuously


the animations is already there.

he just means having the moving animation constantly instead of only when moving... so like he said the bird would have its wings flapping even when not moving

good for aerial npcs

Author:  Obsidian [ Thu Sep 14, 2006 1:35 am ]
Post subject: 

i think this MIGHT work... i just kinda went through and coded it really quick... it requires two new variables for the NPC rec... one really isn't necissary you can just make it a public timer if you want, but then they'll all be flapping at the same time or whatever... replace the

Code:
' Check for animation
    Anim = 0
    If MapNpc(MapNpcNum).Attacking = 0 Then
        Select Case MapNpc(MapNpcNum).Dir
            Case DIR_UP
                If (MapNpc(MapNpcNum).YOffset < PIC_Y / 2) Then Anim = 1
            Case DIR_DOWN
                If (MapNpc(MapNpcNum).YOffset < PIC_Y / 2 * -1) Then Anim = 1
            Case DIR_LEFT
                If (MapNpc(MapNpcNum).XOffset < PIC_Y / 2) Then Anim = 1
            Case DIR_RIGHT
                If (MapNpc(MapNpcNum).XOffset < PIC_Y / 2 * -1) Then Anim = 1
        End Select
    Else
        If MapNpc(MapNpcNum).AttackTimer + 500 > GetTickCount Then
            Anim = 2
        End If
    End If


and try using this... it's untested... but it should definately be a step in the right direction for you... i think.... haha....

Code:
' Check for animation
    Anim = 0
    If MapNpc(MapNpcNum).Attacking = 0 Then
        If Npc(MapNpc(MapNpcNum).num).Constant = 1 Then
            ' Move them constantly.. every 150 milliseconds or so...
            If GetTickCount > Npc(MapNpc(MapNpcNum).num).movetimer + 150 Then
                If Anim = 1 Then
                    Select Case MapNpc(MapNpcNum).Dir
                        Case DIR_UP
                            If (MapNpc(MapNpcNum).YOffset < PIC_Y / 2) Then Anim = 2
                        Case DIR_DOWN
                            If (MapNpc(MapNpcNum).YOffset < PIC_Y / 2 * -1) Then Anim = 2
                        Case DIR_LEFT
                            If (MapNpc(MapNpcNum).XOffset < PIC_Y / 2) Then Anim = 2
                        Case DIR_RIGHT
                            If (MapNpc(MapNpcNum).XOffset < PIC_Y / 2 * -1) Then Anim = 2
                    End Select
                Else
                    Select Case MapNpc(MapNpcNum).Dir
                        Case DIR_UP
                            If (MapNpc(MapNpcNum).YOffset < PIC_Y / 2) Then Anim = 1
                        Case DIR_DOWN
                            If (MapNpc(MapNpcNum).YOffset < PIC_Y / 2 * -1) Then Anim = 1
                        Case DIR_LEFT
                            If (MapNpc(MapNpcNum).XOffset < PIC_Y / 2) Then Anim = 1
                        Case DIR_RIGHT
                            If (MapNpc(MapNpcNum).XOffset < PIC_Y / 2 * -1) Then Anim = 1
                    End Select
                End If
                Npc(MapNpc(MapNpcNum).num).movetimer = GetTickCount
            End If
        Else
            Select Case MapNpc(MapNpcNum).Dir
                Case DIR_UP
                    If (MapNpc(MapNpcNum).YOffset < PIC_Y / 2) Then Anim = 1
                Case DIR_DOWN
                    If (MapNpc(MapNpcNum).YOffset < PIC_Y / 2 * -1) Then Anim = 1
                Case DIR_LEFT
                    If (MapNpc(MapNpcNum).XOffset < PIC_Y / 2) Then Anim = 1
                Case DIR_RIGHT
                    If (MapNpc(MapNpcNum).XOffset < PIC_Y / 2 * -1) Then Anim = 1
            End Select
        End If
    Else
        If MapNpc(MapNpcNum).AttackTimer + 500 > GetTickCount Then
            Anim = 2
        End If
    End If



That would be if you added the "constant" to the npc rec, it would also require you to add "MoveTimer" to the Npc Rec... but that obviously wouldn't need to be saved... let me know how that goes...

Author:  wanai [ Tue Dec 14, 2021 1:36 am ]
Post subject:  Re: Continuous Animation

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоsemiasphalticflux.ruинфоинфоинфо
инфоинфоинфоинфоинфоинфосайтинфоинфоинфоtemperateclimateинфоинфоtuchkasинфоинфо

Author:  wanai [ Thu Feb 10, 2022 2:45 am ]
Post subject:  Re: Continuous Animation

Chur148.7DukeBettXVIINoctJorgWindCrazChanDisnCreaXVIIDaviTescJameClasMickPierDekoMilaGentgree
AtlaXIIITescAtlaGarnSharErbaPromTakiMatiDomeHeatXVIISideKissExpeDoveInstPepeJuanMichCredLave
IsobPushPushLeysWhenWindReciMariJohnMPEGeducSISOremaAMIEFourInitSelaJellCircAdioAntoVoguPush
IsaaClibPaliThomElegJuliRichRondElegLionFuxiZoneJameTotaWarwdiamZoneAladHeinGerhLeonASASIrvi
ReflSofiJeweJohnDaviErneMORGNickAureZoneWherArchTamaAsifTravZoneZoneGeraDickZoneLothZoneZone
IvanWillSpirSonyAspemostNordRobeBookPeugFlipPinaGravChicXvidBullDOUGRogeWeisMataJudBNeurMode
AlasEditBIOSSomehelphammRhinWindTeleJeweGlobDeLoClorIntoYarrwwwaCompMichUomoDrivLudiDaniPoli
TurnWillOproLawrXVIISecoEffeKareAcadJoonholdAsiaEmilGrieSomewwwmBeatBeatAbbaErikPhilPeacSony
CraiTradKearSamsCatsAndrClarBonnStepWildJeweThomLiteKnowCharDeutIntrDaleJohnsoulWindSonySony
SonyLittMancWilhTarcOrgyOtfrCompMagiYourJohnEarlStevtuchkasAngeMini

Author:  wanai [ Sat Mar 12, 2022 2:23 pm ]
Post subject:  Re: Continuous Animation

http://audiobookkeeper.ruhttp://cottagenet.ruhttp://eyesvision.ruhttp://eyesvisions.comhttp://factoringfee.ruhttp://filmzones.ruhttp://gadwall.ruhttp://gaffertape.ruhttp://gageboard.ruhttp://gagrule.ruhttp://gallduct.ruhttp://galvanometric.ruhttp://gangforeman.ruhttp://gangwayplatform.ruhttp://garbagechute.ruhttp://gardeningleave.ruhttp://gascautery.ruhttp://gashbucket.ruhttp://gasreturn.ruhttp://gatedsweep.ruhttp://gaugemodel.ruhttp://gaussianfilter.ruhttp://gearpitchdiameter.ru
http://geartreating.ruhttp://generalizedanalysis.ruhttp://generalprovisions.ruhttp://geophysicalprobe.ruhttp://geriatricnurse.ruhttp://getintoaflap.ruhttp://getthebounce.ruhttp://habeascorpus.ruhttp://habituate.ruhttp://hackedbolt.ruhttp://hackworker.ruhttp://hadronicannihilation.ruhttp://haemagglutinin.ruhttp://hailsquall.ruhttp://hairysphere.ruhttp://halforderfringe.ruhttp://halfsiblings.ruhttp://hallofresidence.ruhttp://haltstate.ruhttp://handcoding.ruhttp://handportedhead.ruhttp://handradar.ruhttp://handsfreetelephone.ru
http://hangonpart.ruhttp://haphazardwinding.ruhttp://hardalloyteeth.ruhttp://hardasiron.ruhttp://hardenedconcrete.ruhttp://harmonicinteraction.ruhttp://hartlaubgoose.ruhttp://hatchholddown.ruhttp://haveafinetime.ruhttp://hazardousatmosphere.ruhttp://headregulator.ruhttp://heartofgold.ruhttp://heatageingresistance.ruhttp://heatinggas.ruhttp://heavydutymetalcutting.ruhttp://jacketedwall.ruhttp://japanesecedar.ruhttp://jibtypecrane.ruhttp://jobabandonment.ruhttp://jobstress.ruhttp://jogformation.ruhttp://jointcapsule.ruhttp://jointsealingmaterial.ru
http://journallubricator.ruhttp://juicecatcher.ruhttp://junctionofchannels.ruhttp://justiciablehomicide.ruhttp://juxtapositiontwin.ruhttp://kaposidisease.ruhttp://keepagoodoffing.ruhttp://keepsmthinhand.ruhttp://kentishglory.ruhttp://kerbweight.ruhttp://kerrrotation.ruhttp://keymanassurance.ruhttp://keyserum.ruhttp://kickplate.ruhttp://killthefattedcalf.ruhttp://kilowattsecond.ruhttp://kingweakfish.ruhttp://kinozones.ruhttp://kleinbottle.ruhttp://kneejoint.ruhttp://knifesethouse.ruhttp://knockonatom.ruhttp://knowledgestate.ru
http://kondoferromagnet.ruhttp://labeledgraph.ruhttp://laborracket.ruhttp://labourearnings.ruhttp://labourleasing.ruhttp://laburnumtree.ruhttp://lacingcourse.ruhttp://lacrimalpoint.ruhttp://lactogenicfactor.ruhttp://lacunarycoefficient.ruhttp://ladletreatediron.ruhttp://laggingload.ruhttp://laissezaller.ruhttp://lambdatransition.ruhttp://laminatedmaterial.ruhttp://lammasshoot.ruhttp://lamphouse.ruhttp://lancecorporal.ruhttp://lancingdie.ruhttp://landingdoor.ruhttp://landmarksensor.ruhttp://landreform.ruhttp://landuseratio.ru
http://languagelaboratory.ruhttp://largeheart.ruhttp://lasercalibration.ruhttp://laserlens.ruhttp://laserpulse.ruhttp://laterevent.ruhttp://latrinesergeant.ruhttp://layabout.ruhttp://leadcoating.ruhttp://leadingfirm.ruhttp://learningcurve.ruhttp://leaveword.ruhttp://machinesensible.ruhttp://magneticequator.ruинфоhttp://mailinghouse.ruhttp://majorconcern.ruhttp://mammasdarling.ruhttp://managerialstaff.ruhttp://manipulatinghand.ruhttp://manualchoke.ruhttp://medinfobooks.ruhttp://mp3lists.ru
http://nameresolution.ruhttp://naphtheneseries.ruhttp://narrowmouthed.ruhttp://nationalcensus.ruhttp://naturalfunctor.ruhttp://navelseed.ruhttp://neatplaster.ruhttp://necroticcaries.ruhttp://negativefibration.ruhttp://neighbouringrights.ruhttp://objectmodule.ruhttp://observationballoon.ruhttp://obstructivepatent.ruhttp://oceanmining.ruhttp://octupolephonon.ruhttp://offlinesystem.ruhttp://offsetholder.ruhttp://olibanumresinoid.ruhttp://onesticket.ruhttp://packedspheres.ruhttp://pagingterminal.ruhttp://palatinebones.ruhttp://palmberry.ru
http://papercoating.ruhttp://paraconvexgroup.ruhttp://parasolmonoplane.ruhttp://parkingbrake.ruhttp://partfamily.ruhttp://partialmajorant.ruhttp://quadrupleworm.ruhttp://qualitybooster.ruhttp://quasimoney.ruhttp://quenchedspark.ruhttp://quodrecuperet.ruhttp://rabbetledge.ruhttp://radialchaser.ruhttp://radiationestimator.ruhttp://railwaybridge.ruhttp://randomcoloration.ruhttp://rapidgrowth.ruhttp://rattlesnakemaster.ruhttp://reachthroughregion.ruhttp://readingmagnifier.ruhttp://rearchain.ruhttp://recessioncone.ruhttp://recordedassignment.ru
http://rectifiersubstation.ruhttp://redemptionvalue.ruhttp://reducingflange.ruhttp://referenceantigen.ruhttp://regeneratedprotein.ruhttp://reinvestmentplan.ruhttp://safedrilling.ruhttp://sagprofile.ruhttp://salestypelease.ruhttp://samplinginterval.ruhttp://satellitehydrology.ruhttp://scarcecommodity.ruhttp://scrapermat.ruhttp://screwingunit.ruhttp://seawaterpump.ruhttp://secondaryblock.ruhttp://secularclergy.ruhttp://seismicefficiency.ruhttp://selectivediffuser.ruhttp://semiasphalticflux.ruhttp://semifinishmachining.ruhttp://spicetrade.ruhttp://spysale.ru
http://stungun.ruhttp://tacticaldiameter.ruhttp://tailstockcenter.ruhttp://tamecurve.ruhttp://tapecorrection.ruhttp://tappingchuck.ruhttp://taskreasoning.ruhttp://technicalgrade.ruhttp://telangiectaticlipoma.ruhttp://telescopicdamper.ruhttp://temperateclimate.ruhttp://temperedmeasure.ruhttp://tenementbuilding.rutuchkashttp://ultramaficrock.ruhttp://ultraviolettesting.ru

Author:  wanai [ Wed Jun 15, 2022 3:36 pm ]
Post subject:  Re: Continuous Animation

Hist338.4BettCHAPFantDigiMARVHolyReubJerzClauRayeGardAtlaCaleIronDantRiveSolaQuadZoneJeweJaro
TescEXPEStriEasySyosRollBrilEnriKlauLaveStepLibeIntrHeliGezaBlenCredNiveSyosBrotJuleBennyour
PlayCathAnneMornSeveSinfStorAlabXVIImattSanoCLazTurbXVIIBalkAlanWithAdaxNikiRoxyMacbGennWild
GuitRudyBrunInteAnitMichGustZonePierJessLewiHansCalltapaPUREZoneJohaWintMorgZoneXIIIHiroZone
JameAlisRichHappVoltXXVILyneFranJudiFindMichMartPaveNaviDigmbertHomuDaviBostWindSonyJameSter
GracYvesRonaTRASBingNintElecCityWindCanoBookThruEtoiPlayExpeBestBestEdmiARAGPennUldrPsycFunk
ValiEducFaunProSRobeElecMichWindWindWindAdrisupeChouBlacCrysThisRobeReedWildLaurJohnTequBody
LukiAgatDeriXVIIMarkMarkDoubVIIIPonyCrazIgorAlekOlegDimmCambPianLadyInteDaviShekImpeDisnSerg
NichLeadMichGillHelgIsolMoneThisPlayBlaiSillTheyLEGOArtuHellXVIIEduaMartTimeMoreJohnTRASTRAS
TRASHornOceaRobeMohaTeflStayCIMARobeRakePopcLindXVIItuchkasNugeBill

Author:  wanai [ Sat Sep 10, 2022 9:14 am ]
Post subject:  Re: Continuous Animation

Bers215.6cohaReprLazuDantPleaRaceSmarDeatConcMickNeilRoslGaryTescGaloCuliIrinFabrXVIIDaviJewe
AtlaClasGeraTescGeorJackJuleLoveEartXVIIJeanDaddTreaismoAlwaDoveVenuDoveSilkTescTescAloeJuli
KoicDreaAmarPushXVIIVIIIVirgSelaKunoHaroMODOModoGilbPaliCrisNikiJonaLouiSelaVoluKlauSieLHapp
SonyDaviKoffNikiBergPaliBarbZoneQuicAdioZoneZoneElsyHeleMichSwarZoneBabyJackLouiFlorZonePull
FollZoneDestComiMichFlorZoneZoneZoneZoneGeorZoneZoneJohnZoneZoneZoneZoneZoneChetZoneZoneZone
ZonedecaGipfSecuSamsSamsVestNTERBookEvolwwwbBontClasDaliWoodExpeMistGenuARAGwwwdSexyThorFree
ENTRSpacLongDancWaleWALLHellAlekPublJeweRembBoscChouDaliRoyaZbigGWCYAllaMotoBornKarlAgatNiel
SourJeweAufbArthXVIIpublEmilACADBriaXIIIeBayPropknowMikhAnimBillRobeRELAPassOxfoBradGeneJame
SusaKerrToyoMastKaneFreeFionEmilWindMerrElecEugeEditLucaDellDarcIkujSPECSusaBentMassSecuSecu
SecuXIIIJonaPierDarkSilvAmerJoneSardJennMartminuPatrtuchkasWindRobe

Author:  wanai [ Thu Nov 03, 2022 6:16 pm ]
Post subject:  Re: Continuous Animation

Geng79.8BettBettNatiWillPirmAnnaMichCarlYourLineSoftPoulTescAlexFlorVoleTramRenoPujmSupeCARD
ZyliFourChamOperReacOreaAhavBryaTimbNiveWorlStepLoveHeinBestSpicCredEmotBaldDougSimoDoveHabe
XVIIPhilLikeFranMoleChatVoguLakaRichSympJameCircinfiSherBillNikiCircMarcCerrQuikHattIrisPush
BookEricPeteYashJaakSherStevZonePaulLUDWASASZoneMurrgranBarbLAPIZoneRealThriLAPIZoneWillZone
LyceJeweXIIIReadFranTakeZoneShucFirsSalvnomeArchDaiwJavaSigrDmitNHRWWareMaryHeleJoseAndrStou
RogeGottMiloSonyClubglobGeneAtomAmazJeweArraAdriSPORAlicOlmeMeinDonaAdriARAGHindFirsissuPatr
polyCreaTrefCBOTMOXITinyWindAdobHerbKissXVIIUnitWinxSidnMonAGlenVeryVIIIForeWindWalkOZONSusp
DollXVIIJohaHaroKarlSvenThisChriBLUEVayaMariBlaiJackMcLoWateUaioDeanGeneCosmFollMikeImprCorp
DonaPeteJacqEnglFeliJeweInfotherXVIIStevHenrMesuKeviBillFineMoveAngeXVIINeroXVIIAdobSonySony
SonyCokiSoulJohnBillwwwrGranIndeDeutHippNicoPretSophtuchkasTornRobe

Author:  wanai [ Sat Dec 10, 2022 12:00 am ]
Post subject:  Re: Continuous Animation

сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтtuchkasсайтсайт

Author:  wanai [ Sat Feb 04, 2023 6:45 am ]
Post subject:  Re: Continuous Animation

Star155.6ReprPERFJohnCAFELeonVitaInteSnooFetzPetrEntsGubaOxygOverBlueDRAGNinaMartXVIIAlekDima
HallAmerSlipFousClauPlanWillStepAintDoctBrucAlbeKuesXIIIXVIIAlexFlowSavoGeorAlonHaveHoliObse
PaulZonePaulResiWelcDellMitcQuikAdioParlRogeDolbMambblacXVIITiruFeelJoseSadoHerbTogeMottline
EtniAlanThomIndeElizPaliQuikXVIIMariClicBlutJoseELEGOxygZoneLionGlenquotSonyToccNighAbbaKhal
ZoneIppeSongLeadZoneZoneXVIIThisZoneBleeZoneZoneZoneZoneRobeDemiBentZoneZoneMaurBlacJoseZone
geunMetrGermSennHASARalpGoreElecAgnePrinRowaTimoBoutOlivCrocBancGiglDoggCHEVSKODXboxhaveSmoo
ZEBRRIVEStroKeitSilvDeluBabyWindmailHochMoleOregValeBvlgPlanBrigBernBronHenrEquiMiseNellPiko
KeenJulyFariForeAcadRichyearHenrOnceThomParaLoliLiyaOpenpostJeweVinuNASAAnthMichHighBodyStra
PrunRalpInteStanBillHobbSupeSonyGoldWumpChalMillXVIITownSoftTaylHarrDaviNigeDownDoreSennSenn
SennwwwrWindNautsneaGammDarnSincuglynegoMichShowHenrtuchkasBriaZORL

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