Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,388 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
remove pointer #429614
09/15/13 12:49
09/15/13 12:49
Joined: Dec 2009
Posts: 361
R
rtsgamer706 Offline OP
Senior Member
rtsgamer706  Offline OP
Senior Member
R

Joined: Dec 2009
Posts: 361
Hi, I have an entity which another function when clicked on,
and that second function gives it a pointer, while the original action it's running does not.
How do I get the entity to no longer have the pointer once it's finished running through the second function?
Thanks

Re: remove pointer [Re: rtsgamer706] #429618
09/15/13 15:55
09/15/13 15:55
Joined: Sep 2009
Posts: 1,032
Budapest
Aku_Aku Offline
Serious User
Aku_Aku  Offline
Serious User

Joined: Sep 2009
Posts: 1,032
Budapest
You should clarify better, what entity do you have?
What functions does have the entity?
What do the functions do and when?

Re: remove pointer [Re: Aku_Aku] #429620
09/15/13 16:35
09/15/13 16:35
Joined: Dec 2009
Posts: 361
R
rtsgamer706 Offline OP
Senior Member
rtsgamer706  Offline OP
Senior Member
R

Joined: Dec 2009
Posts: 361
I have an object that runs an action called truck.
in truck there's a part that says:

if (mouse_left)
selected(); //selected being another function

in selected it says:

function selected()
{
selected_piece = me;
// ... rest of the code
return;
}

how do I have the entity lose the "selected piece" pointer (which I define at the top)
when something happens, like when the loop in selected ends or whatever?

Re: remove pointer [Re: rtsgamer706] #429624
09/15/13 16:41
09/15/13 16:41
Joined: Jul 2008
Posts: 2,110
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,110
Germany
if i understand u correct, this should work
Code:
selected_piece = NULL;


The
Code:
return;

at the end of the function seams useless btw.


Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: remove pointer [Re: rayp] #429627
09/15/13 17:03
09/15/13 17:03
Joined: Dec 2009
Posts: 361
R
rtsgamer706 Offline OP
Senior Member
rtsgamer706  Offline OP
Senior Member
R

Joined: Dec 2009
Posts: 361
I'll try that, thanks


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