Ok, I know this have been discused and teached a lot on this forum. I copied an example, and can't get it to work. Please help me, I know it's bulky but I turned MMF upside down looking for the problem and don't get it.
What MMF does when I press the space bar it fires a bullet beggining from X=0 and Y=800 (the up-left corner) and goes down decreasing Y, and when I press the space bar aggain the bullet takes the angle from the Soldier. Don't know if you will understand, I hope so.
I'll put the actions:
This is to take the angle from Soldier
---Repeat while "left arrow" is pressed: Add 2 to Alt value A of Soldier
---and Selector is over Soldier :
---Repeat while "right arrow" is pressed: Sub 2 to Alt value A of Soldier
---and Selector is over Soldier :
This is the firing part:
---Only one action when event loops: Set x,y of the selector to x,y of soldier. Adv Math obj: set
---and selector is over soldier : fixed object Soldier and decimal offset 2 (dont know what that does, I just copyed it)
---Every 0:0:10 : Shots Bullet at 0 speed in direction of Soldier. Alt value
---and Repeat when space bar is pressed: A of Bullet=Alt value A of Soldier. Alt value B
---Selector overlaps Soldier : of Bullet = X pos of Bullet * 100. Alt value C of Bullet = Y pos of Bullet * 100.
---Number of Bullets > 0: Start loop #0 for 10 loops
---Loop triger #0: Bullet: Add Sine( "AdvMath", Alterable Value A( "Bullet" ) ) to Alt value B.
Add Cosine( "AdvMath", Alterable Value A( "Bullet" ) ) to Alt value C.
Set X pos to Alterable Value B( "Bullet" ) / 100
Set Y pos to Alterable Value C( "Bullet" ) / 100
Please help!!. Thank you very very much for reading this.
well, I guess no one understanded my format...please tell me if that is or if you don't know the answer, couse if you don't understand I can reformat this thing, pleaseeeeeeeeeee. Thanks again.
So if I understand correctly you'r trying to get a 360 degree shooting to work? If so I have one I made and if you want I can send it to you. It shoots at the mouse but I'm sure you could change this to work for the keyboard if you wanted.