Gamestudio Links
Zorro Links
Newest Posts
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (BrainSailor, 1 invisible), 1,090 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Reference to other entities inside an action #248731
01/28/09 20:01
01/28/09 20:01
Joined: Jan 2009
Posts: 86
Brasil - RS
D
DiegoFloor Offline OP
Junior Member
DiegoFloor  Offline OP
Junior Member
D

Joined: Jan 2009
Posts: 86
Brasil - RS
Hello!
Let me state this question directly with my problem. I have several entities with the same action. And they all have to be constrained to an additional entity (a pivot). How do I do that?

Re: Reference to other entities inside an action [Re: DiegoFloor] #248796
01/29/09 04:26
01/29/09 04:26
Joined: Oct 2008
Posts: 218
Nashua NH
heinekenbottle Offline
Member
heinekenbottle  Offline
Member

Joined: Oct 2008
Posts: 218
Nashua NH
You refer to other entities via pointers.

The pivot would take a pointer, and those other entities would behave in reference to that pivot.
Code:
ENTITY* myEnt;  //define a pointer

action pivot()
{
   myEnt = my;   //set the pointer to the pivot
}

action pivotChild()
{
   while(!myEnt) { wait(); } //wait for the pivot to load before doing anything
   //...do stuff, myEnt pointer can now be accessed.
}




I was once Anonymous_Alcoholic.

Code Breakpoint;
Re: Reference to other entities inside an action [Re: heinekenbottle] #248863
01/29/09 17:11
01/29/09 17:11
Joined: Jan 2009
Posts: 86
Brasil - RS
D
DiegoFloor Offline OP
Junior Member
DiegoFloor  Offline OP
Junior Member
D

Joined: Jan 2009
Posts: 86
Brasil - RS
Right! Right! I'm not used to work with pointers. I always forget how useful they are.
Thanks laugh


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