I have a level built with 1 entity. I want to be able to click the unit and have a panel pop up. Only when i click over it nithing happens. Can someone help me out with this one? I'm giving the action to the building in WED.
function build_units() { if (event_type == EVENT_CLICK) { build_gui_pan.visible = on; return; } }
This is really aggriavting. This is one reason I've never completed anything with this engine because things dont work and it makes me wonder if its my code or a bug in the engine? And its hard to get any help.
Just Because Your Paranoid Doesn't Mean They Aren't After You...Because They Really Are
i tried this just to see if anything was going on:
if(mouse_left == 1) // left Mousebutton pressed? { if(mouse_ent) { ent_remove(mouse_ent); // remove clicked Entity } } Nothing! Anyone else have any clues? Does the pitch and arc of the camera have anything to do with this?
Just Because Your Paranoid Doesn't Mean They Aren't After You...Because They Really Are
// Resources Used
BMAP* bHudCursor = "resources/tga/cursor.tga";
BMAP* bHudCursorDown = "resources/tga/cursor_down.tga";
function createMouse()
{
// Mouse Mode
// 0 None Visible
// 1 Visible, Controllable
// 2 Visible, Not Controllable
mouse_mode = 2;
mouse_map = bHudCursor; // Image for the cursor to use
mouse_spot.x = 1; // make the tip of the arrow pointer the hot spot area
mouse_spot.y = 1; // (1, 1 on the mouse pointer bitmap)
}
function updateMouse()
{
// Check If Mouse Button Has Been Clicked
// If So Then Change The Mouse Map
if (mouse_left == 1 || mouse_right == 1 || mouse_middle == 1)
{
mouse_map = bHudCursorDown; // Active Cursor (clicked)
if (mouse_ent != player && mouse_middle)
{
ptr_remove(mouse_ent);
}
}
else
{
mouse_map = bHudCursor; // Normal Cursor
}
// Update the position of the cursor
vec_set(mouse_pos, mouse_cursor);
}