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,449 guests, and 6 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
Point towards other entity using skills - is this possible? #292387
10/02/09 18:28
10/02/09 18:28
Joined: Apr 2009
Posts: 141
dakilla Offline OP
Member
dakilla  Offline OP
Member

Joined: Apr 2009
Posts: 141
i have hit a problem, i do not know how to make an entity point to another using just skills.

Here is what the problem is:
vec_set(vector(my.temp_pos_x, my.temp_pos_y, my.temp_pos_z), player_pos.x);
vec_sub(vector(my.temp_pos_x, my.temp_pos_y, my.temp_pos_z), my.x);
vec_to_angle(my.pan, vector(my.temp_pos_x, my.temp_pos_y, my.temp_pos_z));


temp_pos_x and temp_pos_y and temp_pos_z are skills.

When i run this the entity just points upward. is there another way of doing this to make it work?


One day there will be an unfixable bug,
That day is not today.
Re: Point towards other entity using skills - is this possible? [Re: dakilla] #292395
10/02/09 22:16
10/02/09 22:16
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Change things slightly if you need to, but make sure that the "temp_pos"s are in order.
eg. temp_pos_x = skill20, temp_pos_y = skill21, and temp_pos_z = skill22

then use
vec_set(my.temp_pos_x, player_pos.x);
vec_sub(my.temp_pos_x, my.x);
vec_to_angle(my.pan, my.temp_pos_x);
and it should work out....


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Point towards other entity using skills - is this possible? [Re: EvilSOB] #292440
10/03/09 15:44
10/03/09 15:44
Joined: Apr 2009
Posts: 141
dakilla Offline OP
Member
dakilla  Offline OP
Member

Joined: Apr 2009
Posts: 141
ty


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