Gamestudio Links
Zorro Links
Newest Posts
Purchase A8 full licence version
by ukgamer. 05/04/26 17:42
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (dangyc, TipmyPip), 5,456 guests, and 19 spiders.
Key: Admin, Global Mod, Mod
Newest Members
dangyc, ukgamer, valino, juergenwue, VladMak
19211 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