tooltiperror
Super Moderator
- Reaction score
- 232
If you haven't already, go and try out XANID by Uberplayer. It's really superb.
Well, I've always really wanted to make a platformer. After planning it for sometime, I realized my problem was that I had not yet figured out how I would make the physics work, or how to make the 3D game of Warcraft III into a 2D environment. I was stumped. Eventually I decided I wanted to make the units in the game sideways, have them walk along the X axis, and make the Y axis stand for height (aka the Z axis).
The way I was planning on doing this was by exporting every unit I was going to use, editing the model to be sideways, and importing it. Of course, this was an awful approach. It was rather wonky: it required a lot more work, for possibly worse effects. Next I came to a better approach, using [LJASS]SetUnitLookAt[/LJASS] on dummy.mdx, and attaching my units as models to the dummy. This was a step in the right direction, but I found units used as [ljass]effect[/ljass]s did not play animations, making the game ugly.
Eventually, I admitted that I was not smart enough for the job, and asked Uberplayer for assistance. Sir Uberplayerus gave me these eloquent words of advice:
I have two units for each object. Onea that faces right, and one that faces left. In the Object Editor the right unit has "Maximum Roll Angle (Degrees)" of -270, and the left unit has it -90. When the units are created, I set the right unit face 0 degrees, and left unit face 180 degrees.
And that was a way to edit their roll. Now, this is all grand and jolly, but every good animation needs that coding to go wit hit making it awesome. So in this demomap, there is thoroughly commented vJass showing you how I got this to work. The code uses KeyAction by Earth-Fury.
Word from the wise: compare zero to your variables, and take constructive criticism, for your code is made to be manageable not just fast, lest you become an ASMer in a world of high level programming.