The Daily Click ::. Forums ::. Klik Coding Help ::. Need help with 360 shooter
 

Post Reply  Post Oekaki 
 

Posted By Message

Tar



Registered
  12/02/2005
Points
  13
19th July, 2005 at 23:40:09 -

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.

Image Edited by the Author.

Image Edited by the Author.

 
n/a

Tar



Registered
  12/02/2005
Points
  13
21st July, 2005 at 12:07:38 -

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.

 
n/a

David W.



Registered
  21/07/2005
Points
  7
21st July, 2005 at 12:25:27 -

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.

 
n/a

Tar



Registered
  12/02/2005
Points
  13
21st July, 2005 at 19:57:43 -

yeah!!, I'd love that, thanks David. Now...how you give me the file?, via mail?...if that's so, elpancra@sinectis.com.ar

 
n/a

David W.



Registered
  21/07/2005
Points
  7
21st July, 2005 at 22:01:28 -

alright I sent it, I hope it helps!

 
n/a
   

Post Reply



 



Advertisement

Worth A Click