The Daily Click ::. Forums ::. Klik Coding Help ::. Make an object always look at cursor
 

Post Reply  Post Oekaki 
 

Posted By Message

Trooper_959

The Stupid Rebel

Registered
  02/11/2007
Points
  213
28th September, 2009 at 22:13:27 -

Im making a shooting/rpg game and i need my soldier to always be aiming (looking at the direction) at the cursor and i cant figure out how. Thanks

 
Is it really worth it to go onto the battlefield? I GOT A CUSTOM RATING SEE???

http://www.freewebs.com/tiredfreakedoutproductions/

http://www.weirdogamez.com



Trooper_959

The Stupid Rebel

Registered
  02/11/2007
Points
  213
28th September, 2009 at 22:20:35 -

oh and by the way im using mmf2

 
Is it really worth it to go onto the battlefield? I GOT A CUSTOM RATING SEE???

http://www.freewebs.com/tiredfreakedoutproductions/

http://www.weirdogamez.com



Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
28th September, 2009 at 22:52:50 -

>>>Always
-Set position of (Cursor Mask) to Xpos of Mouse and Ypos of mouse
-(Soldier)Look in the direction of (Cursor Mask)

I don't think I described it very well but I hope this will help. Basically you need to set the position of an active object to the position of the mouse and then make the soldiers look at the active.

 
n/a

Trooper_959

The Stupid Rebel

Registered
  02/11/2007
Points
  213
28th September, 2009 at 23:05:04 -

Hey thanks i understand that ill try it out ill let ya know if it works

 
Is it really worth it to go onto the battlefield? I GOT A CUSTOM RATING SEE???

http://www.freewebs.com/tiredfreakedoutproductions/

http://www.weirdogamez.com



Trooper_959

The Stupid Rebel

Registered
  02/11/2007
Points
  213
28th September, 2009 at 23:27:39 -

it works thanks dude

 
Is it really worth it to go onto the battlefield? I GOT A CUSTOM RATING SEE???

http://www.freewebs.com/tiredfreakedoutproductions/

http://www.weirdogamez.com



Rob Westbrook



Registered
  25/05/2007
Points
  193

360 OwnerVIP Member
29th September, 2009 at 18:18:38 -

Using the Advanced Direction object you can set the angle of the active relative to the X and Y coordinates of the mouse itself, without another active. That method also means you can do nifty 360 degree shooting, which looks a lot more professional.

 
There are 10 types of people in the world: Those who understand binary and those who don't.

MrMcFlurry



Registered
  03/08/2009
Points
  89

360 Owner
29th September, 2009 at 19:35:02 -

What Rob says is true, but that is gonna need some static engine coding, which is a lot more professional looking, a lot nicer to play, but, is more complex. and considering you are asking for help on beginner problems, it's probably out of your scope for now

 
n/a
   

Post Reply



 



Advertisement

Worth A Click