Gamestudio Links
Zorro Links
Newest Posts
How to buy tomorrow at open?
by frutza. 06/01/23 19:58
Adding Position to Current Trade
by AndrewAMD. 05/30/23 10:34
Unable to change multiplier of contract
by vicknick. 05/30/23 06:56
Wrong Definition of Sharpe Ratio in Zorro?
by vicknick. 05/29/23 06:32
Backtest strategy on bitcoin/crypto
by JamesHH. 05/26/23 04:36
Return type of floor()
by AndrewAMD. 05/25/23 14:17
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (AndrewAMD), 1,065 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
BInnacle, androsa, XquicksnowX, danishinvest, Trail
18942 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 | 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