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
2 registered members (OptimusPrime, AndrewAMD), 14,580 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 2 of 2 1 2
Re: Mouse hover [Re: Knuckles] #126930
05/11/07 09:43
05/11/07 09:43
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
Quote:



Code:


text contact_text
{
font = standard_font;
layer = 10;
pos_x = 350;
pos_y = 100;
size_y = 70;
offset_y = 0;
flags = center_x, narrow, visible;
}

string str1 = "The mouse is touching the tree. \n Testing the text now. \n testing the line breaks also! loading.....";



function mouse_test()
{

temp.x = MOUSE_POS.x;
temp.y = MOUSE_POS.y;
temp.z = MOUSE_POS.Z;
vec_for_screen(temp, camera);



if((temp.x == tree.x) && (temp.y == tree.y) && (temp.z == tree.z))
{
contact_text.string = str1;
}






wrong script
temp.z = MOUSE_POS.Z; this is useless
change to temp.z = 9999.99;
and loop this !
function mouse_test()
{
while(1)
{
temp.x = MOUSE_POS.x;
temp.y = MOUSE_POS.y;
temp.z = 9999.99;
vec_for_screen(temp, camera);
wait(1);
}
}

then in tree action/function
my.enable_mouse = on;
my.enable_touch = on;
my.event = mouse_event;

function mouse_event
{
if(event_type == event_touch)
{my.transparent = on; my.alpha = 50;} //to check is it working
if(event_type == event_release)
{my.transparent = off;}
}

Last edited by tompo; 05/11/07 09:47.
Re: Mouse hover [Re: tompo] #126931
05/11/07 17:32
05/11/07 17:32
Joined: Jul 2006
Posts: 91
Florida, USA
Knuckles Offline OP
Junior Member
Knuckles  Offline OP
Junior Member

Joined: Jul 2006
Posts: 91
Florida, USA
my.enable_mouse is an invalid parameter. I would have to delete the "my" to make it work.

Last edited by Knuckles; 05/11/07 17:33.
Page 2 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