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,631 guests, and 7 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
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 | 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