Gamestudio Links
Zorro Links
Newest Posts
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
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, Kingware, AemStones, RealSerious3D), 1,388 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 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 | 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