r/oculusdev • • Sep 14 '13

Torque 3D Tutorials to Make Rift Games/Experiences

http://www.youtube.com/watch?v=hijACdwfgS8&list=PL79NLbjt3mCj0CNvF8xwXeCXVBz-dwEEB
11 Upvotes

6 comments sorted by

3

u/VMU_kiss Sep 14 '13

If anyone has questions or requests for tutorials let me know I will do my best.

1

u/qster123 Oct 06 '13

Hi!

I've just dived into Torque 3D and so far so good. Do you know anything about getting a character to follow a path, or give it any kind of intelligence?

3

u/VMU_kiss Oct 07 '13 edited Oct 07 '13

Hey so I checked and found a resource that shows how to make a AI player follow a path.

I just tried it and it worked well and it could be killed the only thing that would need to be added to the AI is attacking the player which is available on GarageGames under PatrolAI

But here is how you can try it yourself for now. Go here http://codesampler.com/torque.htm

Download the Bot Path-Finding Zip

Copy the bot.cs to game\scripts\server

Open up scriptExec.cs and add the below line under the exec("./teleporter.cs");
exec("./bot.cs");

Now open up bot.cs

Under function AIPlayer::spawn it has a datablock

Change it to DefaultPlayerData

E.g. dataBlock = DefaultPlayerData;

Now in T3D add a Path from Library > Level > Level

Name it myPath

Where you added a Path from select the Path Node

Name it myMarker0

Then create as many Path Nodes as you want naming them myMarker1, myMarker2, myMarker3 etc

Now drag all the Path Nodes under the Path

Hit Ctrl S to save the level then exit and load it up and now the soldier should be running around your path.

1

u/qster123 Oct 07 '13

dude thanks! I've been looking for good tutorials but couldn't find anything. I'll check this out tonight :)

2

u/VMU_kiss Oct 07 '13

No Problems I hope it's helpful let me know how it works :)

2

u/VMU_kiss Oct 06 '13

What you want is AI for the character.

I haven't had a chance to look at making AI follow a path so I'm not much help for you but you should be able to find some info on the T3D forums over at Garagegames.

When I get some time I will research it and make a video of it for you :)