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 / Dark AI and moveable objects

Author
Message
Lance
20
Years of Service
User Offline
Joined: 22nd Jul 2003
Location: Third planet from Sun
Posted: 16th Jun 2007 19:25 Edited at: 16th Jun 2007 19:27
I have an enemy AI walking a Path.<Dark AI>

I have several crates((cubes)dynamic)).<Dark Physics>

The crates can be shot at and knocked around.Now they are in the AI path.How can I get the AI to avoid them? Static Obstacle(AI) will not work? ,because they will always fall in different positions.

This is the basic code I am working with

for i = 21 to 31
load object "crate.x",i
scale object i,6,6,6
position object i, -10, y#, 0
y# = y# + 2
phy make rigid body dynamic box i
next i

load object "H-GI-Move.x",33
yrotate object 33, 180
scale object 33, 500,500,500
set object speed 33, 50
loop object 33,5,25
fix object pivot 33

position object 33,0,1,0
AI Add Enemy 33

for I =21 to 31
AI Add static Obstacle i
Next i
AI Complete Obstacles

AI Make Path 2
AI Entity Assign Patrol Path 33,2
AI Path Add Point 2, -25, 0
AI Path Add Point 2,-40,40
AI Set Radius 5
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 18th Jun 2007 12:25 Edited at: 18th Jun 2007 12:25
You will need to locate the data in the memblock, and manipulate it there. There's a tutorial on doing similar memblock stuff but on waypoints:

http://www.thegamecreators.com/data/newsletter/newsletter_issue_43.html

Either that, or use the commands to sidestep obstacles, I can't remember the syntax.

Login to post a reply

Server time is: 2024-04-20 14:40:15
Your offset time is: 2024-04-20 14:40:15