Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,507 guests, and 12 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 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: 993
Budapest
Aku_Aku Offline
User
Aku_Aku  Offline
User

Joined: Sep 2009
Posts: 993
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,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
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 | 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