Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
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
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
4 registered members (AndrewAMD, Quad, soulman3, Ayumi), 675 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 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