createDiaryLink: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma2 |Game name=
| arma2


|1.00|Game version=
|1.00


|gr1= Briefing |GROUP1=
|gr1= Briefing


| Creates a link to the section of diary given by subject. Record is selected based on given unit/object, diary record or task. |DESCRIPTION=
| Creates a link to the section of diary given by subject. Record is selected based on given unit/object, diary record or task.


| '''createDiaryLink''' [subject, record, text] |SYNTAX=
| '''createDiaryLink''' [subject, record, text]


|p1= [subject, record, text]: [[Array]] - |PARAMETER1=
|p1= [subject, record, text]: [[Array]] -


|p2= subject: [[String]]|PARAMETER2=
|p2= subject: [[String]]


|p3= record: [[Object]], [[Task]] or [[Diary Record]]|PARAMETER3=
|p3= record: [[Object]], [[Task]] or [[Diary Record]]


|p4= text: [[String]] |PARAMETER4=
|p4= text: [[String]]


| [[String]] - empty string <tt>""</tt> or string in <tt>[[format]] ["<log subject<nowiki>=</nowiki>""%1"" record<nowiki>=</nowiki>""%2"">%3</log>", subject, processedRecordId, text]</tt> |RETURNVALUE=
| [[String]] - empty string <tt>""</tt> or string in <tt>[[format]] ["<log subject<nowiki>=</nowiki>""%1"" record<nowiki>=</nowiki>""%2"">%3</log>", subject, processedRecordId, text]</tt>




|x1= <code>_link <nowiki>=</nowiki> [[createDiarySubject]] ["Group", [[player]], "Player"]</code>|EXAMPLE1=
|x1= <code>_link <nowiki>=</nowiki> [[createDiarySubject]] ["Group", [[player]], "Player"]</code>


|x2= <code>diaryRec1 = [[player]] [[createDiaryRecord]] ["diary", ["Record 1", "We can't refer to next record (("]];
|x2= <code>diaryRec1 = [[player]] [[createDiaryRecord]] ["diary", ["Record 1", "We can't refer to next record (("]];
Line 28: Line 28:
diaryRec3 = [[player]] [[createDiaryRecord]] ["diary", ["Record 3", "Go to " + ([[createDiaryLink]] ["Diary", diaryRec2, "record 2"])]];
diaryRec3 = [[player]] [[createDiaryRecord]] ["diary", ["Record 3", "Go to " + ([[createDiaryLink]] ["Diary", diaryRec2, "record 2"])]];
</code>
</code>
|EXAMPLE2=
 


|x3= <code>funcProcessDiaryLink = {
|x3= <code>funcProcessDiaryLink = {
Line 43: Line 43:
]];
]];
</code>
</code>
|EXAMPLE3=






| [[processDiaryLink]], [[createDiaryRecord]], [[createDiarySubject]], [[diarySubjectExists]] [[setDiaryRecordText]] |SEEALSO=
 
| [[processDiaryLink]], [[createDiaryRecord]], [[createDiarySubject]], [[diarySubjectExists]] [[setDiaryRecordText]]


|  |MPBEHAVIOUR=  
|  |MPBEHAVIOUR=  

Revision as of 00:10, 18 January 2021

Hover & click on the images for description

Description

Description:
Creates a link to the section of diary given by subject. Record is selected based on given unit/object, diary record or task.
Groups:
Briefing

Syntax

Syntax:
createDiaryLink [subject, record, text]
Parameters:
[subject, record, text]: Array -
subject: String
record: Object, Task or Diary Record
text: String
Return Value:
String - empty string "" or string in format ["<log subject=""%1"" record=""%2"">%3</log>", subject, processedRecordId, text]

Examples

Example 1:
_link = createDiarySubject ["Group", player, "Player"]
Example 2:
diaryRec1 = player createDiaryRecord ["diary", ["Record 1", "We can't refer to next record (("]]; diaryRec2 = player createDiaryRecord ["diary", ["Record 2", "Go to " + (createDiaryLink ["Diary", diaryRec1, "record 1"])]]; diaryRec3 = player createDiaryRecord ["diary", ["Record 3", "Go to " + (createDiaryLink ["Diary", diaryRec2, "record 2"])]];
Example 3:
funcProcessDiaryLink = { processDiaryLink createDiaryLink ["diary", _this, ""]; }; diaryRec1 = player createDiaryRecord ["diary", ["Record 1", "In this example, we can go to any next record: go to <execute expression='diaryRec2 call funcProcessDiaryLink'>Record 2</execute>" ]]; diaryRec2 = player createDiaryRecord ["diary", ["Record 2", "Go to <execute expression='diaryRec3 call funcProcessDiaryLink'>Record 3</execute>" ]]; diaryRec3 = player createDiaryRecord ["diary", ["Record 3", "Go to <execute expression='diaryRec1 call funcProcessDiaryLink'>Record 1</execute>" ]];

Additional Information

See also:
processDiaryLinkcreateDiaryRecordcreateDiarySubjectdiarySubjectExists setDiaryRecordText

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section