createDiarySubject: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (informative template → TODO template so we won't forget about it ;))
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *T([a-z ])" to "$1 - t$2")
 
(17 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| arma2
|game1= arma2
|version1= 1.00


|gr1= Briefing
|game2= arma2oa
|version2= 1.50


|1.00
|game3= tkoh
|version3= 1.00


| Create a new [[Diary]] subject page in a log.
|game4= arma3
{{Informative | In Arma 3 the top subject called "Map" but it is a dummy, the 1st subject is Tasks, internal name is also "Tasks" and it is hidden until there are any assigned tasks to show. It cannot be modified directly. Second subject is called "Briefing", but its internal name is "Diary", this can be modified and selected. Next is called "Team", internal name "Units", cannot be modified but can be selected. Next is called "Players" (same internal name) but it is hidden in SP and also cannot be modified. Next is called "Statistics" (same internal name), hidden until there are some statistics to show (kills etc), cannot be modified. Any custom subjects created with [[createDiarySubject]] go at the bottom and can be modified. }}
|version4= 0.50


| person '''createDiarySubject''' [subject, displayName, picture]
|gr1= Briefing


|p1= person: [[Object]]
|eff= local


|p2= [subject, displayName, picture]: [[Array]]
|arg= local


|p3= subject: [[String]]
|descr= Creates a new subject in the [[Diary]].


|p4= displayName: [[String]] - The visible name
|s1= player [[createDiarySubject]] [subject, displayName, picture]


|p5= picture: (optional): [[String]] - icon to display next to the subject (can be set later with [[setDiarySubjectPicture]])
|p1= player: [[Object]]


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


|x1= <code>_index <nowiki>=</nowiki>[[player]] [[createDiarySubject]] ["myPage","My page"];</code>
|p3= displayName: [[String]] - the visible name


| [[removeDiarySubject]], [[processDiaryLink]], [[createDiaryLink]], [[createDiaryRecord]], [[diarySubjectExists]], [[setDiarySubjectPicture]]
|p4= picture: [[String]] - (Optional, default {{hl|""}}) 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


|x1= <sqf>_index = player createDiarySubject ["myPage","My page"];</sqf>


{{GameCategory|arma2|Scripting Commands}}
|seealso= [[removeDiarySubject]] [[processDiaryLink]] [[createDiaryLink]] [[createDiaryRecord]] [[diarySubjectExists]] [[setDiarySubjectPicture]] [[allDiarySubjects]]
{{GameCategory|arma3|Scripting Commands}}
}}
{{GameCategory|tkoh|Scripting Commands}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
 
<!-- CONTINUE Notes -->
<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">
{{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 -->

Latest revision as of 16:50, 8 November 2023

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