createDiaryLink: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (see also & formate)
Line 21: Line 21:




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


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


|x3= <pre><nowiki>
|x3= <code>
funcProcessDiaryLink = {
funcProcessDiaryLink = {
     processDiaryLink createDiaryLink ["diary", _this, ""];
     [[processDiaryLink]] [[createDiaryLink]] ["diary", _this, ""];
};
};
diaryRec1 = player createDiaryRecord ["diary", ["Record 1",  
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>"
     "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",  
diaryRec2 = [[player]] [[createDiaryRecord]] ["diary", ["Record 2",  
     "Go to <execute expression='diaryRec3 call funcProcessDiaryLink'>Record 3</execute>"
     "Go to <execute expression='diaryRec3 call funcProcessDiaryLink'>Record 3</execute>"
]];
]];
diaryRec3 = player createDiaryRecord ["diary", ["Record 3",  
diaryRec3 = [[player]] [[createDiaryRecord]] ["diary", ["Record 3",  
     "Go to <execute expression='diaryRec1 call funcProcessDiaryLink'>Record 1</execute>"
     "Go to <execute expression='diaryRec1 call funcProcessDiaryLink'>Record 1</execute>"
]];
]];
</nowiki></pre>
</code>
|= EXAMPLE3
|= EXAMPLE3


Line 49: Line 49:
____________________________________________________________________________________________
____________________________________________________________________________________________


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


|  |= MPBEHAVIOUR  
|  |= MPBEHAVIOUR  

Revision as of 13:33, 21 August 2014

Hover & click on the images for description

Description

Description:
Create a link to the section of diary given by subject. Record is selected based on given object (diary record,task or unit).
Groups:
Uncategorised

Syntax

Syntax:
createDiaryLink [subject,object,text]
Parameters:
[subject,object,text]: Array -
Return Value:
String

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", "Got to " + (createDiaryLink ["Diary", diaryRec1, "record 1"])]]; diaryRec3 = player createDiaryRecord ["diary", ["Record 3", "Got 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

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