You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- pos is the destination of the camera pan event - note that it will start from wherever player screens happen to be just then.
17
+
-- If you want to pan between two positions specifically, you will need one pan event to set up the position (with a fast speed and low holdTime) first.
18
+
-- A speed of 0.05 is about average.
19
+
-- holdTime is the total time this event will go on, whether it reaches its destination at the given speed or not.
20
+
-- notCancellable == true will make the event unskippable, otherwise it can be skipped by pressing any button.
21
+
-- cinematicBars will enable or disable animated cinematic bars for this event.
22
+
-- disableHUDFully will disable all HUD elements, including things like the gold fund counter. However, even with this false, the HUDHandler objective list is disabled.
23
+
-- callback is a function to call when this event ends, in case you want to sync some code up with a camera pan. This will also happen if the event is skipped.
24
+
25
+
-- There is also GetCameraPanEventCount(int team), RemoveCameraPanEvent(int team, string name) and RemoveAllCameraPanEvents(int team) which are self-explanatory.
26
+
27
+
-- Manual cinematic bar operation can happen with HUDHandler:SetCinematicBars(int team, bool toggle, int thickness).
28
+
-- Note that this toggle state WILL be overriden by pan events, but your set thickness is permanent.
29
+
30
+
-- HUDHandler:SetCameraMinimumAndMaximumX(team, minimumX, maximumX) lets you set a minimum and maximum absolute X value for a particular team's players' cameras to go.
31
+
-- Use this to limit view in scripted missions, for example.
32
+
33
+
------- Objectives
34
+
35
+
-- Objectives are rather robust in how they display.
-- Only team and internal name are required for a very basic objective display - the internal name will also be the objective's short name.
41
+
42
+
-- Internal name does not display on the list visually but is just there to keep track of objectives easier in code.
43
+
-- Short name displays when the objective doesn't fulfill the criteria to have its long name displayed, and also on in-game objective arrows if applicable.
44
+
-- objType is currently unused.
45
+
-- Long name is displayed if criteria is fulfilled, alongside the description if applicable.
46
+
-- Objective description is displayed if the objective is first in the list (the primary objective) or has showDescEvenWhenNotFirst set to true.
47
+
-- objPos will enable an in-game arrow and short name display at a position in the world. You can also set an MO here to have the objective follow it.
48
+
-- doNotShowInList will not show this objective in the HUD. Use it for internal objectives that only display in-game arrows, like a bunch of "kill actor" objectives.
49
+
-- showArrowOnlyOnSpectatorView will show the in-game arrow only while a player is in actor select mode, i.e. holding q or e.
50
+
-- showDescEvenWhenNotFirst will override description showing behavior and show this objective's description even if it's not first in the list.
51
+
-- showDescOnlyOnSpectatorView is self-explanatory.
52
+
53
+
-- Instead of an internal name, you can give this function a pre-constructed table. It should contain these keys:
54
+
55
+
-- internalName
56
+
-- shortName
57
+
-- Type
58
+
-- longName
59
+
-- Description
60
+
-- Position
61
+
-- doNotShowInList
62
+
-- showArrowOnlyOnSpectatorView
63
+
-- showDescEvenWhenNotFirst
64
+
-- showDescOnlyOnSpectatorView
65
+
66
+
-- RemoveObjective(team, internalName) to remove an objective. There is also RemoveAllObjectives(team).
67
+
68
+
-- MakeObjectivePrimary(team, internalName) will move an objective to the top of the list, displaying its long name and description if it has any.
69
+
70
+
------- Saving/Loading
71
+
72
+
-- Saving and loading requires you to also have the SaveLoadHandler ready.
73
+
-- Simply run OnSave(instancedSaveLoadHandler) and OnLoad(instancedSaveLoadHandler) when appropriate.
4
74
5
75
--------------------------------------- Misc. Information ---------------------------------------
6
76
@@ -357,6 +427,10 @@ function HUDHandler:UpdateHUDHandler()
0 commit comments