Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 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