View Full Version : Mouse Curser for RTS Style games?
Hallo
Any idea how to make a mouse courser for RTS style games? How can I create a courser and check on what it is pointing or clicking?
treeform
11-06-2009, 04:16 PM
I also would like to know.
lcizzle
11-06-2009, 04:37 PM
If you can't figure out how do something break it down into smaller problems.
-Modify the mouse cursor
-Detect clicking on an in world object and dump a message to the console with the object name
-Detect clicking on an object and store the item in a selected object list
Then use that info to move selected characters around the screen and select new objects and move those.
Try not to always think about the end result alone, but the steps it takes to get you there.
You'll never learn if everyone does it for you.
Eliot
11-06-2009, 04:38 PM
Take a look at the UIInteraction.uc, UIScene(bDisplayCursor) and UISceneClient(MousePosition,ChangeMouseCursor,SetM ousePosition)
so i think you would need to add(or find a reference to it) an interaction to read key inputs(OnReceivedNativeInputKey) and access from there the UIScene and UISceneClient to check the mouse position
treeform
11-06-2009, 05:00 PM
Thank you Eliot!
Chris2009
11-15-2009, 07:55 PM
First you need to create a function that will grab the mouse cursor position.
Try "UIRoot GetCursorPosition". For the current cursor position.
Then you will need a mouse cursor texture and plot this on the canvas.
Then you need to update the HUD.
I have a fully working and very clean mouse cursor function that I use.
CorvaenOboros
04-14-2011, 09:09 PM
this tutorial is awesome , and provides the full source code
http://udn.epicgames.com/Three/DevelopmentKitGemsCreatingAMouseInterface.html
the isometric camera setup may also be useful , draws custom mesh / or particle to 3d wworld coords , and show how can tell pawn to move to location clicked on with mouse.
http://x9productions.com/blog/?page_id=442
Powered by vBulletin® Version 4.1.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.