Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Martin_HH, TipmyPip), 1,279 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 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