Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 3,172 guests, and 15 spiders.
Key: Admin, Global Mod, Mod
Newest Members
valino, juergenwue, VladMak, Geir, ondrej
19209 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