In TGF: You can't, as far as I know.
In MMF: Active picture object, but I'd rather use Alpha Channel Object, because it can store images internally plus lots of other features.
In MMF2: All Active Objects can be scaled and rotated in runtime.
Action point? You mean hot spot, or do you want to shoot stuff with it? Because I'd just do the shooting by creating the bullets or whatever on the object, and then moving them with Sin and Cos and all that shite.
dont see how
Direction( "Advanced Direction Object", X( "Active" ), Y( "Active" ), X( "Alpha Channel object" ), Y( "Alpha Channel object" ) )
is invertable it will just make it a few angles lower and still turn the opposite direction of my mouse.
- Eternal Life, Or Your Money Back -
http://www.befun.dk/
Currently looking for a home (team)
- 3 times and yeah the angle goes negative and therefore the right way.. Now my mouse was off by 90 angle. but just added + 90. Now the direction is 100%
Yeah alpha is nice i see now.. makes games smaller etc, and best thing is it can reverse animations.. now thats kewl being able to ping pong frames to save kb's. Only bad thing is alpha is required.
- Eternal Life, Or Your Money Back -
http://www.befun.dk/
Currently looking for a home (team)
Before with 32 direction with 20 frames of idle, 9 frames of walking anim
= 438kb uncompressed
now with 320 direction with 20 frames of idle and 9 frames of walking anim
Including 2 alphas. Normal and 1 for when u turn into a ghost.
= 86kb uncompressed
- Eternal Life, Or Your Money Back -
http://www.befun.dk/
Currently looking for a home (team)
Dustin Gunn Gnarly Tubular Way Cool Awesome Groovy Mondo
Registered 15/12/2004
Points 2659
20th August, 2006 at 18:02:07 -
Alpha Channel Object uses backwards calculations for some reason. When MMF2 came out and I converted them to active objects I had to change all the values.
You could always do what a lot of earlier 2D games did and prerender all the rotations, but it takes tons of space, obviously.
1 more question tonight.. For the machine gun which should fire loads of bullets i dont wanna use alpha, to many objects at a time i think.. How do i do 360 degree bullet fire. is there an extension. Ive tried sine/cos but cant figure that out.
Hug. Tina
- Eternal Life, Or Your Money Back -
http://www.befun.dk/
Currently looking for a home (team)
User clicks with left button (That means fire)
-Create Bullet at (0;0) from Player
-Bullet: Set alterable A to Angle("Player")
-Bullet: Set alterable B to X("Player")
-Bullet: Set alterable C to Y("Player")
Number of bullets > 0
-Start loop "bullet" 30 times (Or more, if you want faster bullets)
On loop "bullet"
-Bullet: Set value B to value B("Bullet") + Cos(Value A("Bullet"))
-Bullet: Set value C to value C("Bullet") + Sin(Value A("Bullet"))
-Bullet: Set X position to value B("Bullet")
-Bullet: Set Y position to value C("Bullet")
On loop "bullet" Bullet collides with backdrop
-Bullet: Destroy
... And so on. I used alterable values because they allow decimals, so it's more accurate than just adding directly to the X and Y position.
If the bullets turn with the player, you've done something wrong.
When the player fires, you should set the bullet's alterable value A (or whatever) to the angle of the player. Then calculate the X and Y position of the bullet NOT from the player's angle directly, but from the bullet's value A.
Works now.. i had moved the hotspot of the bullet to make it better look as it came frmo the barrel.. somehow that interfered and i had to do a few extra calculations.
Edited by the Author.
- Eternal Life, Or Your Money Back -
http://www.befun.dk/
Currently looking for a home (team)