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
0 registered members (), 571 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to display an object which is invisible? #89053
09/07/06 15:03
09/07/06 15:03
Joined: Sep 2006
Posts: 25
H
hernan Offline OP
Newbie
hernan  Offline OP
Newbie
H

Joined: Sep 2006
Posts: 25
Hi,guys,
I have met a problem when am using A6,that is an object is invisible;
and it is visible if I've clicked it by the mouse.
How can I do so?

Re: How to display an object which is invisible? [Re: hernan] #89054
09/07/06 15:15
09/07/06 15:15
Joined: Aug 2005
Posts: 1,230
M
MichaelGale Offline
Serious User
MichaelGale  Offline
Serious User
M

Joined: Aug 2005
Posts: 1,230
Code:

function main()
{
while(1)
{
if(mouse_left)
{
object.visible = on;
}
wait(1);
}
}



or

Code:

function show_object()
{
object.visible = on;
}

on_mouse_left = show_object;




Your friendly mod is at your service.
Re: How to display an object which is invisible? [Re: MichaelGale] #89055
09/07/06 15:26
09/07/06 15:26
Joined: Sep 2006
Posts: 25
H
hernan Offline OP
Newbie
hernan  Offline OP
Newbie
H

Joined: Sep 2006
Posts: 25
Does it realize:

if the object is clicked on with the left mouse button: appear,
if not :invisible.

Re: How to display an object which is invisible? [Re: hernan] #89056
09/07/06 15:41
09/07/06 15:41
Joined: Aug 2005
Posts: 1,230
M
MichaelGale Offline
Serious User
MichaelGale  Offline
Serious User
M

Joined: Aug 2005
Posts: 1,230
no, you have to check the position of the mouse pointer to do this.

like

Code:

function show_object()
{
if((pointer.x >= object.x) && (pointer.y >= object.x) && (pointer.x <= object.x + object.width) && (pointer.y <= object.y + object.height))
{
object.visible = on;
}
}

on_mouse_left = show_object;



EDIT: This works for panels, for entities you have to convert the pointer coordinates to 3D.

not tested

Last edited by Kohji; 09/07/06 15:43.

Your friendly mod is at your service.
Re: How to display an object which is invisible? [Re: hernan] #89057
09/07/06 15:41
09/07/06 15:41
Joined: Aug 2003
Posts: 7,439
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,439
Red Dwarf
you could make the model alpha to 1% instead of turning it totally invisible, it would be bareley visible, but you could still click it


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Re: How to display an object which is invisible? [Re: Michael_Schwarz] #89058
09/09/06 12:03
09/09/06 12:03
Joined: Sep 2006
Posts: 25
H
hernan Offline OP
Newbie
hernan  Offline OP
Newbie
H

Joined: Sep 2006
Posts: 25
thanks,
I need time to understand the codes,
I am a newbie.)


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