Thursday, November 4, 2010

Research on 3 nodes

1. Spawn Particle Entity

Spawns a chosen particle it the spelling is spelt correctly from the Database view folder.

1. Go to Database folder - particles

2. Chose what type of particles you want

3. Drag into the environment

4. Adjust settings to your liking


2. Move Entity to

"Using a Time:Delay and the Start module to trigger the Random modules we're generating two random numbers every 5 seconds. This are then used to set X and Y coordinated in the Vec3:ToVec3 module. Z is fixed here to keep it a certain distance in the air. This changes the "pos" input on the Entity:EntityPos module to move the selected entity. The random modules have limits (in this cae -1000 to 1000) which is used here to define the region within which the entity will move. This example is changing an AI tag point with interesting results :) There is a spurious module in this example: the Logic:Gate module is not needed and can be removed. "

Source: http://wiki.crymod.com/index.php/Random_Entity_Movement

3. AI Follow Path Speed Stance

Tutorial:

First things first, get your desired AI onto your map! To do so you need to load the library up for that certain AI. Simply do the following: View > Open View Pane > Database View

1zphba1.png

Go into database view and you will be shown the following screen:

jjy4cx.png

This is the database view, you can upload all sorts of stuff, from particles, to Music, to anything really (Well not everything)! For this case though, we will only upload an Entity, which is what you are already on by default when you open up the Database View. Now click the file button to open up the library. This is where to open it:

op3c5g.jpg

You will then be greeted with the open file dialogue screen, and along with it, some .xml files:

zo7x1w.png

Now you just have to select the Asian_New.xml (It is highlighted in the screenshot above) and click Open. And that's it! We've done with uploading the North Korean soldiers library, now just exit the Database View and do the following:

Go onto the Rollup Bar and then Click on the Button 'Archetype Entity' (Make sure the first tab is selected to view this part of the rollup bar):

2cwtssz.png

Once you've clicked the button, you will see a file called "Asian_new". Click the folder and then more folders will show up, choose any of the folders you wish to (I chose Camper/Camp). Then files will be shown. These files are all entities (Or the North Korean enemies) available. Choose any you wish (I chose the "Heavy_Pistol"). Simply drag the entity into the game from the Rollup Bar, and then you should see that entity on your map!

PROTIP: Use the "Follow Terrain and Snap to Objects" button (f03nkj.png) to make your character stay on the terrain, so the character doesn't go under the terrain or all over the place!

Your Final outcome should be this:

2wgyywj.png

Now it's time to set the AI Path!


Setting the AI Path:

Now lets set up the path for which the AI needs to follow. Firstly:

Click the "AI" button which is next the same button you used to upload your entity to the map:

vyuoop.png

Then click on "AI Path" (As highlighted). Now double click and go back onto the viewport. You should see something like this:

1264d1x.png

This is the XYZ cursor (Or whatever it's called) used when selecting objects or entities. Now that's on the map, we need to make the path. Left-click and drag. You will then see a coloured line (View screenshot below):

70yjw6.png

This line represents the path. Let go and you've just made your first path. You can keep going by placing it all over the map (A cube will be placed at each line showcasing that's where you've stopped the first time. This can also indicate that's where the path changes direction).

2s9al4h.png

Once you're done, double or triple click (if applicable) to finish making the path. Now all that's needed to do is to edit the properties.

Click on your path and on the Rollup Bar, scroll down (If necessary), and you will come across alot of settings:

iwpsw0.png

At this point, nothing matters in the settings. All you have to do is uncheck the "Road" settings to False (It's the very first checkbox). That's it! You've done with setting up the path. Now let's get the Flowgraph set up!


Setting up the Flowgraph:

To locate the Flowgraph editor, go to View > View Open Pane > Flow Graph

2csi1cz.png

You should the be greeted with a window. This is the flow graph editor, in all it's glory. On the top of that windows, Do the following: File > New The will then make a new file up so you can do all of your flow graph work on. Now let's set up the required nodes for all of this to work.

First of all, locate the Start node (Right Click and then go onto Add Node > Misc > Start) and then the AIFollowPathSpeedStance Node (Right click and then go onto Add Node > AI > AIFollowPathSpeedStance). You should have these flowgraph nodes:

2vvowpe.png

Click on the AIFollowPathSpeedStance node and you will be greeted with some settings to change. We only need to change 1 setting:

Path_name: (Change this to AIPath1)

Now where it says "Choose Entity" (highligted red on that specific node), you must go back and select the AI you placed in the level. Simply go back into the viewport (WITHOUT CLOSING THE FLOWGRAPH EDITOR), select the AI, and return back to the editor. Right click on "Choose Entity" and choose the option "Assign Selected Entity". It should then turn into a green coloured bar, indicating you've assigned your entity.

Now all you have to do is connect the Start Node's Output to the AIFollowPathSpeed Stance Sync. The image below is what you should do:

2gtbtk4.png

Click on the Output of the Start Node and drag. You should see a light blue arrow. Connect it to the Sync of the AIPathFollowSpeedStance node. This will then connect both nodes. We have now done the flowgraph part, which is the last thing to do! All you have to do now is to save the flowgraph (Save it in the same file as your map).

Source: http://wiki.crymod.com/index.php/Make_AI_follow_a_certain_path

No comments:

Post a Comment