Gamestudio Links
Zorro Links
Newest Posts
What are you working on?
by rayp. 11/02/26 13:57
No connection to MT4
by JeyKey II. 10/29/26 09:34
Zorro plugin for Hyperliquid.xyz
by opm. 10/28/26 13:50
Icon "OP"
by JeyKey II. 10/27/26 07:03
ZorroGPT
by TipmyPip. 10/26/26 08:09
Chat Room for Zorro Programmers
by Haitao_Ren. 10/25/26 03:14
Trading Journey
by Haitao_Ren. 10/25/26 03:14
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (VoroneTZ, 2 invisible), 17,871 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
MaliceTheMaker, Haitao_Ren, JimSimons, julienp, julienper
19248 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