dfalcon
Posts : 217 Join date : 2012-07-04 Age : 33 Location : Long Island New York
| Subject: duck hunt level help needed December 2nd 2014, 8:57 pm | |
| is there a way i can make a object fly from the bottom to top with out making every frame? for a example if i wanted a duck to go zig zag up a level how can i code that | |
|
Werewood
Posts : 5691 Join date : 2014-08-11
| Subject: Re: duck hunt level help needed December 10th 2014, 2:50 pm | |
| Please look at this 6MB big animated MUGEN GIF (sorry for the bad GIF quality ): I changed this MUGEN1.0 KFM intro [Statedef 191] into a zig-zag'ing flying duck. You may download my kfm_temp.zip here: http://www.mediafire.com/download/2m071nifxtgp4bz/kfm_temp.zip I modified this MUGEN1.0 KFM intro state like this: - Code:
-
[Statedef 191] type = S ctrl = 0 anim = 7070 velset = 0,0
[State 191, 2] ;Assert this until you want "round 1, fight" to begin type = AssertSpecial trigger1 = 1 flag = Intro
[State 1026, No scroll] type = ScreenBound trigger1 = 1 value = 1 movecamera = 0,0
[State 191, 3] ;Change to stand state when done type = ChangeState trigger1 = Pos Y >= GameHeight ;AnimTime = 0 value = 0
[State 191, Turn] type = Turn trigger1 = TimeMod = 30,0
[State 191, VelSet] type = VelSet trigger1 = TimeMod = 30,0 x = 1.5 * IfElse(Time%60=0,1,-1) * -(Facing) y = -1.5
[State 191, PosSet] type = PosSet trigger1 = Time >= 170 x = -70 y = 0
[State 191, ChangeState] type = ChangeState trigger1 = Time >= 170 value = 0 ctrl = 1 Only three (3) frames in the animation are needed: - Code:
-
[Begin Action 7070] 7070,0, 0,0, 10 7070,1, 0,0, 10 7070,2, 0,0, 10 Hope you get the idea, of course you need to tweak big time for your own usage...... P.S. in case you ask for this particular duck, here is the custom duck hunt level sprite sheet I found: http://www.spriters-resource.com/custom_edited/duckhunt/sheet/63915/ | |
|