Gamestudio Links
Zorro Links
Newest Posts
Zorro version 3.0 prerelease!
by Grant. 02/24/26 22:21
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
5 registered members (TipmyPip, clint000, Grant, chsmac85, Martin_HH), 5,858 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 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 | 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