Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, The_Judge, Grant), 898 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Object looking to the Player #300808
12/05/09 14:09
12/05/09 14:09
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
Hey

sorry for that simple question but I don't kno it and can't fin it anywhere. I want that an object look alwasy to my ball(player)....How do I do that? o.O Sorry, I searched a while but I didn't know what to search(look to player, object player look,...)

Thanks


"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: Object looking to the Player [Re: Liamissimo] #300813
12/05/09 14:39
12/05/09 14:39
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
you need to look at AUM for such question. try to use something like:
Code:
vec_set(temp,your.x);
vec_sub(temp,my.x);
vec_to_angle(my.pan,temp);


regards

Re: Object looking to the Player [Re: Lion_Ts] #300814
12/05/09 14:54
12/05/09 14:54
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
thnaks, I'll search for it
But It would be super if someone has a good short coed for it, because searchign 80 aums isn't that easy if you don't know exactly what you are searching laugh

Last edited by TheLiam; 12/05/09 14:57.

"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: Object looking to the Player [Re: Liamissimo] #300815
12/05/09 15:02
12/05/09 15:02
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
it's also written in the manual

Re: Object looking to the Player [Re: Rei_Ayanami] #300817
12/05/09 15:26
12/05/09 15:26
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
TheLiam, reading the AUM, trying workshops and looking into sources is the better way to learn it (sometimes even faster than waiting for reply here) laugh
The short snippet above should work; include it into an object's action, surround with endless while loop (don't forget about wait op) and replace YOU pointer with PLAYER pointer if you don't use events to activate the action.

Re: Object looking to the Player [Re: Lion_Ts] #300818
12/05/09 15:34
12/05/09 15:34
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
Okay, great, i'll try it. Yeah, normally I do that like this but in this case I dind't now what I was searching wink

PS: Thanks, works perfectly and also found it in the Manual. SOrry for the question and thanks for the great help

Last edited by TheLiam; 12/05/09 16:20.

"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: Object looking to the Player [Re: Liamissimo] #300828
12/05/09 17:29
12/05/09 17:29
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
you're welcome laugh

Re: Object looking to the Player [Re: Lion_Ts] #300895
12/06/09 17:33
12/06/09 17:33
Joined: Oct 2009
Posts: 90
WickWoody Offline
Junior Member
WickWoody  Offline
Junior Member

Joined: Oct 2009
Posts: 90
You can use this code:
Code:
vec_set(temp2, player.x); 
	vec_sub(temp2,my.x); 
	vec_to_angle(my.pan, temp2);
	my.tilt = 0;




Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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