mouse
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA
mouse
since the menu has no flexibility whatsoever, im adding a menu which is a map where you cant move, no hud, and you select with the mouse. but how do u make it that if you click in a certain area of the screen, it activates another order, or even better, let the mouse klick on a level model or staticmesh or make a pawn follow a mouse cursor
Herp derp.
You can check if the mouse is within a certain area with
GetMousePosX()
GetMousePosY()
There's also another useful command. The manual:
GetMousePosX()
GetMousePosY()
There's also another useful command. The manual:
char* MouseSelect(bool HighlightOnCollision, bool PlayerIsSelectable, float FillColorR, float FillColorG, float FillColorB, float AmbientColorR, float AmbientColorG, float AmbientColorB);
When the mouse pointer is moved over the bounding box of an actor, this command returns the EntityName of that actor. If HighlightOnCollision is true, then the color of the pawn changes when the mouse is over the bounding box of the pawn. If PlayerIsSelectable is true, then also the player is selectable. The default value is false. FillColorR, FillColorG, FillColorB, AmbientColorR, AmbientColorG, AmbientColorB define the highlight color. This color is by default set to white (R, G, B, each beteen 0 ... 255)
Pain is only psychological.
It is not possible to select staticmeshes with the MouseSelect command from what i know. You can however select everything that has a bounding box (pawn, staticentityproxy, dynamic entity).
Using the GetMousePosX/Y commands can be a bit tricky, but it is the only way to check if the mouse is in a spceific area i know of.
Using the GetMousePosX/Y commands can be a bit tricky, but it is the only way to check if the mouse is in a spceific area i know of.
Everyone can see the difficult, but only the wise can see the simple.
-----
-----
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA
how would you read the entity name? is it stored in a variable, cuz that would be perfect thanksJuutis wrote:You can check if the mouse is within a certain area with
There's also another useful command. The manual:char* MouseSelect(bool HighlightOnCollision, bool PlayerIsSelectable, float FillColorR, float FillColorG, float FillColorB, float AmbientColorR, float AmbientColorG, float AmbientColorB);
When the mouse pointer is moved over the bounding box of an actor, this command returns the EntityName of that actor. If HighlightOnCollision is true, then the color of the pawn changes when the mouse is over the bounding box of the pawn. If PlayerIsSelectable is true, then also the player is selectable. The default value is false. FillColorR, FillColorG, FillColorB, AmbientColorR, AmbientColorG, AmbientColorB define the highlight color. This color is by default set to white (R, G, B, each beteen 0 ... 255)
//edit nvm, that was a stupid question
Herp derp.