Jump to content
Sign in to follow this  
Blitzen

Looking for some pointers on making big missions...

Recommended Posts

Im back once again for some more advice on OFP mission making! :681:

I was hoping someone could give me some hints as to how successfully make big missions (ie missions that take place over big areas with a lot of units) with little "human help" to the AI. What I'm ultimately trying to achieve is to have a "dynamic" mission where the AI reacts to the player with very little actual waypointing/scripting, etc. from the mission maker (me). What could I do to achieve this? I was hoping for some way to get the AI to call for reinforcements/engage enemy AI units without needing alot of scripting or waypointing. Would using something like the group link script allow me to do this?

If this isnt possible......:o

Then how do most mission makers go about making big missions without cluttering up the mission editor with tons of waypoints? Also, any tips you can give concerning making big missions would be appreciated.

Thanks for the help!

Blitz

Share this post


Link to post
Share on other sites
some way to get the AI to call for reinforcements/engage enemy AI units without needing alot of scripting or waypointing

Just have a bunch of groups on guard waypoints (without using any guard triggers) and they'll automatically move to help other groups. It's very simple, yet effective way to create unpredictable missions.

http://community.bistudio.com/wiki/Waypoint:Guard

Share this post


Link to post
Share on other sites

The OFP version of Dynamic AI Creator can be found here. Fairly easy to learn and sounds like it is exactly what you are looking for.

Share this post


Link to post
Share on other sites
The OFP version of Dynamic AI Creator can be found here. Fairly easy to learn and sounds like it is exactly what you are looking for.

Those look really cool, but both of those links seem to be dead...:(

Share this post


Link to post
Share on other sites

I was hoping that someone could help me out with this problem I'm having. Im trying to get a group of "X" (namely infantry or armor) to get another group or player's waypoint and then move to them. I've been using these two lines of code to try and do this:

1) this domove getpos player

2) {(_X domove getpos player)}foreach units group this

I'm having some problems using these two lines of code. The first is that sometimes only the group leader will move to the waypoint of the player and the rest of the squad stays in place. The other problem is that I want this waypoint to "auto update." What I mean by this is that once this domove getpos player is activated, the AI moves to where the player is/was at the time of activation. If the player moves then there is a possibility that they will miss one another. How can I have this so that the AI group gets the player's position say every 10 seconds or so?

Thanks for the help!! :yay:

Blitz

Share this post


Link to post
Share on other sites
I was hoping that someone could help me out with this problem I'm having. Im trying to get a group of "X" (namely infantry or armor) to get another group or player's waypoint and then move to them. I've been using these two lines of code to try and do this:

1) this domove getpos player

2) {(_X domove getpos player)}foreach units group this

I'm having some problems using these two lines of code. The first is that sometimes only the group leader will move to the waypoint of the player and the rest of the squad stays in place. The other problem is that I want this waypoint to "auto update." What I mean by this is that once this domove getpos player is activated, the AI moves to where the player is/was at the time of activation. If the player moves then there is a possibility that they will miss one another. How can I have this so that the AI group gets the player's position say every 10 seconds or so?

Thanks for the help!! :yay:

Blitz

Hi,

first, to create a WP on the fly (ie to have a whole group moving) you have to use the move command :

name_of_the_group move getpos player

Then, to update this, just a little sqs script :

_group = _this select 0

#delay

~10

_group move getpos player

? count units _group != 0: goto "delay"

exit

Name this script as you want, such as "move.sqs", put it in the mission folder and launch it this way (in the init line of the player for example, or in the init.sqs script if you have one) :

[name_of_group] exec "move.sqs"

Share this post


Link to post
Share on other sites
Hi,

first, to create a WP on the fly (ie to have a whole group moving) you have to use the move command :

name_of_the_group move getpos player

Then, to update this, just a little sqs script :

_group = _this select 0

#delay

~10

_group move getpos player

? count units _group != 0: goto "delay"

exit

Name this script as you want, such as "move.sqs", put it in the mission folder and launch it this way (in the init line of the player for example, or in the init.sqs script if you have one) :

[name_of_group] exec "move.sqs"

That seems really nifty! The sqs file is just the move command with a "goto" function, thereby creating a never-ending loop. My knowledge of scripting and code dosent go much farther than that LOL.

However, if I wanted to change who this group was moving to, I would have to open up the sqs file and edit it everytime. Is there some way to do this within the editor and with out a sqs file? For example I was trying to figure out how to get a Bmp to support a squad and someone posted this:

