Last active: Never
Not logged in [Login - Register]
Portal Portal   Search the forums Search   Frequently Asked Questions FAQ   View member list Member List   Staff Staff List   View Topic Activity Topic Activity   Forum Stats Stats   Board Rules Board Rules   Downloads Downloads
Go To Bottom

Printable Version | Subscribe | Add to Favorites  
Author: Subject: Follow me Till Death! Formations in JO, DFx, and DFx2
ShadowZ
Administrator
********

Avatar

Avatar


Posts: 486
Registered: 20-2-09
Location: Texas, U.S.A.
Member Is Offline

Mood: Not enough hours in a day

[*] posted on 10-11-09 at 05:30
Follow me Till Death! Formations in JO, DFx, and DFx2


--Thread under construction--
Introduction
This thread covers scripting Non-Player Characters (more commonly known as AI) into following another AI or player.

This thread will cover AI scripting using the Event Tasker as well as the more advanced WAC scripting.

Getting set up:
    If your going to do any sort of AI scripting, it is best to start out as simple and easy as possible. Thus, we shall use the Delta Force: Xtreme Map Editor Deluxe (DFXMED) in the beginning. As you learn the WAC scripting, you can then use either the MED or Novalogic Interactive Level Editor (NILE) to design your mission, however it must be noted that WAC scripting typically takes longer to hand-code.


