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S42bC0zLjctMi44Yy0xLjEtMC44LTEuMS0yLjQsMC0zLjJsMy43LTIuOGMwLjUtMC40LDAuOC0xLDAuOC0xLjZWNiIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTksNnY0YzAsMC42LDAuMywxLjIsMC44LDEuNmwzLjcsMi44YzEuMSwwLjgsMS4xLDIuNCwwLDMuMmwtMy43LDIuOEM5LjMsMjAuOCw5LDIxLjQsOSwyMnY0Ii8+DQo8cG9seWdvbiBjbGFzcz0ic3QwIiBwb2ludHM9IjExLDI2IDE2LDIxIDIxLDI2ICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIxNiwxMiAxMywxMCAxOSwxMCAiLz4NCjwvc3ZnPg0K",
8+ "name" : " CountdownTimer" ,
9+ "previewIconUrl" : " https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/UI Essentials/a87576ab3a35744221b26f87e4409ec174fb8fb79435b181232c40c29ac7340e_UI Essentials_sand_clock_time.svg" ,
10+ "shortDescription" : " A timer against the clock to create timer challenges in your projects. Countdown functionality." ,
11+ "version" : " 1.0.0" ,
12+ "description" : " This extension provides a timer against the clock to create timed challenges in your projects. You can set an initial time in seconds and then start the timer to count down. The extension includes actions to start or reset the timer, stop it at zero or allow negative numbers, and get the time remaining on the timer via an expression. With this extension, you will be able to easily add countdown functionality." ,
13+ "tags" : [
14+ " Countdown" ,
15+ " Timer" ,
16+ " Clock" ,
17+ " Time management"
18+ ],
19+ "authorIds" : [
20+ " xesgTnQuyNXPVkGEDLD3Wcr8O4m1"
21+ ],
22+ "dependencies" : [],
23+ "eventsFunctions" : [
24+ {
25+ "description" : " Set the countdown timer in seconds." ,
26+ "fullName" : " Set the countdown of the clock" ,
27+ "functionType" : " Action" ,
28+ "name" : " SetCountdown" ,
29+ "sentence" : " Set the countdown timer to _PARAM2_ seconds from the _PARAM1_ timer" ,
30+ "events" : [
31+ {
32+ "type" : " BuiltinCommonInstructions::Standard" ,
33+ "conditions" : [],
34+ "actions" : [
35+ {
36+ "type" : {
37+ "value" : " ModVarScene"
38+ },
39+ "parameters" : [
40+ " __CountdownTimer.Clocks[GetArgumentAsString(\" ClockName\" )].Time" ,
41+ " =" ,
42+ " GetArgumentAsNumber(\" TimeArg\" )"
43+ ]
44+ },
45+ {
46+ "type" : {
47+ "value" : " ModVarScene"
48+ },
49+ "parameters" : [
50+ " __CountdownTimer.Clocks[GetArgumentAsString(\" ClockName\" )].TimeRestart" ,
51+ " =" ,
52+ " GetArgumentAsNumber(\" TimeArg\" )"
53+ ]
54+ }
55+ ]
56+ }
57+ ],
58+ "parameters" : [
59+ {
60+ "description" : " Clock name" ,
61+ "name" : " ClockName" ,
62+ "type" : " string"
63+ },
64+ {
65+ "description" : " Time remaining in seconds" ,
66+ "name" : " TimeArg" ,
67+ "type" : " expression"
68+ }
69+ ],
70+ "objectGroups" : []
71+ },
72+ {
73+ "description" : " Starts the countdown from the value set previously." ,
74+ "fullName" : " Start countdown timer" ,
75+ "functionType" : " Action" ,
76+ "name" : " StartCountdown" ,
77+ "sentence" : " Start the countdown timer named _PARAM1_, allowing negative numbers (_PARAM2_)" ,
78+ "events" : [
79+ {
80+ "type" : " BuiltinCommonInstructions::Standard" ,
81+ "conditions" : [
82+ {
83+ "type" : {
84+ "value" : " VarScene"
85+ },
86+ "parameters" : [
87+ " __CountdownTimer.Clocks[GetArgumentAsString(\" ClockName\" )].Time" ,
88+ " =" ,
89+ " 0"
90+ ]
91+ },
92+ {
93+ "type" : {
94+ "inverted" : true ,
95+ "value" : " GetArgumentAsBoolean"
96+ },
97+ "parameters" : [
98+ " \" ZeroNumbers\" "
99+ ]
100+ }
101+ ],
102+ "actions" : [
103+ {
104+ "type" : {
105+ "value" : " RemoveTimer"
106+ },
107+ "parameters" : [
108+ " player" ,
109+ " \" __CountdownTimer.Repeat\" "
110+ ]
111+ }
112+ ]
113+ },
114+ {
115+ "type" : " BuiltinCommonInstructions::Standard" ,
116+ "conditions" : [
117+ {
118+ "type" : {
119+ "value" : " Timer"
120+ },
121+ "parameters" : [
122+ " player" ,
123+ " 1" ,
124+ " \" __CountdownTimer.Repeat\" "
125+ ]
126+ }
127+ ],
128+ "actions" : [
129+ {
130+ "type" : {
131+ "value" : " ResetTimer"
132+ },
133+ "parameters" : [
134+ " player" ,
135+ " \" __CountdownTimer.Repeat\" "
136+ ]
137+ },
138+ {
139+ "type" : {
140+ "value" : " ModVarScene"
141+ },
142+ "parameters" : [
143+ " __CountdownTimer.Clocks[GetArgumentAsString(\" ClockName\" )].Time" ,
144+ " -" ,
145+ " 1"
146+ ]
147+ }
148+ ]
149+ }
150+ ],
151+ "parameters" : [
152+ {
153+ "description" : " Clock name" ,
154+ "name" : " ClockName" ,
155+ "type" : " string"
156+ },
157+ {
158+ "description" : " Allow negative numbers" ,
159+ "name" : " ZeroNumbers" ,
160+ "type" : " yesorno"
161+ }
162+ ],
163+ "objectGroups" : []
164+ },
165+ {
166+ "description" : " Reset the countdown to its initial value." ,
167+ "fullName" : " Restar the countdown timer" ,
168+ "functionType" : " Action" ,
169+ "name" : " RestartCountdown" ,
170+ "sentence" : " Reset the countdown timer from _PARAM1_" ,
171+ "events" : [
172+ {
173+ "type" : " BuiltinCommonInstructions::Standard" ,
174+ "conditions" : [],
175+ "actions" : [
176+ {
177+ "type" : {
178+ "value" : " ModVarScene"
179+ },
180+ "parameters" : [
181+ " __CountdownTimer.Clocks[GetArgumentAsString(\" ClockName\" )].Time" ,
182+ " =" ,
183+ " Variable(__CountdownTimer.Clocks[GetArgumentAsString(\" ClockName\" )].TimeRestart)"
184+ ]
185+ }
186+ ]
187+ }
188+ ],
189+ "parameters" : [
190+ {
191+ "description" : " Clock name" ,
192+ "name" : " ClockName" ,
193+ "type" : " string"
194+ }
195+ ],
196+ "objectGroups" : []
197+ },
198+ {
199+ "description" : " Check if the countdown timer has reached a specific time in seconds." ,
200+ "fullName" : " Countdown timer is in x sec" ,
201+ "functionType" : " Condition" ,
202+ "name" : " IsTimerAtTime" ,
203+ "sentence" : " Countdown timer is at _PARAM2_ seconds from _PARAM1_ timer" ,
204+ "events" : [
205+ {
206+ "type" : " BuiltinCommonInstructions::Standard" ,
207+ "conditions" : [
208+ {
209+ "type" : {
210+ "value" : " VarScene"
211+ },
212+ "parameters" : [
213+ " __CountdownTimer.Clocks[GetArgumentAsString(\" ClockName\" )].Time" ,
214+ " =" ,
215+ " GetArgumentAsNumber(\" TimeInSeconds\" )"
216+ ]
217+ }
218+ ],
219+ "actions" : [
220+ {
221+ "type" : {
222+ "value" : " SetReturnBoolean"
223+ },
224+ "parameters" : [
225+ " True"
226+ ]
227+ }
228+ ]
229+ }
230+ ],
231+ "parameters" : [
232+ {
233+ "description" : " Clock name" ,
234+ "name" : " ClockName" ,
235+ "type" : " string"
236+ },
237+ {
238+ "description" : " Time in seconds" ,
239+ "name" : " TimeInSeconds" ,
240+ "type" : " expression"
241+ }
242+ ],
243+ "objectGroups" : []
244+ },
245+ {
246+ "description" : " Check if the countdown timer has reached zero." ,
247+ "fullName" : " The countdown timer has ended" ,
248+ "functionType" : " Condition" ,
249+ "name" : " IsTimerFinished" ,
250+ "sentence" : " The countdown timer _PARAM1_ has finished" ,
251+ "events" : [
252+ {
253+ "type" : " BuiltinCommonInstructions::Standard" ,
254+ "conditions" : [
255+ {
256+ "type" : {
257+ "value" : " VarScene"
258+ },
259+ "parameters" : [
260+ " __CountdownTimer.Clocks[GetArgumentAsString(\" ClockName\" )].Time" ,
261+ " =" ,
262+ " 0"
263+ ]
264+ }
265+ ],
266+ "actions" : [
267+ {
268+ "type" : {
269+ "value" : " SetReturnBoolean"
270+ },
271+ "parameters" : [
272+ " True"
273+ ]
274+ }
275+ ]
276+ }
277+ ],
278+ "parameters" : [
279+ {
280+ "description" : " Clock name" ,
281+ "name" : " ClockName" ,
282+ "type" : " string"
283+ }
284+ ],
285+ "objectGroups" : []
286+ },
287+ {
288+ "description" : " Get the remaining time of the countdown timer." ,
289+ "fullName" : " Get remaining time" ,
290+ "functionType" : " Expression" ,
291+ "name" : " RemainingTime" ,
292+ "sentence" : " Remaining time of the countdown timer" ,
293+ "events" : [
294+ {
295+ "type" : " BuiltinCommonInstructions::Standard" ,
296+ "conditions" : [],
297+ "actions" : [
298+ {
299+ "type" : {
300+ "value" : " SetReturnNumber"
301+ },
302+ "parameters" : [
303+ " Variable(__CountdownTimer.Clocks[GetArgumentAsString(\" ClockName\" )].Time)"
304+ ]
305+ }
306+ ]
307+ }
308+ ],
309+ "expressionType" : {
310+ "type" : " expression"
311+ },
312+ "parameters" : [
313+ {
314+ "description" : " Clock name" ,
315+ "name" : " ClockName" ,
316+ "type" : " string"
317+ }
318+ ],
319+ "objectGroups" : []
320+ },
321+ {
322+ "description" : " Get the initial setting time value of the clock." ,
323+ "fullName" : " Get initial configuration value" ,
324+ "functionType" : " Expression" ,
325+ "name" : " InitialConfigurationValue" ,
326+ "sentence" : " Remaining time of the countdown timer" ,
327+ "events" : [
328+ {
329+ "type" : " BuiltinCommonInstructions::Standard" ,
330+ "conditions" : [],
331+ "actions" : [
332+ {
333+ "type" : {
334+ "value" : " SetReturnNumber"
335+ },
336+ "parameters" : [
337+ " Variable(__CountdownTimer.Clocks[GetArgumentAsString(\" ClockName\" )].TimeRestart)"
338+ ]
339+ }
340+ ]
341+ }
342+ ],
343+ "expressionType" : {
344+ "type" : " expression"
345+ },
346+ "parameters" : [
347+ {
348+ "description" : " Clock name" ,
349+ "name" : " ClockName" ,
350+ "type" : " string"
351+ }
352+ ],
353+ "objectGroups" : []
354+ }
355+ ],
356+ "eventsBasedBehaviors" : [],
357+ "eventsBasedObjects" : []
358+ }
0 commit comments