Jump to content

Creating Patrol Paths and Zones


Chiblue
 Share

Recommended Posts

I am working with an AI engine in LE, and would like to use the editor to build additional AI controls...

 

Firstly let me add I am not very experienced in editor, I can create basic object with properties and a GMF model, but this is were my experience stops..

 

I have built AI spawn markers that allow me to set the basic characteristics of the AI player, i.e. Team, aggresive, search, roam, attack, runaway... normal FSM functions... and have built a reasonable implementation of these within my project...

 

The bigger issue I have is that I would like to create additional AI constrain objects, like zones and paths for patrols...

 

The zones I would like to create a basic plane or box that I can position and size to contain the zone position I want... My problem with this is I can get a gmf file to represent my zone, but I cannot size it...

 

The path object is more complex and I do not know were to start, I basically want to create a new path and link it to a AI spawn object, I may need a special object like AI spawn path (or something like that.), this would represent the origin, then I want to place markers that represent the path for the AI entity, then at each point I want to define behaviour, like look around, wait for some event etc... most fo this I can deal with but I would like to have the markers show linked in the editor and this is were I am struggling, what I woudl like to have is something similar to the line that visibly shows the nodes of the road linked...

 

Can anyone offer any suggestions or point me to code that does this, I looked at the road lua and I am more confused by this than I get answers.. ;)

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

The zones I would like to create a basic plane or box that I can position and size to contain the zone position I want... My problem with this is I can get a gmf file to represent my zone, but I cannot size it...

 

Create the plane in code. What I do with this is create a plane in the lua file. Then in the update method I have the the plane follor the position of the object.model.

Link to comment
Share on other sites

Create the plane in code. What I do with this is create a plane in the lua file. Then in the update method I have the the plane follor the position of the object.model.

 

I tried that but apart from using the scale option I could not change it, is there a way to add handles on each corner that I can drag?

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

No, the way to do this would be primitive. Create a Vec2 property for the x & z scale values. When that property is updated set the scale on the plane. You probably could set it up to allow scaling with the mouse but you would have to program the mouse picking and movement. That's a good point though and is actually getting me thinking right now. In the Update() method you could check the mouse pick and if it's down over the plane, based on the movement of the mouse you could scale it that way. I'd just use the property because it's easier, but it would just take a few settings of it to get it the right size, but it would be the fastest way to do it.

Link to comment
Share on other sites

I am working with an AI engine in LE, and would like to use the editor to build additional AI controls...

did you manage to get the Dark Basic AI Lib working in some form or another with Leadwerks then, I know you asked about that in one of your early posts?

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

did you manage to get the Dark Basic AI Lib working in some form or another with Leadwerks then, I know you asked about that in one of your early posts?

 

Yes that is what I am using, downside is you have some overhead, becuase you have to have Dark GDK libs available to compile even though you are not referencing them... I have all functions working including getting the AI responses to control my AI Body controller entities... seems to be working pretty well...

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

did you manage to get the Dark Basic AI Lib working in some form or another with Leadwerks then, I know you asked about that in one of your early posts?

 

Yes that is what I am using, downside is you have some overhead, becuase you have to have Dark GDK libs available to compile even though you are not referencing them... I have all functions working including getting the AI responses to control my AI Body controller entities... seems to be working pretty well...

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

Excellent!!! I wasn't at all convinced when I had a brief look at it that it was doable. I'll be interested to see the results once you have something to demo

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...