Skip to content

Commit 736b428

Browse files
authored
Allow to choose sounds in some custom objects (#1920)
* [Reviewed] [Score counter] Allow to choose a sound * [Reviewed] [Dialog box] Allow to choose a sound
1 parent 9b5e020 commit 736b428

File tree

2 files changed

+176
-49
lines changed

2 files changed

+176
-49
lines changed

extensions/reviewed/ScoreCounter.json

Lines changed: 160 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"name": "ScoreCounter",
1010
"previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/48ec8784eacd92181e4a3bde4755962b5f6edf986e624fc85ea423a31408450d_counter.svg",
1111
"shortDescription": "An animated score counter with an icon and a customisable font.",
12-
"version": "1.2.1",
12+
"version": "1.3.0",
1313
"description": [
1414
"An animated score counter with an icon and a customisable font.",
1515
"",
@@ -28,13 +28,7 @@
2828
],
2929
"dependencies": [],
3030
"globalVariables": [],
31-
"sceneVariables": [
32-
{
33-
"name": "RisingPitch",
34-
"type": "number",
35-
"value": 1
36-
}
37-
],
31+
"sceneVariables": [],
3832
"eventsFunctions": [
3933
{
4034
"description": "Check if the events are running for the editor.",
@@ -2949,6 +2943,7 @@
29492943
"ambientLightColorB": 200,
29502944
"ambientLightColorG": 200,
29512945
"ambientLightColorR": 200,
2946+
"camera2DPlaneMaxDrawingDistance": 5000,
29522947
"camera3DFarPlaneDistance": 10000,
29532948
"camera3DFieldOfView": 45,
29542949
"camera3DNearPlaneDistance": 3,
@@ -3141,43 +3136,25 @@
31413136
"events": [
31423137
{
31433138
"type": "BuiltinCommonInstructions::Standard",
3144-
"conditions": [],
3145-
"actions": [
3146-
{
3147-
"type": {
3148-
"value": "SetNumberVariable"
3149-
},
3150-
"parameters": [
3151-
"Score",
3152-
"=",
3153-
"Value"
3154-
]
3155-
},
3139+
"conditions": [
31563140
{
31573141
"type": {
3158-
"value": "ScoreCounter::RollingCounter::SetValue"
3142+
"inverted": true,
3143+
"value": "ScoreCounter::IsInGameEdition"
31593144
},
31603145
"parameters": [
3161-
"Counter",
3162-
"RollingCounter",
3163-
"=",
3164-
"Score",
3146+
"",
31653147
""
31663148
]
3167-
}
3168-
]
3169-
},
3170-
{
3171-
"type": "BuiltinCommonInstructions::Standard",
3172-
"conditions": [
3149+
},
31733150
{
31743151
"type": {
3175-
"inverted": true,
3176-
"value": "ScoreCounter::IsInGameEdition"
3152+
"value": "NumberVariable"
31773153
},
31783154
"parameters": [
3179-
"",
3180-
""
3155+
"Value",
3156+
">",
3157+
"Score"
31813158
]
31823159
}
31833160
],
@@ -3194,19 +3171,18 @@
31943171
"",
31953172
"\"RisingPitch\"",
31963173
">",
3197-
"1"
3174+
"PitchTimeout"
31983175
]
31993176
}
32003177
],
32013178
"actions": [
32023179
{
32033180
"type": {
3204-
"value": "SetNumberVariable"
3181+
"value": "ScoreCounter::ScoreCounter::Function"
32053182
},
32063183
"parameters": [
3207-
"RisingPitch",
3208-
"=",
3209-
"0.8"
3184+
"Object",
3185+
""
32103186
]
32113187
}
32123188
]
@@ -3221,20 +3197,20 @@
32213197
},
32223198
"parameters": [
32233199
"",
3224-
"Collect coin 1.wav",
3200+
"IncreasingScoreSound",
32253201
"no",
32263202
"100",
3227-
"RisingPitch"
3203+
"CurrentPitch"
32283204
]
32293205
},
32303206
{
32313207
"type": {
32323208
"value": "SetNumberVariable"
32333209
},
32343210
"parameters": [
3235-
"RisingPitch",
3211+
"CurrentPitch",
32363212
"*",
3237-
"1.01"
3213+
"PitchFactor"
32383214
]
32393215
},
32403216
{
@@ -3283,6 +3259,95 @@
32833259
]
32843260
}
32853261
]
3262+
},
3263+
{
3264+
"type": "BuiltinCommonInstructions::Standard",
3265+
"conditions": [
3266+
{
3267+
"type": {
3268+
"value": "NumberVariable"
3269+
},
3270+
"parameters": [
3271+
"Value",
3272+
"<",
3273+
"Score"
3274+
]
3275+
}
3276+
],
3277+
"actions": [
3278+
{
3279+
"type": {
3280+
"value": "ScoreCounter::ScoreCounter::Function"
3281+
},
3282+
"parameters": [
3283+
"Object",
3284+
""
3285+
]
3286+
}
3287+
]
3288+
},
3289+
{
3290+
"type": "BuiltinCommonInstructions::Standard",
3291+
"conditions": [],
3292+
"actions": [
3293+
{
3294+
"type": {
3295+
"value": "SetNumberVariable"
3296+
},
3297+
"parameters": [
3298+
"Score",
3299+
"=",
3300+
"Value"
3301+
]
3302+
},
3303+
{
3304+
"type": {
3305+
"value": "ScoreCounter::RollingCounter::SetValue"
3306+
},
3307+
"parameters": [
3308+
"Counter",
3309+
"RollingCounter",
3310+
"=",
3311+
"Score",
3312+
""
3313+
]
3314+
}
3315+
]
3316+
}
3317+
],
3318+
"parameters": [
3319+
{
3320+
"description": "Object",
3321+
"name": "Object",
3322+
"supplementaryInformation": "ScoreCounter::ScoreCounter",
3323+
"type": "object"
3324+
}
3325+
],
3326+
"objectGroups": []
3327+
},
3328+
{
3329+
"description": "Reset the pitch to the baseline value.",
3330+
"fullName": "Reset pitch",
3331+
"functionType": "Action",
3332+
"name": "Function",
3333+
"private": true,
3334+
"sentence": "Reset the pitch of _PARAM0_",
3335+
"events": [
3336+
{
3337+
"type": "BuiltinCommonInstructions::Standard",
3338+
"conditions": [],
3339+
"actions": [
3340+
{
3341+
"type": {
3342+
"value": "SetNumberVariable"
3343+
},
3344+
"parameters": [
3345+
"CurrentPitch",
3346+
"=",
3347+
"RandomFloatInRange(PitchBaselineMin, PitchBaselineMax)"
3348+
]
3349+
}
3350+
]
32863351
}
32873352
],
32883353
"parameters": [
@@ -3305,6 +3370,57 @@
33053370
"description": "Default score",
33063371
"group": "Value",
33073372
"name": "Score"
3373+
},
3374+
{
3375+
"value": "",
3376+
"type": "Resource",
3377+
"label": "Increasing score sound",
3378+
"group": "Sound",
3379+
"extraInformation": [
3380+
"audio"
3381+
],
3382+
"choices": [],
3383+
"name": "IncreasingScoreSound"
3384+
},
3385+
{
3386+
"value": "0.7",
3387+
"type": "Number",
3388+
"label": "Min baseline pitch",
3389+
"group": "Sound",
3390+
"advanced": true,
3391+
"name": "PitchBaselineMin"
3392+
},
3393+
{
3394+
"value": "0.8",
3395+
"type": "Number",
3396+
"label": "Max baseline pitch",
3397+
"group": "Sound",
3398+
"advanced": true,
3399+
"name": "PitchBaselineMax"
3400+
},
3401+
{
3402+
"value": "1.01",
3403+
"type": "Number",
3404+
"label": "Pitch factor",
3405+
"group": "Sound",
3406+
"advanced": true,
3407+
"name": "PitchFactor"
3408+
},
3409+
{
3410+
"value": "1",
3411+
"type": "Number",
3412+
"unit": "Second",
3413+
"label": "Pitch reset timeout",
3414+
"group": "Sound",
3415+
"advanced": true,
3416+
"name": "PitchTimeout"
3417+
},
3418+
{
3419+
"value": "0.8",
3420+
"type": "Number",
3421+
"label": "Current pitch",
3422+
"hidden": true,
3423+
"name": "CurrentPitch"
33083424
}
33093425
]
33103426
}

