Gamestudio Links
Zorro Links
Newest Posts
WFO Training with parallel cores Zorro64
by Martin_HH. 02/23/26 10:49
ZorroGPT
by TipmyPip. 02/21/26 19:15
Camera always moves upwards?
by clonman. 02/21/26 09:29
Zorro version 3.0 prerelease!
by TipmyPip. 02/20/26 13:22
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (TipmyPip, alx, Martin_HH), 6,129 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Need help setting player entity #259307
04/05/09 11:29
04/05/09 11:29
Joined: Apr 2009
Posts: 141
dakilla Offline OP
Member
dakilla  Offline OP
Member

Joined: Apr 2009
Posts: 141
I am new to lite-c and read through the workshop, but one thing that was constantly annoying me was how to assign an entity to the 'me' pointer.

Any help?


One day there will be an unfixable bug,
That day is not today.
Re: Need help setting player entity [Re: dakilla] #259308
04/05/09 11:33
04/05/09 11:33
Joined: Apr 2009
Posts: 141
dakilla Offline OP
Member
dakilla  Offline OP
Member

Joined: Apr 2009
Posts: 141
I am willing to post up the script for my game (dont worry it's REALLY short)


One day there will be an unfixable bug,
That day is not today.
Re: Need help setting player entity [Re: dakilla] #259309
04/05/09 11:35
04/05/09 11:35
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
uhm

Code:
ENTITY* testpointer;

action player_action()
{
  // all in this action can be controlled with me/my
  
  player = my; // this says, that player is now my
  testpointer = my; // This says, that testpointer is now my

  c_move(my,...,...,...);
  c_move(player,...,...,...);
  c_move(testpointer,...,...,...);
  // All 3 movements are set to my. Means every model that has this action attached.
}


function main()
[...]
ent_create("filename", vector(x,y,z), player_action)
[...]


player = me/my : Set player as me/my
me/my = player : Set me/my as an other Pointer


Ich hoff das hilft ^^

Last edited by Espér; 04/05/09 11:39.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Need help setting player entity [Re: Espér] #259310
04/05/09 11:52
04/05/09 11:52
Joined: Apr 2009
Posts: 141
dakilla Offline OP
Member
dakilla  Offline OP
Member

Joined: Apr 2009
Posts: 141
ENTITY* guard;

action player_action()
{
player = my;
guard = my;


if (key_space )
c_move(my, vector(15*time_step, 0, 0), nullvector, GLIDE;
}


function main()
{
level_load (large1.hmp)
ent_create("guard.mdl", vector(0,100,50), player_action)

}

Now it says there is an error with ' c_move(my, vector(15*time_step, 0, 0), nullvector, GLIDE;'


One day there will be an unfixable bug,
That day is not today.
Re: Need help setting player entity [Re: dakilla] #259332
04/05/09 14:13
04/05/09 14:13
Joined: May 2008
Posts: 331
Lithuania, Vilnius
Jaxas Offline
Senior Member
Jaxas  Offline
Senior Member

Joined: May 2008
Posts: 331
Lithuania, Vilnius
you forgot ")" in c_move(my, vector(15*time_step, 0, 0), nullvector, GLIDE); wink


The smaller the bug, the harder it is to kill.
_________________________________________
Forklift DEMO (3dgs)
Re: Need help setting player entity [Re: Jaxas] #259352
04/05/09 16:08
04/05/09 16:08
Joined: Apr 2009
Posts: 141
dakilla Offline OP
Member
dakilla  Offline OP
Member

Joined: Apr 2009
Posts: 141
thanks :-)


One day there will be an unfixable bug,
That day is not today.

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