ZFGC
Resources => Coding => Topic started by: Koh on September 01, 2006, 03:00:53 pm
-
How do i code the sword so when its charged, it goes to the charged sprite and link walks around facing one direction until he releases the charged sword?
-
I have made and released a GB sword engine that you can find in the Zelda Engines Directory (http://www.zfgc.com/index.php/topic,845.0.html). But thats only for MMF users and I am assuming your a GM user..
-
o yeah this is with GM6 byt the way...
-
i know someone knows, help me out here.
-
this is a toughy,even i dont know
Goodnight?
make an exemple!!!!!!!!!
pweeeeese?
-
Hey look, people are depending on me!
/me gleams with pride 8)
Of course, I can't write a universal code that will work with every different movement system, but chances are that yours has these three things:
1) A variable that says whether or not you're charging the sword
2) A variable that keeps track of which way you're facing
3) A piece of code that changes the sprite depending on which way you're facing
First, add a condition before every line that changes the "facing" variable when you start moving, so that it only changes if you're NOT charging. That will keep Link facing the same direction.
Then go to the sprite-changing code and add some extra lines so that: if you ARE charging, use the sword-holding movement sprites, and if not, use the regular sprites.
And that is how we eat a turkey.
-
??? can you make an engine instead, imessed up bigtime
-
I can't just make an engine, for the same reason that I had to describe the steps instead of giving sample code.
Everybody sets up their game and movement systems using different methods, and the way to add features like this depends on what you've already got.
Maybe if you explain what you mean by messed up, and possibly show your current movement code, I can help fix it.
-
And that's without mentioning the fact that if you cant program a sword-charging system on your own, perhaps your time would be better spent learning to use your language/program of choice (in this case, Game Maker) than trying to create a game using other peoples' works.