Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Martin_HH, TipmyPip), 1,279 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 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,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İ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,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İ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 | chip programmers | 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