Jump to content



Photo
- - - - -

little help with stopping the Dragon (Medieval Madness ToyMod)

Medieval Madness ToyMod Dragon vba code fly flying dragon

  • Please log in to reply
1 reply to this topic

#1 Jeffrey Spender

Jeffrey Spender

    Hobbyist

  • Members
  • PipPip
  • 28 posts

  • Flag: Netherlands

  • Favorite Pinball: TOTAN

Posted 10 January 2022 - 08:57 AM

I'm sorry to bother you all.
It's just this thing i can't fix myself, i have really tried searching and i've also tried to fix the code myself a lot of times.
I am talking about the Medieval Madness X with the fire breathing and flying dragon, which i love a lot.
I just want it to stop flying after the multiball is done and i can't get it done.

Of course i have tried to tell him to look at something like 'how many balls are in play' (or in the throughlane), but that didn't help.

From what i could tell is there seems to be some calculation about how fast/hard the wings are moving.
If that value comes below a certain value then the wings stop flapping and it shows a kind of final movement before turning to stone again.
I just can't get the code to tell the dragon to stop flying, if anyone could help me with this please.

Maybe handy if i link the code here:

https://github.com/s... TOYMOD 1.0.vbs


Edited by Jeffrey Spender, 10 January 2022 - 09:00 AM.

spin the lamp, to lite a wish


#2 Jeffrey Spender

Jeffrey Spender

    Hobbyist

  • Members
  • PipPip
  • 28 posts

  • Flag: Netherlands

  • Favorite Pinball: TOTAN

Posted 26 January 2022 - 04:01 PM

Ok, after a couple of weeks of coding and a lot of testing i came up with this little adjustment.
I found it pretty hard, since there are many variables and i know only so much of VBA.

I ended up trying to do a If - then and a Do - loop and all kinds of not so pretty constructions.
The dragon of course was 'not amused' by all this :) 

Basically i adjusted  the values of how the dragon is flying to about 75% of the values.
It now works like i wanted to and i really like the ToyMod with the pretty lights when the dragon does his fire breath 

If anyone else needs this, here's the code with my little adjustments:

Sub drago_timer()
     ali=ali+0.03                                                           'ciclo ali
     increm=increm+vers                                             'velocita ali
     if increm>0.99 or increm<0 then vers=0               'intervallo di flapping
   
     dragon.z=dragon.z+quota : incquota=incquota+quota    'movimento verticale
     if incquota<0 or incquota>140 then quota=0                   'intervallo di movimento verticale
    
    lwing.roty=(cos(ali)*37)*increm : lwing.rotx=(cos((ali+90))*37)*increm : lwing.z=((cos((ali)-110)*37)*increm+(200))+incquota  : lwing.size_x=((cos(ali+30)/2))*increm+1
    rwing.roty=(cos(ali+160)*37)*increm : rwing.rotx=(sin((ali+280.2))*37)*increm : rwing.z=(cos((ali)-110)*37)*increm+(200)+incquota  : rwing.size_x=((cos(ali+30)/2))*increm+1
    dragon.transz=((cos((ali)-110)*33)*increm)
    dragon.rotx=(cos(ali)*7)*increm
 
    if cos(ali)>0.9999 then playsound "flapping wings 3"
    if cos(ali)<-0.99 then stopsound  "flapping wings 3"
    if incquota<1 then stopsound  "flapping wings 3"
CheckBallsaver

End Sub


spin the lamp, to lite a wish






Also tagged with one or more of these keywords: Medieval Madness, ToyMod, Dragon, vba code, fly, flying dragon