Gamestudio Links
Zorro Links
Newest Posts
blogherenowcenter
by 3s05bmmc. 06/05/24 06:08
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (VoroneTZ, AndrewAMD), 779 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19057 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 | 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