Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
mouness
16
Years of Service
User Offline
Joined: 21st Mar 2008
Location:
Posted: 29th Apr 2008 17:09 Edited at: 29th Apr 2008 17:23
Hi all..
i loaded object,then i added it to AI Enemy and i set AISetEntityCanStrafe ( i,1); true. so when i move beside object"enemy" he will strafe left,right and backward.but how i can apply dbLoopObject to the object for example when enemy strafe right then load right movment animation ,when enemy strafe Left then load left movment animation
for example dbloopobject(i,1012,1031);

please help me
bergice
16
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 29th Apr 2008 17:32
Ai get entity action$() and other "get" commands.
mouness
16
Years of Service
User Offline
Joined: 21st Mar 2008
Location:
Posted: 29th Apr 2008 17:57 Edited at: 29th Apr 2008 17:58
ok when i got object action or state how i can use these actions with animation "dbloopobject"?
bergice
16
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 30th Apr 2008 00:40
I dont know if i got you right now but it should be something like this:





Honestly, i have not entered the world of animation that much yet.
But if i got you right that is what you would do.
bergice
16
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 30th Apr 2008 00:42
And of course you would have to create the animations and set them up
mouness
16
Years of Service
User Offline
Joined: 21st Mar 2008
Location:
Posted: 30th Apr 2008 05:45 Edited at: 30th Apr 2008 06:27
Thanks bergice for helping.i do like what are you say but doesnt work also i dont know whats the problem


and you are right.
Quote: "This command gets a string description of the entity's current action, such as moving or attacking. This will tell you in which direction the entity is moving and if it is currently in an attack state. If an entity is attacking it may be shooting, if it is not attacking it will not be shooting. This can be used to set the entity's animation to an appropriate walking direction, or you can use AI Get Entity Move X( ) / AIGetEntityMoveX( ) and AI Get Entity Move Z( ) / AIGetEntityMoveZ( ) to calculate this yourself.

The possible returned values are: stopped, moving forwards, moving backwards, strafing left, strafing right, stopped and attacking, moving forwards and attacking, strafing left and attacking, strafing right and attacking."


}
this is link of my small project
Click here
mouness
16
Years of Service
User Offline
Joined: 21st Mar 2008
Location:
Posted: 30th Apr 2008 12:40 Edited at: 30th Apr 2008 15:02
ok i noted that when i use AIGetEntityState and write this code

its work good but in dark ai help information it Written "Run And Attack" noted A is capital letter.its wrong .it should be small letter.
Quote: "AIGetEntityState
Description
This command gets a string description of the current state which is controlling the entity. In automatic mode the entity is controlled by a finite state machine which contains a set of states each with a different behaviour. An entity switches states depending on its surroundings for example the 'attack' state is used when the entity spots a target. This command can be useful to see why an entity is doing what it is doing.

The states that can be returned are:
Manual ? The entity is under manual control and will not do anything itself.
Idle ? The entity has nothing to do and will return to its idle position.
Patrol ? The entity will patrol its patrol path.
Go To Destination ? The entity will move to its destination.
Investigate ? The entity has detected something (e.g. a sound) and will investigate it.
Attack ? The entity has spotted a target and will attempt to attack it.
Run And Attack ? The entity has spotted a target and will move towards it.
Strafe And Attack ? The entity has spotted a target and is moving sideways.
Defend ? The entity is will return to its defend area.
Search Area ? The entity will check a possible path a target could have taken.
Wait In Cover ? The entity will duck behind available cover and wait to pop up and shoot."


ok but when i use

not worke .is there problem in "Strafing Left And Attacking" letters
could any one tell me right letters.please help me.
RedFlames
16
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 30th Apr 2008 18:21
i dont know anything about DGDK but i'd use

and for the other States/actions too...

maybe that helps?

mouness
16
Years of Service
User Offline
Joined: 21st Mar 2008
Location:
Posted: 30th Apr 2008 19:20 Edited at: 30th Apr 2008 20:07
thanks RedFlames for trying help me.but the problem not in upper or lower case but the letters(string) in double quotations "" should be exactly in function return letters(string) to do animation. for example in the picture that i attach it. we see the function return "Moving Forward And Attacking".i write this function return(string) in this code

but didnt do any thing however its work with

.why???

http://www.nvidia.com/docs/TEMPLATE/482/nv_logo_footer.gif

Attachments

Login to view attachments
bergice
16
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 30th Apr 2008 20:46


I dont have dark GDK, but i think there is where your problem lies.
I dont have time to look at it so good right now but make sure you dont set an animation to play from the start all the time
mouness
16
Years of Service
User Offline
Joined: 21st Mar 2008
Location:
Posted: 30th Apr 2008 20:56 Edited at: 30th Apr 2008 21:04
ok i dont know where is the problem i do all Prospects and set every animation have own frames.

http://www.nvidia.com/docs/TEMPLATE/482/nv_logo_footer.gif
bergice
16
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 30th Apr 2008 20:56
Quote: "Stopped
Moving Forwards
Moving Backwards
Strafing Left
Strafing Right
Stopped And Attacking
Moving Forwards And Attacking
Moving Backwards And Attacking
Strafing Left And Attacking
Strafing Right And Attacking"


These are the possible return strings.
Just copy and paste to make sure they are correct
mouness
16
Years of Service
User Offline
Joined: 21st Mar 2008
Location:
Posted: 30th Apr 2008 21:15 Edited at: 30th Apr 2008 21:18
iam afraid form dark ai contain bug in this function returns.i dont know
this is all my code



http://www.nvidia.com/docs/TEMPLATE/482/nv_logo_footer.gif
bergice
16
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 30th Apr 2008 21:27


^---- an example i made
bergice
16
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 30th Apr 2008 22:03
Ok, i gotta go very soon now but i will post my results.
I made a test which i have included.

The objects do fine, unless when they do the "Strafing (left/right)"

They work ok also if the Strafe and attack.

File included, take a look:

Attachments

Login to view attachments
mouness
16
Years of Service
User Offline
Joined: 21st Mar 2008
Location:
Posted: 1st May 2008 14:06
very thanks bergice.i fixed the problem

http://www.nvidia.com/docs/TEMPLATE/482/nv_logo_footer.gif
mouness
16
Years of Service
User Offline
Joined: 21st Mar 2008
Location:
Posted: 1st May 2008 15:03
And this is the final code. i use string header to make Comparisons.



http://www.nvidia.com/docs/TEMPLATE/482/nv_logo_footer.gif
bergice
16
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 1st May 2008 16:10
No problems.

I learned from this too


Login to post a reply

Server time is: 2024-05-19 19:59:21
Your offset time is: 2024-05-19 19:59:21