createDiarySubject: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}")
(page formatting)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| arma2
|game1= arma2


|gr1= Briefing
|version1= 1.00
 
|game2= arma2oa
 
|version2= 1.51


|1.00
|game3= tkoh


| Creates a new subject in the [[Diary]].
|version3= 1.00


| person '''createDiarySubject''' [subject, displayName, picture]
|game4= arma3


|p1= person: [[Object]]
|version4= 0.50


|p2= [subject, displayName, picture]: [[Array]]
|gr1= Briefing


|p3= subject: [[String]]
|eff= local


|p4= displayName: [[String]] - The visible name
|descr= Creates a new subject in the [[Diary]].


|p5= picture: (optional): [[String]] - icon to display next to the subject (can be set later with [[setDiarySubjectPicture]])
|s1= player '''createDiarySubject''' [subject, displayName, picture]


| [[Number]]
|p1= player: [[Object]]


|x1= <code>_index <nowiki>=</nowiki>[[player]] [[createDiarySubject]] ["myPage","My page"];</code>
|p2= subject: [[String]]


|seealso= [[removeDiarySubject]], [[processDiaryLink]], [[createDiaryLink]], [[createDiaryRecord]], [[diarySubjectExists]], [[setDiarySubjectPicture]], [[allDiarySubjects]]
|p3= displayName: [[String]] - The visible name
}}
 
|p4= picture: [[String]] - (optional, default {{ic|""}}) Icon to display next to the subject. Can be set later with [[setDiarySubjectPicture]]. Similar to [[lbSetPictureRight]].


|r1= [[Number]] - Index of the entry that was added


{{GameCategory|arma2|Scripting Commands}}
|x1= <code>_index = [[player]] [[createDiarySubject]] ["myPage","My page"];</code>
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]


<!-- CONTINUE Notes -->
|seealso= [[removeDiarySubject]] [[processDiaryLink]] [[createDiaryLink]] [[createDiaryRecord]] [[diarySubjectExists]] [[setDiarySubjectPicture]] [[allDiarySubjects]]
<dl class="command_description">
}}
<dd class="notedate">Posted on June 22, 2019 - 10:11 (UTC)</dd>
<dt class="note">[[User:R3vo|R3vo]]</dt>
<dd class="note">
{{Wiki|todo| Remove this note after 2.03.147165}}
The parameter '''picture''' seems to have no effect in {{arma3}}
<code>player [[createDiarySubject]] ["myPage","My page","\A3\Data_F_Argo\Logos\arma3_argo_artwork.jpg"];</code>
No image is shown.
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 10:24, 4 March 2021

Hover & click on the images for description

Description

Description:
Creates a new subject in the Diary.
Groups:
Briefing

Syntax

Syntax:
player createDiarySubject [subject, displayName, picture]
Parameters:
player: Object
subject: String
displayName: String - The visible name
picture: String - (optional, default "") Icon to display next to the subject. Can be set later with setDiarySubjectPicture. Similar to lbSetPictureRight.
Return Value:
Number - Index of the entry that was added

Examples

Example 1:
_index = player createDiarySubject ["myPage","My page"];

Additional Information

See also:
removeDiarySubject processDiaryLink createDiaryLink createDiaryRecord diarySubjectExists setDiarySubjectPicture allDiarySubjects

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