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.

Dark Physics & Dark A.I. & Dark Dynamix / DarkAI - Pathfinding for players.

Author
Message
Rampage
16
Years of Service
User Offline
Joined: 4th Feb 2008
Location: New Zealand
Posted: 7th Feb 2009 02:20
Hey,
I bought DarkAI like 5 days ago, so I am relatively new to it.
I have already looked in help and such for an answer but have not found it.
OK, so about a week ago I started writing an RPG in DarkBASIC Professional. It is going all well, ran into bugs of course, but nothing I couldn't handle.
Anyway, I thought I would purchase DarkAI, as this would make the whole process of point and click RPG development much easier.
So I purchase DarkAI (along with DarkPHYSICS) and start rewriting elements of my game with DarkAI, using the path finding techniques found in the DarkAI Project folder.
Ok heres the question I need, It appears that I cannot have pathfinding for the "player" for the following reason, "AI Add Player 2" which makes the AI for the object with the ID of 2.
And... "AI Set Entity Speed 2,10.0" don't work with each other. The game crashes, but it does work with AI add neutral, friendly, enemy works fine.
And I know you guys must be thinking, "Why don't you just add make the character a friendly, that way the enemies will still attack you and whatnot." the reason being as the game will heavily depend on the AI follow player command. And stuff like that as my game story that I am re-writing from scatch (made it around 2004, now remaking) really depends on teams, and help etc.

Question 2: How can I make the player play the running animation until he reaches where I have clicked, then stop?

Thank you for the time,
Rampage.
P.S. If you wanna ask me further questions, feel free to ask.



DarkBASIC Professional....Mmmmm the possibilities.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 7th Feb 2009 11:34
have you tried this command with the both object filled in.

AI Add Player Object Number, Use Object


sometime theses command only work if they have both option filled in hence the crashing.

Dark Physics makes any hot drink go cold.
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 7th Feb 2009 13:04
Question 1

Add the player as a friendly. Dont use the AI add player command. then if you want people to follow him use
AI entity move close
or
ai entity move to destination

where the destination is the position of the player.
infact if I were you. I'd add all the AI entities as enemies (even the player and the allys), and then use a separate array within the character type to identify what team they're on, if you use the DarkAI classes then you're limited to 3 groups, good, bad and neutral, but if you use your own you can have as many teams as you want

Question 2

Look in the Entity -> Get commands of the readme. theres one that returns the state,or action, or stance or something, and it'll return whether the guys moving/idle/attacking etc and you can just link an animation to these
Question 2

I want robotic legs.
Rampage
16
Years of Service
User Offline
Joined: 4th Feb 2008
Location: New Zealand
Posted: 8th Feb 2009 02:04
Cool. Thanks guys. Will try out suggestions.


DarkBASIC Professional....Mmmmm the possibilities.
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 8th Feb 2009 20:48 Edited at: 8th Feb 2009 20:49
I agree with Butter's suggestion, although I usually set ally/enemy for their stance against the player, and then separately handle their stance against other entities. If you search around I posted a basic demo for how to add a third team.

Login to post a reply

Server time is: 2024-11-24 19:28:23
Your offset time is: 2024-11-24 19:28:23