Forum Jump :

Author Message


Posts: 1547

Level: Member

Country: us
Location: Atlanta, GA
Occupation: IT
Age: 46
In-game name: kylania

#150246 Posted at 2013-08-22 16:07        
Here's what all that means step by step:

taskhint ["Task Assigned!\nKill the crew!", [1, 1, 1, 1], "taskCurrent"]; 

This pops up the ArmA2 style "new task" on screen message. The [1,1,1,1] means the text is white. The "taskCurrent" is the style of the circle icon, in this case for your currently assigned task. "Task Assigned!\nKill the crew" is the text of the message. The \n is a new line, so it prints out:

Task Assigned!
Kill the crew!

tskKillCrew = player createSimpleTask ["Kill Crew"];

This creates a new task for the player. tskKillCrew is a variable name which we'll use to refer to this task later with commands. "Kill Crew" is the name of the task in your Task list for the player.

tskKillCrew setSimpleTaskDescription ["Kill the crew harassing the priest and steal their UAZ.", "Kill the Crew", "Crew"];

Here we use the tskKillCrew to give that task a description. "Kill the ... their UAZ" is the text for the task. "Kill the Crew" is the title. "Crew" is the text that displays on the waypoint in game world.

tskKillCrew setSimpleTaskDestination (getMarkerPos "crew"); 

Here we set the destination for the task. It will show on the map as a Circle icon and in the 3D world you'll get a waypoint marker saying "Crew" as defined in the previous step. The (getMarkerPos "crew") makes this position the same as the marker named "crew". You could also use:

tskKillCrew setSimpleTaskDestination (getPos someObject); 

to make the position the position of an object instead.


player setCurrentTask tskKillcrew;

This selects the task as the current task for the player so it shows up as current in their task list and they see the destination waypoint.