Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
0 registered members (), 1,012 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
select the object #347884
11/20/10 17:28
11/20/10 17:28
Joined: Oct 2010
Posts: 8
Malaysia
N
Nish Offline OP
Newbie
Nish  Offline OP
Newbie
N

Joined: Oct 2010
Posts: 8
Malaysia
hi,
anyone can help me?
im having a problem in selecting a object, i already have a code to select the object and the code work like this..

1.if i select the object, the object is remain selected even if i selected another object.

2.when i perform move funtion to the object selected, the funtion work only to the last object selected even the first object selected.

3. how to unselect the object.

thanks in advance.

Re: select the object [Re: Nish] #347933
11/21/10 00:54
11/21/10 00:54
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
ENTITY* ent_last_selected;


Put the following into a while-loop:

if(mouse_ent)//if the mouse is over the object...
{
if(mouse_left)//...and the left mouse button is clicked...
{
ent_last_selected = mouse_ent;//...set the pointer to the object
ent_move(ent_last_selected, .....);//move the object with the given pointer
}

}
if(mouse_right)//use right mouse button to unselect the object
{
ent_last_selected = NULL;

}

Re: select the object [Re: Pappenheimer] #347942
11/21/10 03:39
11/21/10 03:39
Joined: Oct 2010
Posts: 8
Malaysia
N
Nish Offline OP
Newbie
Nish  Offline OP
Newbie
N

Joined: Oct 2010
Posts: 8
Malaysia
thanks alot.


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