Jump to content
Sign in to follow this  
doubledizz

Planning mission tasks/scripts; advice requested...

Recommended Posts

Making my 1st detailed CO-OP mission. Up until now I've only used in-editor modules, ALiVE and some scripts I've gotten from here or Armaholic.

After brainstorming an idea, I realised I need to plan this out better, so I know what I need to write.

If you got a moment and are willing, I would appreciate if anyone can "proof" my logic and tell me where I might have trouble or have made a logical error.

Also, if anyone could tell me what kind of level of scripting I'm looking at having to write to be able to pull this off. EG: Advanced stuff, or mostly intermediate or whatever.

Any advice is greatly appreciated.

These are the mission Tasks I plan to use, written in plain english, but with a Conditional statement style. Hoping it will make it easier to learn how to write the scripts....

[table=width: 100%, class: grid, align: left]

[tr]

[td=width: 20%]Mission Tasks[/td]

[td]Script/Module?[/td]

[td]Detail[/td]

[/tr]

[tr]

[td]Return vehicles to depot[/td]

[td]Waypoint; named vehicles; in-editor script[/td]

[td]when all vehicles are empty inside DEPOT marker and player has not entered Report In trigger, then task success, else failed[/td]

[/tr]

[tr]

[td]Report in![/td]

[td]Waypoint; in-editor script[/td]

[td]when all players are in trigger, task success and trigger Mission Briefing[/td]

[/tr]

[tr]

[td]!Mission Briefing*[/td]

[td]Radio chat; add tasks; prompt to view map; show mission intel markers[/td]

[td](orders to assault and secure town from AAF forces) trigger all *mission tasks[/td]

[/tr]

[tr]

[td]*Gear up[/td]

[td][/td]

[td]if all players use Supply Box prior to leaving 'HQ' marker, then task success, else task failed[/td]

[/tr]

[tr]

[td]*Head to Hunter[/td]

[td][/td]

[td]if all players enter Hunter before leaving 'HQ' marker, then task success, else task failed[/td]

[/tr]

[tr]

[td]*Move to Staging Area[/td]

[td][/td]

[td]if all players reach trigger without firing on enemy, then success, else failed[/td]

[/tr]

[tr]

[td]*Advance on Foot to town[/td]

[td][/td]

[td]if all players enter 'TOWN' marker without Hunter, then success, else failed[/td]

[/tr]

[tr]

[td]*Assault and Secure town[/td]

[td][/td]

[td]if all AAF troops !alive in 'TOWN' marker, then success and (wait 45) triggers new mission orders[/td]

[/tr]

[tr]

[td]*Await further orders[/td]

[td][/td]

[td]if all players remained in 'TOWN' marker until new mission orders task, then success, else failed[/td]

[/tr]

[tr]

[td]New mission orders via radio^[/td]

[td]Radio chat; add tasks; prompt to view map; show mission intel markers[/td]

[td](new orders to assassinate HVT at AAF outpost) trigger all ^mission tasks[/td]

[/tr]

[tr]

[td]^Board Hummingbird[/td]

[td][/td]

[td]if all players enter Hummingbird, then success[/td]

[/tr]

[tr]

[td]^Arrive at OP[/td]

[td][/td]

[td]if all players exit Hummingbird at OP, then success[/td]

[/tr]

[tr]

[td]^Recon AO[/td]

[td][/td]

[td]if a player spots all enemy named armor OR artillery destroys named armor before group enters 'AAF_BASE' marker, then success, else failed[/td]

[/tr]

[tr]

[td]^Locate HVT[/td]

[td][/td]

[td]if a player spots HVT prior to entering 'AAF_BASE' marker, then success, else failed[/td]

[/tr]

[tr]

[td]^Call in Artillery[/td]

[td][/td]

[td]if artillery fires rounds inside 'AAF_BASE' marker, then success, else failed[/td]

[/tr]

[tr]

[td]^Confim Kill on HVT#[/td]

[td][/td]

[td]if all AAF troops !alive in 'AAF_BASE' marker, then HQ radio-chat "find HVT quickly" // if player uses action "HVT Kill Confirmed" on !alive HVT within 60 seconds, then success and trigger Locate Intel task, else Radio chat from SL "cannot locate HVT" and remove action from HVT unit and task failed and trigger Locate Intel task[/td]

[/tr]

[tr]

[td]#Locate Intel~[/td]

[td][/td]

[td]if named building is destroyed, then SL radio-chat "negative building destroyed" and task failed and trigger RTB task // if a player enters 'INTEL' marker within 60 seconds, then success and trigger Retrieve Intel task and RTB task, else SL Radio chat "cannot locate Intel" and task failed and trigger RTB task[/td]

[/tr]

[tr]

[td]~Retrieve Intel[/td]

[td]Using laptop intel script from Armaholic[/td]

[td]if a players uses Action "Retrieve Intel" on intel object before leaving 'AAF_BASE' marker, then success, else failed[/td]

[/tr]

[tr]

[td]RTB[/td]

[td][/td]

[td]If all players enter Hummingbird and hummingbird flies to waypoint, then success and mission end[/td]

[/tr]

[/table]

Share this post


Link to post
Share on other sites

I suggest you create 1 waypoint for starters using these links as helpers:

https://community.bistudio.com/wiki/setCurrentWaypoint

https://community.bistudio.com/wiki/addWaypoint

And

https://community.bistudio.com/wiki/setWaypointType

Once you have successfully created your waypoint via code, set them as variables such as:

if (task1a = 1) then
{
task1a = [] execVM "task1a.sqf"; //task1.sqf is the text folder where you put your waypoint code
}
Else
{
task1b = [] execVM "task1b.sqf"; //Much like the above relating to below, you'll obviously know what to do :P
};

task1a.sqf //Create a new text called that and place code below in there for example

_wp =_grp [b]addWaypoint[/b] [[url="https://community.bistudio.com/wiki/position"]position[/url] [url="https://community.bistudio.com/wiki/player"]player[/url], 0];
_grp [b]setCurrentWaypoint[/b] [_grp, 1];
[_grp, 2] [b]setWaypointType[/b] "HOLD";

And there you have it! :D

Btw: I do IPT so thats why i'm good at this. :) (Information Process and Technology)

If you have any further concerns or probs, hit another reply in this thread and I won't be long to reply, cause a lot of people in the forums tend to say "eh, someone will reply but not me so ill skip it" :P

Kind Regards,

Rawner135

Share this post


Link to post
Share on other sites

Thanks very much for the detailed reply.

I was actually hoping to use the Task modules instead of manual scripting, just because it's kind of baby steps into scripting; using the condition and act on fields. I seem to be going pretty well so far. The only issue is making the Waypoint-style HUD markers appear for tasks that are generated by triggers.

EG:

- All CreateTask tasks that are created at the beginning of the mission, show an in-game HUD marker whenever the SetTaskState is triggered to "assigned"

- All CreateTask tasks that are create using triggers during the mission do not have the HUD markers, regardless of if their SetTaskState has been triggered or not.

EDIT: I worked it out. You need to create a trigger that slightly delays the creation of the TaskDestination module to AFTER the create of the CreateTask module. Otherwise it create the TaskDestination module at the beginning of the mission, but with not CreateTask made, well I guess it breaks it all.

I'm going to post my Task testing mission up once I've got a dozen or so different task types. I'll link to it here.

Edited by doubleDizz

Share this post


Link to post
Share on other sites

XML structure would be very useful for management of tasks (names, descriptions, objectives, markers, etc.). BIS should take care of this for Arma 4.

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  

×