Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 17,416 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
problems with entity clicking #204580
04/30/08 02:34
04/30/08 02:34
Joined: Apr 2007
Posts: 249
Louisana, USA
Ilidrake Offline OP
Member
Ilidrake  Offline OP
Member

Joined: Apr 2007
Posts: 249
Louisana, USA
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;
}
}

//uses:Available_Slots
action on_click_dock
{
my.enable_click = on;
my.event = build_units;
}


Just Because Your Paranoid Doesn't Mean They Aren't After You...Because They Really Are

http://spearbang.awardspace.com/news.php
Re: problems with entity clicking [Re: Ilidrake] #204582
04/30/08 03:42
04/30/08 03:42
Joined: Apr 2007
Posts: 249
Louisana, USA
Ilidrake Offline OP
Member
Ilidrake  Offline OP
Member

Joined: Apr 2007
Posts: 249
Louisana, USA
do i need to get the vector positions of the entity with vec_for_screen first before i can click them?


Just Because Your Paranoid Doesn't Mean They Aren't After You...Because They Really Are

http://spearbang.awardspace.com/news.php
Re: problems with entity clicking [Re: Ilidrake] #204583
04/30/08 03:57
04/30/08 03:57
Joined: Apr 2007
Posts: 249
Louisana, USA
Ilidrake Offline OP
Member
Ilidrake  Offline OP
Member

Joined: Apr 2007
Posts: 249
Louisana, USA
come on guys. aint there someone who can help me?


Just Because Your Paranoid Doesn't Mean They Aren't After You...Because They Really Are

http://spearbang.awardspace.com/news.php
Re: problems with entity clicking [Re: Ilidrake] #204586
04/30/08 04:24
04/30/08 04:24
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
check your mouse mode.


3333333333
Re: problems with entity clicking [Re: Quad] #204588
04/30/08 04:29
04/30/08 04:29
Joined: Apr 2007
Posts: 249
Louisana, USA
Ilidrake Offline OP
Member
Ilidrake  Offline OP
Member

Joined: Apr 2007
Posts: 249
Louisana, USA
mouse_mode = 2;

is this correct?


Just Because Your Paranoid Doesn't Mean They Aren't After You...Because They Really Are

http://spearbang.awardspace.com/news.php
Re: problems with entity clicking [Re: Ilidrake] #204589
04/30/08 04:33
04/30/08 04:33
Joined: Apr 2007
Posts: 249
Louisana, USA
Ilidrake Offline OP
Member
Ilidrake  Offline OP
Member

Joined: Apr 2007
Posts: 249
Louisana, USA
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

http://spearbang.awardspace.com/news.php
Re: problems with entity clicking [Re: Ilidrake] #204590
04/30/08 04:47
04/30/08 04:47
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Because it is already written in the manual if it is correct or not.

try mouse_mode = 4; or use

vec_set(mouse_pos,mouse_cursor);


3333333333
Re: problems with entity clicking [Re: Quad] #204591
04/30/08 04:49
04/30/08 04:49
Joined: Apr 2007
Posts: 249
Louisana, USA
Ilidrake Offline OP
Member
Ilidrake  Offline OP
Member

Joined: Apr 2007
Posts: 249
Louisana, USA
I've read thru the manual several times trying to get this to work but to no avail. Thank anyway


Just Because Your Paranoid Doesn't Mean They Aren't After You...Because They Really Are

http://spearbang.awardspace.com/news.php
Re: problems with entity clicking [Re: Ilidrake] #204592
04/30/08 04:56
04/30/08 04:56
Joined: Apr 2007
Posts: 249
Louisana, USA
Ilidrake Offline OP
Member
Ilidrake  Offline OP
Member

Joined: Apr 2007
Posts: 249
Louisana, USA
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

http://spearbang.awardspace.com/news.php
Re: problems with entity clicking [Re: Ilidrake] #204595
04/30/08 05:29
04/30/08 05:29
Joined: Aug 2007
Posts: 44
QLD, Australia
Serex Offline
Newbie
Serex  Offline
Newbie

Joined: Aug 2007
Posts: 44
QLD, Australia
this is the code i use. works fine, in lite-c \:D

 Code:
// 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);
}



Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1