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
Hockeykid
DBPro Tool Maker
16
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 20th Nov 2009 20:19
Hey guys was looking for a few tips on how to get Dark AI to go up stairs, as far as I know Dark AI only uses X Z ( not y) anyways pretty sure its possible because of FPSC x10. Any tips would be great thanks!

General Jackson
User Banned
Posted: 20th Nov 2009 23:04
Actually stairs dont work in x10 for allies in my experience

Hockeykid
DBPro Tool Maker
16
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 21st Nov 2009 05:47
Quote: "Actually stairs dont work in x10 for allies in my experience"


Actually that brings me back to a demo i played, thats right they don't.

General Jackson
User Banned
Posted: 21st Nov 2009 05:49
I'm sure it must be possible though

Hockeykid
DBPro Tool Maker
16
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 21st Nov 2009 06:03
Quote: "I'm sure it must be possible though"


Yeah it'll be harder not doing it through Dark AI commands but ill get it done.

TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 21st Nov 2009 07:04 Edited at: 21st Nov 2009 07:05
Treat the stairwell as single level using gravity (Y) to keep the AI-controlled entity grounded.

OR

Transfer control to your own solution, using waypoints.

Trapped inside the DGDK Open Source Project.
Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 21st Nov 2009 13:45 Edited at: 21st Nov 2009 13:52
Could try doing it by detecting the AI reaching the base of the stair, like a trigger box. Then when they reach that position set the entity to go to the position at the top of the stairs with the "AI Entity Move Close" command. The Dark Ai automatics is over ridden by continuously setting "AI Entity Move Close EntityID, UpstairsX, UpstairY, UpstairsZ, 0.0" so they will move in a straight path up the stairs (hopefully) until they reach the destination. I use this method so my entity's will pick up power-ups, and if you don't interrupt the move close command with other Ai commands (all non automatic Ai commands cancel out the current) they will happily move in a perfectly straight line over hills and rubble that is not an preassigned Ai obstacle.

When they are on the top stairs they will shoot at enemys on the lower floors trough the floor. Need to reassign the Ai's Zone when they reach the top floor.

Edit: Forgot you have to set the command continuously until the entity reach the destination.

Regards
Scene Commander
Support Manager
15
Years of Service
User Offline
Joined: 3rd May 2008
Location:
Posted: 21st Nov 2009 14:57
You might find the Dark AI demo here useful, it comes with source and show's AI's moving up and down stairs.

http://darkbasicpro.thegamecreators.com/?f=dark_ai
Hockeykid
DBPro Tool Maker
16
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 21st Nov 2009 19:09 Edited at: 21st Nov 2009 21:21
Quote: "Could try doing it by detecting the AI reaching the base of the stair, like a trigger box. Then when they reach that position set the entity to go to the position at the top of the stairs with the "AI Entity Move Close" command. The Dark Ai automatics is over ridden by continuously setting "AI Entity Move Close EntityID, UpstairsX, UpstairY, UpstairsZ, 0.0" so they will move in a straight path up the stairs (hopefully) until they reach the destination. I use this method so my entity's will pick up power-ups, and if you don't interrupt the move close command with other Ai commands (all non automatic Ai commands cancel out the current) they will happily move in a perfectly straight line over hills and rubble that is not an preassigned Ai obstacle.

When they are on the top stairs they will shoot at enemys on the lower floors trough the floor. Need to reassign the Ai's Zone when they reach the top floor.

Edit: Forgot you have to set the command continuously until the entity reach the destination.

Regards"



Sounds pretty easy but I have integrated Dark AI with my FPSC Mod and one of the things I had forgot about before I put out the newest version of my mod (with Dark AI) is the stairs. Now as I said its in FPSC so any way to do it without zones?

EDIT: AI Entity Move Close only uses x and z

Quote: "You might find the Dark AI demo here useful, it comes with source and show's AI's moving up and down stairs.

http://darkbasicpro.thegamecreators.com/?f=dark_ai"


Ill take a look

Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 22nd Nov 2009 03:07 Edited at: 22nd Nov 2009 03:12
Have not looked in to the FPSC source more than check in to it's techniques.
However if you want this functionality you have to rewrite the FPSC code (even more) anyways.
As for zones, if you use the FPSC standards it might be a problem, i would do it by adding named limb emptys to represent the corners of a zone and parse the limb locations on loading the world.

Quote: "EDIT: AI Entity Move Close only uses x and z"

Quite right. It only accepts the horizontal coordinates, the hazards of posting w.o documentation in reach . But the command will move the Entity in "Y" direction as it's forced if you have a proper sliding collision/or character controller set up and the stairs are able to be traversed by the CC, i.e the steps are not to high.
Hockeykid
DBPro Tool Maker
16
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 22nd Nov 2009 03:16
Quote: "Have not looked in to the FPSC source more than check in to it's techniques.
However if you want this functionality you have to rewrite the FPSC code (even more) anyways.
As for zones, if you use the FPSC standards it might be a problem, i would do it by adding named limb emptys to represent the corners of a zone and parse the limb locations on loading the world.
"


FPSC uses the DBP static commands (if that helps) like static volume and static collision.

so maybe something like this???



Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 23rd Nov 2009 13:02
Seems that your code will only tell the entity to go to the same point it is already at. If the "get static collision's" receives the data from "get static collision floor()"? (correct me if i'm wrong, i have not looked in to the static commands much).

Need something like this i guess, and have the variables below filled with relevant coordinates depending on the position of the particular stair the entity is detected to have entered:
"ai entity move close obj, PointOfStairOppositX, PointOfStairOppositZ ,0.0"
And tigger areas on each end of a staircase to detect when an entity has reached the other end. Or a trigger area for the whole stair and detect the Y position and tell the entity to move to the top or bottom of the stair that way when the stair trigger area is enetered.

Not a easy thing to solve this as you need to detect if the entity comes up/down a stair to enter a trigger area or is leaving it. So it just wont turn around and walk up and down a stair indefinitely . Also may need some level re-design to add trigger areas.

Regards
entomophobiac
21
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 23rd Nov 2009 15:24
The fact that DarkAI only uses X and Z values isn't in any way a hindrance. I don't understand how this can be a problem.

Let DarkAI figure everything out, then move the entity to the corresponding Y-position, just as you do for a player. The player (especially in an FPS) is always moving along the X and Z planes, with compensation applied on the Y axis via gravity and collision code. The only time you'd need the AI to pass Y-values would be if you are use more axes of freedom than usual. For a flight simulator, for example.

The DarkAI entity gives you the same kind of feedback as you get from a player controller -- treat them the same and you've probably already solved the issue in your code.

Login to post a reply

Server time is: 2024-04-24 04:27:56
Your offset time is: 2024-04-24 04:27:56