Give your BMP (I'll call it myBMP1 for this example) and do the same for the leader of the infantry group (mySoldier1) .after the unload waypoin place one MOVE waypoint and one CYCLE waypoint for the BMP. I'm assuming the BMP now has three waypoints total but change the numbering if you've placed more. In the MOVE waypoint's activation field put

[(group BMP),2] setWpPos getpos (leader group mySoldier1) ; [(group BMP),3] setWpPos getpos (leader group mySoldier1)[/Code]

this will constantly tell the BMP to move to the infantry group leader's position. you may have some problems with the BMP running over your soldiers, so try giving the MOVE waypoint a radius of about 50m and also give it a 5-10 second delay for activation

Is there a way I can do something like this? Using a move waypoint and a cycle waypoint to get a group of soldiers to keep updating their waypoints? The thing is, this code dosent seem to work. Any ideas as to how to fix it?

Thanks

Share this post


Link to post
Share on other sites

leader group mySoldier1

try defining the above: in init line of unit: mysoldier1=group this

years ago I wrote a help file within a script. hope this helps...

As the mission designer has the ability to tailor make his unit,marker names - this will make editing additional scripts easier.

Simply create a movement script tie it in with a trigger and then your units should begin to move.

{_x setBehaviour "AWARE"; _x setCombatMode "RED"; _x setSpeedMode "LIMITED"} forEach units wgrp8

{_x doMove getMarkerPos _targtmrkr}forEach units wgrp8

{_x doFollow leader _grpname}forEach wgrp8

If you need to make an array to gain individual movement for each squad member then:

wgrp8a=units wgrp8

Now your group has been added to an array.

wgrp8a select 0 --> Will usually refer to the leader of the group - you may also direct commands to Leader wgrp8

To move all units in a group but the leader --> Usually for doFollow command then do this:

wgrp8b=wgrp8a - [leader wgrp8] --> Now all members except Leader are defined in new array....

To move other units individually:

(wgrp8b select 0) doFollow wgrp8 select 0

(wgrp8b select 1) doFollow Leader wgrp8

In the two examples above note the doFollow targets; they each refer to the same unit.

etc... for the amount of units in group. Remember in scripting that first unit starts with "0" so if you have 8 in group - the last in an array is: wgrp8b select 7

Edited by WW2Weasel

Share this post


Link to post
Share on other sites
Using a move waypoint and a cycle waypoint to get a group of soldiers to keep updating their waypoints? The thing is, this code dosent seem to work. Any ideas as to how to fix it?

Make a group with one waypoint. On the waypoint condition have:

if(this distance player>50)then{[this,1] setWPpos getpos player}; false

The group will now try to stay within 50 meters of the player.

For multiplayer, use leader myGroupName instead of player so it will work on dedicated server, and if the original group leader dies.

Share this post


Link to post
Share on other sites
Make a group with one waypoint. On the waypoint condition have:

if(this distance player>50)then{[this,1] setWPpos getpos player}; false

The group will now try to stay within 50 meters of the player.

For multiplayer, use leader myGroupName instead of player so it will work on dedicated server, and if the original group leader dies.

Just did some testing in the mission editor and it seems to work well, plus its so simple to implement! Thats a big relief for a scripting newbie like me! :bounce3: I do have some questions about it though. First off, how would I change the "this" to leader group "XXX?" Would it look like this:

if(this distance leader group XXX>50)then{[this,1] setWPpos getpos leader group "YYY"}; false

Also, would it be possible to, instead of having a unit go to group "X" or soldier "Y," have the unit move to the closest unit/group of a certain side? Lastly, could I use this same line of code for a guarded by trigger? For example have the guarded by trigger always relocate to the position of the player?

Thanks for the help!! :yay:

Share this post


Link to post
Share on other sites

"this" in wp condition line refers to the group leader the waypoint belongs to. Much like "this" refers to the unit on its init line.

To find the nearest ally to a unit there is no built-in function so you have to make it. Also, there's no array of all units, you have to make that too. I would make a script and use a trigger to get a reference to all units on the map.

Share this post


Link to post
Share on other sites

Hello Blitzen,

I think I know what You are trying to make. I also had the same idea to have bombastic scale battles with somehow realistic order of battle and scenario design.

I must say that I succeeded in making a scenario which gives You that feeling. In Operation Matchball, You command a USMC battlain against a soviet occupation force in Libya. There is artillery support, Tomahawks, aerial insertion, mechanized infantry, Cobra CAS, and enemy artillery observers (which does not work due to some script compatibility issues). It is overwhelming fun to experience multiple of platoons beeing engaged in a in a large scale counter attack at the same time.

Unfortunatly, my timetable did not allow to finish the mission. I introduced some bugs into the first public testing release which I could not correct because of lack of time.

I also had a brigade scale mission in the oven. It did not go too well in terms of game performance, for engine limitations kicked in. In some stages of developement, it was very well playable.

Feel free to have a look at my work.

Edited by wuschel

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×