| ~Hakurei Shrine~ > Rika and Nitori's Garage Experiments |
| Oh god acceleration |
| << < (3/4) > >> |
| Naut:
Hmm. What are the effects you're looking for? Usually there isn't enough syntax in Danmakufu to directly accomplish what you're looking for, but with all of us thinking, we can usually find a workaround (however makeshift it may be). |
| Hat:
Hmm. Let's wait until I have the basics of Yuka down, then I can get to the over-elaborate bomb mechanisms. XD I'd use the drawloop to animate Yuka's different sprites, though, yes? One for stationary, left and right, etc? (There's probably a thread about this... ah well) |
| Naut:
Yes sir. In Stuffman's player script tutorial, he tells you how to animate the left, right and stationary graphics properly. In the first post, even! |
| Hat:
... heheh. =D Whoops. Actually, he only said how to make the graphic CHANGE, something that is fairly simple (which I knew already, from inspection of other player scripts). It's the animating bit that's a little wierd, as that needs to be housed separately in the drawloop. I think. |
| Naut:
No sir, not that hard at all. What you'll wanna do is create a variable that you'll increment every drawloop. --- Code: ---@DrawLoop{ drawcounter++; } --- End code --- Then you'll probably want to use the modulus function (%) to correctly animate per frame. You'll want to get how many frames you want to skip per each animation frame (like, you wont want the animation changing every frame because it would look garbage, so you'll want to diddle with the modulus function a bit to corespond with how many frames you want to skip inbetween changing the animition frame. So, using the modulus function of a counte, you can put the following (for left movement): --- Code: ---if(GetKeyState(VK_SHOT)==KEY_PUSH || GetKeyState(VK_SHOT)==KEY_HOLD){ if(drawcounter%6==0){ SetGraphicRect(0,0, 64, 64); }else if{drawcounter%6==1){ SetGraphicRect(64, 0, 128, 64); }else if{drawcounter%6==2){ ... Etc. --- End code --- I go on a shpeel about how to use the modulus function in another thread, if you're unfamiliar with it. |
| Navigation |
| Message Index |
| Next page |
| Previous page |