Building the Test Map
    First, Open up the MED and create a new mission file (MIS) or open an existing MIS via the File menu option.

      Note: If you are creating a new MIS, go to Edit >> General Information (or Ctrl and I) to access the general options of the map. Fill out the Mission's Name and the Creator's Name with the appropriate values, Select a terrain by clicking the drop-down box, and then press OK. (Don't worry about the other stuff for now).

    Second, place Six AI's, a player spawn marker, Four waypoints, and an Area Trigger

      Tip: To see where you've placed your Area Trigger on the map, be sure to place small objects on each corner of the trigger, such as FX Lights

    Third, select Two of the AI's by first tapping the U key, and then select the two AI's

    Fourth, tap either Enter key to bring up their attributes. Make sure that both AI are on Team Blue, are Blind, and have the waypoint list of 127 - Follow Player.

      Note: This will make the AI follow the player individually and stop at a set distance away. However, they will also tend to run into each other due to lack of environment awareness.

    Fifth, unselect your Two AI, and then select two more. Get them into the same group (We'll use group 3), and then set them to waypoint list 1.

      Note: If you haven't done so already, put your waypoints into list 1 by selecting all of the waypoints, and then set the Waypoint List drop-down box to 1 in your Items Attributes (Enter)

      Tip: Each time you create a new Waypoint List, Area Trigger, or Group, it's a good idea to name them by going into the Edit drop-down menu, and then clicking on the respective selection


    Sixth, create a new event, with an IF statement of "SSN 10000 is in Area 1"and a THEN statement of "Redirect SSN # to nearest waypoint in list 1."

    Lastly, Save and Export your map. to watch the AI's behavior


Observe, and Modify
    What you have just done is create a simple map with a few AI that will carry out their two movement types: Follow an SSN (The player), or Follow a Waypoint List.

    For those of you who are wondering, yes, it is possible to create a formation of AI, but you must do massive scripting in order to make it come out right.

    The easiest formation to make is that of Column, or a line in which the leader is in the front, and the units follow right behind him.

      For column type formations, you make the leader of the formation follow the waypoint route, and daisy-chain each of the followers to follow the guy in font of them. You can do this in the Events by Redirecting each unit to waypoint "125 - Goto SSN Any" and select the unit they will be following. In WAC, you would use the ssn2ssn command.

        Tip: It is highly suggested that you use the WAC for formations and general movement of AI. Try to keep the Event Tasker for Player-initiated events and the WAC for AI movement/behavior

        Note: if you are making a column formation using vehicles, you can't use the "Follow the guy in front of me" method, you have to make them follow the same waypoint list. Make an event or WAC script that tells the formation to slow down and stop when the Leader reaches the end of waypoint list.

        Tip: To make vehicles realistically slow down before reaching the end of the waypoint list, make one of the waypoints to be near the Stop point, and make them slow down once they reach the "slow-down" point. For formations, you make the entire formation slow down (If you do not slow down the entire formation, they will crash into each other.)


      Line-Abreast, Finger-Four, and Echelon type formations require that each unit of the formation follows their own waypoint. Synchronization of these formations requires scripting that makes the quicker units slow down or stop to wait for the slower units, or make the slower units to speed up.

        For these tips of formations, you use the If statement of "SSN has reached Waypoint" to make sure your followers are on the same track. If you want your followers to continue on once the leader has died, you place an "OR" statement for each of the followers.
          Example:
          IF
          SSN 0 Reaches Waypoint 1 - 0 OR
          SSN 1 Reaches Waypoint 2 - 0 OR
          SSN 2 Reaches Waypoint 3 - 0

          THEN
          Redirect SSN 1 to Waypoint 2 - 1 AND
          Redirect SSN 2 to Waypoint 3 - 1 AND
          Redirect SSN 3 to Waypoint 4 - 1

          Tip: In the Event Trigger dialog, there is a tool group at the bottom of the dialog window called "Logic," This will daisy-chain the triggers and initiate the actions for the event depending on the logic.
            AND - Will initiate action if this trigger AND the next are triggered
            OR - Will initiate action if this trigger OR the next is triggered, but will not take action if both are triggered
            XOR- Will initiate action if this trigger, XOR the next is triggered, Will take action if either are triggered.


          Note: You unfortunately can't make the Players as the Formation leader in these types of formations, only as followers.


      Assault Tips
      If you are making a formation that will attack another formation, such as a Tank column attacking a convoy, you can script the attackers to run the same waypoint list as the victim.

      If you are making a convoy of different types of vehicles, you may also want to make sure they have the same AI Text file because each vehicle has their own default Patrol (Normal) and Combat (Alerted) speeds.

        Tip:To change an AI or Vehicle's AI Text file, simply look for the "AI Text File" drop-down box in the Items Attributes dialog.




References
Jo_Kyle Wac Text




Time is not my enemy, although we do have many disagreements...


http://www.dfreload.com/shadowz/SGMod/SGSig.jpg http://www.dfreload.com/shadowz/MarkSigR.gif
View user's profile View All Posts By User U2U Member
ShadowZ
Administrator
********

Avatar

Avatar


Posts: 486
Registered: 20-2-09
Location: Texas, U.S.A.
Member Is Offline

Mood: Not enough hours in a day

[*] posted on 11-11-09 at 08:22


Bump. :)



Time is not my enemy, although we do have many disagreements...


http://www.dfreload.com/shadowz/SGMod/SGSig.jpg http://www.dfreload.com/shadowz/MarkSigR.gif
View user's profile View All Posts By User U2U Member
bahaa
Private


Avatar

Avatar


Posts: 32
Registered: 1-11-09
Member Is Offline


[*] posted on 11-11-09 at 15:55


can i have a sample mis file for what you explained please please please please please please please i will super thankfull if you do this it will be so kind of you !!!
View user's profile View All Posts By User U2U Member
bahaa
Private


Avatar

Avatar


Posts: 32
Registered: 1-11-09
Member Is Offline


[*] posted on 11-11-09 at 15:59


i am using joint operation combined arams and ICE mod so can you make the sample msi file compatable for ICE mod and can you make it as tanks plaese please please
View user's profile View All Posts By User U2U Member
ShadowZ
Administrator
********

Avatar

Avatar


Posts: 486
Registered: 20-2-09
Location: Texas, U.S.A.
Member Is Offline

Mood: Not enough hours in a day

[*] posted on 11-11-09 at 16:10


I don't have Jo... Sorry.

However, I plan to get some screen shots hopefully tomorrow so you can see the process.




Time is not my enemy, although we do have many disagreements...


http://www.dfreload.com/shadowz/SGMod/SGSig.jpg http://www.dfreload.com/shadowz/MarkSigR.gif
View user's profile View All Posts By User U2U Member
Eagle_Eye
Owner/Admin
*********

Avatar

Avatar


Posts: 2089
Registered: 2-4-06
Location: Adelaide. South Australia
Member Is Offline

Mood: Grey, not stupid!

[*] posted on 12-11-09 at 09:43


Quote:
Originally posted by ShadowZ

Sixth, create a new event, with an IF statement of "SSN 10000 is in Area 1"and a THEN statement of "Redirect SSN # to nearest waypoint in list 1."



Please be aware that using "SSN 10000" as a trigger will only work in Single Player", unless you happen to be the first player on a server, but, if the first player leaves, your screwed...

EE




View user's profile Visit user's homepage View All Posts By User U2U Member This user has MSN Messenger
ShadowZ
Administrator
********

Avatar

Avatar


Posts: 486
Registered: 20-2-09
Location: Texas, U.S.A.
Member Is Offline

Mood: Not enough hours in a day

[*] posted on 12-11-09 at 09:58


Hmm, yes... I think in that case you would instead use "'Group 1' - Blue Players is in Area 1?"



Time is not my enemy, although we do have many disagreements...


http://www.dfreload.com/shadowz/SGMod/SGSig.jpg http://www.dfreload.com/shadowz/MarkSigR.gif
View user's profile View All Posts By User U2U Member
ShadowZ
Administrator
********

Avatar

Avatar


Posts: 486
Registered: 20-2-09
Location: Texas, U.S.A.
Member Is Offline

Mood: Not enough hours in a day

[*] posted on 17-11-09 at 16:28


Haven't forgotten about this post!

Have many things to do... and not enough time and/or energy to do all of them at once. ;)




Time is not my enemy, although we do have many disagreements...


http://www.dfreload.com/shadowz/SGMod/SGSig.jpg http://www.dfreload.com/shadowz/MarkSigR.gif
View user's profile View All Posts By User U2U Member

  Go To Top





Powered by XMB
Developed By The XMB Group © 2001-2008