The Daily Click ::. Forums ::. Klik Coding Help ::. Minecraft crosshair
 

Post Reply  Post Oekaki 
 

Posted By Message

MarkRosher



Registered
  03/08/2013 12:35:27
Points
  5
3rd August, 2013 at 03/08/2013 12:45:07 -

hello
can anyone help me with mmf2?
i need to make minecraft crosshair
so its gotta move in cubes
like in minecraft when you highlight a block
anyone understands me?
sorry 4 my bad english

Edited by MarkRosher

 
lol

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
3rd August, 2013 at 03/08/2013 15:10:53 -

You can do this two ways and they are both fairly simple.

1) Whenever the mouse is over a cube, change its animation to "highlighted"
2) Whenever the mouse is over a cube, place an outline object at its 0,0

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

MarkRosher



Registered
  03/08/2013 12:35:27
Points
  5
3rd August, 2013 at 03/08/2013 19:03:09 -

no i wanted that it will always show the crosshair no only when blocks highlighted

 
lol

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
3rd August, 2013 at 03/08/2013 19:24:33 -

Do you want the crosshair to be at the location of the cursor or in a fixed place on the screen? If you just want the mouse to look like a crosshair, I believe there is an extension for it in one of the MMF2 extension packs. It may even come out of the box (I don't remember which extensions I had to download). Either way, you can just use that to make the cursor look like a crosshair. Alternatively, you can just have an active object that looks like a crosshair and always set its position to mouseX, mouseY and always hide the cursor.

If you want there to be a crosshair that, for example, goes around the player in a circle of fixed radius, things get a bit more complicated and you need to use trigonometry to calculate the correct position. I'd rather not get into that, but if that's the result you are looking for, I will provide a demo.

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

MarkRosher



Registered
  03/08/2013 12:35:27
Points
  5
3rd August, 2013 at 03/08/2013 19:26:30 -

i want a crosshair that follows the cursor but its gonna highlight the sky too


 
lol

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
3rd August, 2013 at 03/08/2013 19:30:52 -

In that case, just combine the two and you should get the desired result Good luck with your game!

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.
   

Post Reply



 



Advertisement

Worth A Click