Gamestudio Links
Zorro Links
Newest Posts
zorro license, IB connection
by miwok. 12/06/23 16:32
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
5 registered members (miwok, AndrewAMD, TipmyPip, 3run, 1 invisible), 633 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 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 | 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