extensions/reviewed/TwoChoicesDialogBoxes.json

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"name": "TwoChoicesDialogBoxes",
1010
"previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/0842ffc478006e9b6687fca9a5761494c4efd1df873220637af5b4ac7253f850_Interface Elements_interface_ui_window_application_app_button_cta.svg",
1111
"shortDescription": "A dialog box with buttons to let users make a choice.",
12-
"version": "0.3.1",
12+
"version": "0.3.2",
1313
"description": [
1414
"A dialog box showing multiple options (usually \"yes\" and \"no\") and a customizable text message.",
1515
"It handles keyboard, gamepad and touch controls.",
@@ -265,6 +265,7 @@
265265
"ambientLightColorB": 200,
266266
"ambientLightColorG": 200,
267267
"ambientLightColorR": 200,
268+
"camera2DPlaneMaxDrawingDistance": 5000,
268269
"camera3DFarPlaneDistance": 10000,
269270
"camera3DFieldOfView": 45,
270271
"camera3DNearPlaneDistance": 3,
@@ -516,7 +517,7 @@
516517
},
517518
"parameters": [
518519
"",
519-
"HoverSound.wav",
520+
"HoveredSound",
520521
"",
521522
"20",
522523
"RandomFloatInRange(0.8,0.9)"
@@ -612,7 +613,7 @@
612613
},
613614
"parameters": [
614615
"",
615-
"HoverSound.wav",
616+
"HoveredSound",
616617
"",
617618
"20",
618619
"RandomFloatInRange(0.8,0.9)"
@@ -697,7 +698,7 @@
697698
},
698699
"parameters": [
699700
"",
700-
"HoverSound.wav",
701+
"HoveredSound",
701702
"",
702703
"20",
703704
"RandomFloatInRange(0.8,0.9)"
@@ -1392,14 +1393,24 @@
13921393
],
13931394
"hidden": true,
13941395
"name": "_PropertyMapping"
1396+
},
1397+
{
1398+
"value": "",
1399+
"type": "Resource",
1400+
"label": "Sound at hovering",
1401+
"extraInformation": [
1402+
"audio"
1403+
],
1404+
"choices": [],
1405+
"name": "HoveredSound"
13951406
}
13961407
]
13971408
}
13981409
],
13991410
"requiredExtensions": [
14001411
{
14011412
"extensionName": "Gamepads",
1402-
"extensionVersion": "0.9.0"
1413+
"extensionVersion": "0.9.1"
14031414
},
14041415
{
14051416
"extensionName": "PanelSpriteButton",

0 commit comments

Comments
 (0)