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
0 registered members (), 18,561 guests, and 5 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
ent_faceto/turnto problem #355581
01/28/11 01:04
01/28/11 01:04
Joined: Dec 2010
Posts: 87
R
romin2011 Offline OP
Junior Member
romin2011  Offline OP
Junior Member
R

Joined: Dec 2010
Posts: 87
Hello, i want to turn entities smothly to directions but since iam using a7 i didnt have entmove.c which has functions for that purpose but thanx for YellowAfterlife for sharing his entmove.c with me. But i got some problems using it.
Firs problem u have to use wait_for(ent_turnto) to check if ur entity reache the angle and it stops the whole function camera animations etc till it reaches the angle.
Second i use a7 where proc_status doesnt check staus of a function for given entity as a8 so i cant tell it to only check staus of function only called by me since all enemies will be calling it to turn. Maybe updating proc_staus function will fix but i don't know where it is and if someone shares proc_staus from there a8.
Thank you

Re: ent_faceto/turnto problem [Re: romin2011] #355617
01/28/11 12:32
01/28/11 12:32
Joined: Dec 2010
Posts: 87
R
romin2011 Offline OP
Junior Member
romin2011  Offline OP
Junior Member
R

Joined: Dec 2010
Posts: 87
Come on someone please iam stuck at it. Let me explain again.
Using wait_for which uses proc_status stops the whole fuction animation etc till it reaches the angle. How to make it continue turning to angle while performing animation and c_move etc.
2nd Can someone share proc_staus from there a8 template which is updated.
Hope i could explain

Re: ent_faceto/turnto problem [Re: romin2011] #355759
01/28/11 18:27
01/28/11 18:27
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
while(1) {
...

if(abs(ang(target_pan-my.pan)) > 1) {
my.pan += clamp(ang(target_pan-my.pan),-5,5)*time_step;
}
else {
your entity faces now the desired direction
}
...
wait(1);
}


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: ent_faceto/turnto problem [Re: Superku] #355763
01/28/11 19:06
01/28/11 19:06
Joined: Dec 2010
Posts: 87
R
romin2011 Offline OP
Junior Member
romin2011  Offline OP
Junior Member
R

Joined: Dec 2010
Posts: 87
It doesn't work it trys to face somewhere else?
What iam up to is to when u press space key the player turns to cover while running.
Edit: oh i think it is trying to look where cover entity is looking. Which is why it doesnt work while what i want is to turn to entity it self cover.x for ewample please look at entmove.c for difference between ent_turnto and ent_faceto or the online manual if u have a7.

Last edited by romin2011; 01/28/11 19:14.

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

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