Skip to content

Commit e16730b

Browse files
authored
[Reviewed] [Fire bullet] Fix the bullet angle that was set to the firing angle without the variance (#731)
1 parent 0ead562 commit e16730b

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

extensions/reviewed/FireBullet.json

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"name": "FireBullet",
99
"previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/bullet.svg",
1010
"shortDescription": "Fire bullets, manage ammo, reloading, and overheating.",
11-
"version": "0.3.2",
11+
"version": "0.3.3",
1212
"description": [
1313
"This extension allows objects to fire bullets.",
1414
"",
@@ -1153,13 +1153,24 @@
11531153
"type": "BuiltinCommonInstructions::Standard",
11541154
"conditions": [],
11551155
"actions": [
1156+
{
1157+
"type": {
1158+
"value": "FireBullet::FireBullet::SetPropertyRandomizedAngle"
1159+
},
1160+
"parameters": [
1161+
"Object",
1162+
"Behavior",
1163+
"=",
1164+
"GetArgumentAsNumber(\"Angle\") + RandomInRange(-Object.Behavior::PropertyAngleVariance(), Object.Behavior::PropertyAngleVariance())"
1165+
]
1166+
},
11561167
{
11571168
"type": {
11581169
"value": "AddForceAL"
11591170
},
11601171
"parameters": [
11611172
"Bullet",
1162-
"GetArgumentAsNumber(\"Angle\") + RandomInRange(-Object.Behavior::PropertyAngleVariance(), Object.Behavior::PropertyAngleVariance())",
1173+
"Object.Behavior::PropertyRandomizedAngle()",
11631174
"GetArgumentAsNumber(\"Speed\")",
11641175
"1"
11651176
]
@@ -1252,7 +1263,7 @@
12521263
"parameters": [
12531264
"Bullet",
12541265
"=",
1255-
"GetArgumentAsNumber(\"Angle\")"
1266+
"Object.Behavior::PropertyRandomizedAngle()"
12561267
]
12571268
}
12581269
]
@@ -4408,6 +4419,16 @@
44084419
"extraInformation": [],
44094420
"hidden": true,
44104421
"name": "BulletLayer"
4422+
},
4423+
{
4424+
"value": "",
4425+
"type": "Number",
4426+
"label": "",
4427+
"description": "",
4428+
"group": "",
4429+
"extraInformation": [],
4430+
"hidden": true,
4431+
"name": "RandomizedAngle"
44114432
}
44124433
],
44134434
"sharedPropertyDescriptors": []

0 commit comments

Comments
 (0)