|
8 | 8 | "name": "FireBullet", |
9 | 9 | "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/bullet.svg", |
10 | 10 | "shortDescription": "Fire bullets, manage ammo, reloading, and overheating.", |
11 | | - "version": "0.3.3", |
| 11 | + "version": "0.4.1", |
12 | 12 | "description": [ |
13 | | - "This extension allows objects to fire bullets.", |
| 13 | + "Fire bullets, manage ammo, reloading, and overheating.", |
14 | 14 | "", |
15 | | - "It handles:", |
16 | | - "- cooldown between shots", |
17 | | - "- firing multiple bullets at a time", |
18 | | - "- ammo management", |
19 | | - "- overheat", |
| 15 | + "Firing bullets:", |
| 16 | + "- Cooldown: Time between shots (seconds)", |
| 17 | + "- Bullet Quantity: Number of bullets created each time Fire Bullet action is used. ", |
| 18 | + "- Firing Arc: Range of angles (in degrees) that bullets will shoot. Bullets are evenly spread within this range.", |
| 19 | + "- Rotate bullet: Change the angle of each bullet to match the direction it is travelling (enabled by default)", |
| 20 | + "- Angle Variance: Each bullet trajectory will be adjusted by a random value within this range (degrees)", |
| 21 | + "- Bullet speed variance: Each bullet speed will be adjusted by a random value within this range (pixels/second)", |
20 | 22 | "", |
21 | | - "[A simplified version](https://editor.gdevelop.io/?project=example://fire-bullet) of the top-down twin-stick shooter example allows to check it out." |
| 23 | + " Ammo:", |
| 24 | + "- Starting ammo", |
| 25 | + "- Max ammo", |
| 26 | + "- Shots per reload. Use 0 to disable reloading", |
| 27 | + "- Reload duration", |
| 28 | + "- Automatic reloading is enabled by default, but it can also be done manually.", |
| 29 | + "", |
| 30 | + "Overheat:", |
| 31 | + "- Heat increase per shot. Object is Overheated when Heat reaches 1.", |
| 32 | + "- Cooling rate per second", |
| 33 | + "- When overheated, the object cannot fire any bullets", |
| 34 | + "", |
| 35 | + "Statistics:", |
| 36 | + "- Total bullets created", |
| 37 | + "- Total shots taken", |
| 38 | + "- Total reloads completed", |
| 39 | + "", |
| 40 | + "Bullets:", |
| 41 | + "- Each bullet is assigned several variables that can be used for advanced object picking", |
| 42 | + "- __FireBullet.BulletID = Unique number for every bullet created", |
| 43 | + "- __FireBullet.BatchID = Unique number for all bullets created in the same frame", |
| 44 | + "- __FireBullet.BatchOrderID = Unique number for each bullet in the same batch. Can be used to identify the position in the firing arc." |
22 | 45 | ], |
23 | 46 | "origin": { |
24 | 47 | "identifier": "FireBullet", |
|
751 | 774 | "objectGroups": [] |
752 | 775 | }, |
753 | 776 | { |
754 | | - "description": "Fire bullets toward a position.\n\nEach bullet is assigned variables for advanced object picking\n- __FireBullet.BulletID, Unique number for every bullet created\n- __FireBullet.BatchID, Unique number for all bullets created in the same frame\n- __FireBullet.BatchOrderID, Unique number for each bullet in the same batch. Can be used to identify the position in the firing arc.", |
| 777 | + "description": "Fire bullets toward a position.", |
755 | 778 | "fullName": "Fire bullets toward a position", |
756 | 779 | "functionType": "Action", |
757 | 780 | "name": "FireTowardPosition", |
|
837 | 860 | "objectGroups": [] |
838 | 861 | }, |
839 | 862 | { |
840 | | - "description": "Fire bullets in the direction of a given angle.\n\nEach bullet is assigned variables for advanced object picking\n- __FireBullet.BulletID, Unique number for every bullet created\n- __FireBullet.BatchID, Unique number for all bullets created in the same frame\n- __FireBullet.BatchOrderID, Unique number for each bullet in the same batch. Can be used to identify the position in the firing arc.", |
| 863 | + "description": "Fire bullets in the direction of a given angle.", |
841 | 864 | "fullName": "Fire bullets toward an angle", |
842 | 865 | "functionType": "Action", |
843 | 866 | "name": "Fire", |
|
1146 | 1169 | "textG": 0, |
1147 | 1170 | "textR": 0 |
1148 | 1171 | }, |
1149 | | - "comment": "Move bullet", |
| 1172 | + "comment": "Move bullet (apply angle and bullet speed variances)", |
1150 | 1173 | "comment2": "" |
1151 | 1174 | }, |
1152 | 1175 | { |
1153 | 1176 | "type": "BuiltinCommonInstructions::Standard", |
1154 | 1177 | "conditions": [], |
1155 | 1178 | "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 | | - }, |
1167 | 1179 | { |
1168 | 1180 | "type": { |
1169 | 1181 | "value": "AddForceAL" |
1170 | 1182 | }, |
1171 | 1183 | "parameters": [ |
1172 | 1184 | "Bullet", |
1173 | | - "Object.Behavior::PropertyRandomizedAngle()", |
1174 | | - "GetArgumentAsNumber(\"Speed\")", |
| 1185 | + "GetArgumentAsNumber(\"Angle\") + RandomInRange(-Object.Behavior::PropertyAngleVariance(), Object.Behavior::PropertyAngleVariance())", |
| 1186 | + "GetArgumentAsNumber(\"Speed\") + RandomInRange(-Object.Behavior::PropertyBulletSpeedVariance(), Object.Behavior::PropertyBulletSpeedVariance())", |
1175 | 1187 | "1" |
1176 | 1188 | ] |
1177 | 1189 | } |
|
1263 | 1275 | "parameters": [ |
1264 | 1276 | "Bullet", |
1265 | 1277 | "=", |
1266 | | - "Object.Behavior::PropertyRandomizedAngle()" |
| 1278 | + "GetArgumentAsNumber(\"Angle\")" |
1267 | 1279 | ] |
1268 | 1280 | } |
1269 | 1281 | ] |
|
1606 | 1618 | ], |
1607 | 1619 | "objectGroups": [] |
1608 | 1620 | }, |
| 1621 | + { |
| 1622 | + "description": "Change the speed variance (pixels per second) applied to each bullet.", |
| 1623 | + "fullName": "Set bullet speed variance", |
| 1624 | + "functionType": "Action", |
| 1625 | + "group": "Multi-Fire", |
| 1626 | + "name": "SetBulletSpeedVariance", |
| 1627 | + "sentence": "Set bullet speed variance of _PARAM0_ to _PARAM2_ pixels per second", |
| 1628 | + "events": [ |
| 1629 | + { |
| 1630 | + "type": "BuiltinCommonInstructions::Standard", |
| 1631 | + "conditions": [], |
| 1632 | + "actions": [ |
| 1633 | + { |
| 1634 | + "type": { |
| 1635 | + "value": "FireBullet::FireBullet::SetPropertyBulletSpeedVariance" |
| 1636 | + }, |
| 1637 | + "parameters": [ |
| 1638 | + "Object", |
| 1639 | + "Behavior", |
| 1640 | + "=", |
| 1641 | + "GetArgumentAsNumber(\"Value\")" |
| 1642 | + ] |
| 1643 | + } |
| 1644 | + ] |
| 1645 | + } |
| 1646 | + ], |
| 1647 | + "parameters": [ |
| 1648 | + { |
| 1649 | + "description": "Object", |
| 1650 | + "name": "Object", |
| 1651 | + "type": "object" |
| 1652 | + }, |
| 1653 | + { |
| 1654 | + "description": "Behavior", |
| 1655 | + "name": "Behavior", |
| 1656 | + "supplementaryInformation": "FireBullet::FireBullet", |
| 1657 | + "type": "behavior" |
| 1658 | + }, |
| 1659 | + { |
| 1660 | + "description": "Angle variance (degrees) Range: 0 to 180", |
| 1661 | + "name": "Value", |
| 1662 | + "type": "expression" |
| 1663 | + } |
| 1664 | + ], |
| 1665 | + "objectGroups": [] |
| 1666 | + }, |
1609 | 1667 | { |
1610 | 1668 | "description": "Change the number of bullets shot every time the \"fire bullet\" action is used.", |
1611 | 1669 | "fullName": "Set number of bullets per shot", |
|
2776 | 2834 | ], |
2777 | 2835 | "objectGroups": [] |
2778 | 2836 | }, |
| 2837 | + { |
| 2838 | + "description": "Bullet speed variance, in pixels per second.", |
| 2839 | + "fullName": "Bullet speed variance", |
| 2840 | + "functionType": "Expression", |
| 2841 | + "group": "Multi-Fire", |
| 2842 | + "name": "BulletSpeedVariance", |
| 2843 | + "sentence": "", |
| 2844 | + "events": [ |
| 2845 | + { |
| 2846 | + "type": "BuiltinCommonInstructions::Standard", |
| 2847 | + "conditions": [], |
| 2848 | + "actions": [ |
| 2849 | + { |
| 2850 | + "type": { |
| 2851 | + "value": "SetReturnNumber" |
| 2852 | + }, |
| 2853 | + "parameters": [ |
| 2854 | + "Object.Behavior::PropertyBulletSpeedVariance()" |
| 2855 | + ] |
| 2856 | + } |
| 2857 | + ] |
| 2858 | + } |
| 2859 | + ], |
| 2860 | + "expressionType": { |
| 2861 | + "type": "expression" |
| 2862 | + }, |
| 2863 | + "parameters": [ |
| 2864 | + { |
| 2865 | + "description": "Object", |
| 2866 | + "name": "Object", |
| 2867 | + "type": "object" |
| 2868 | + }, |
| 2869 | + { |
| 2870 | + "description": "Behavior", |
| 2871 | + "name": "Behavior", |
| 2872 | + "supplementaryInformation": "FireBullet::FireBullet", |
| 2873 | + "type": "behavior" |
| 2874 | + } |
| 2875 | + ], |
| 2876 | + "objectGroups": [] |
| 2877 | + }, |
2779 | 2878 | { |
2780 | 2879 | "description": "Firing arc, in degrees.", |
2781 | 2880 | "fullName": "Firing arc", |
|
4421 | 4520 | "name": "BulletLayer" |
4422 | 4521 | }, |
4423 | 4522 | { |
4424 | | - "value": "", |
| 4523 | + "value": "0", |
4425 | 4524 | "type": "Number", |
4426 | | - "label": "", |
4427 | | - "description": "", |
4428 | | - "group": "", |
| 4525 | + "label": "Bullet speed variance (pixels/second)", |
| 4526 | + "description": "Bullet speed will be adjusted by a random value within this range (pixels/second)", |
| 4527 | + "group": "Multi-Fire", |
4429 | 4528 | "extraInformation": [], |
4430 | | - "hidden": true, |
4431 | | - "name": "RandomizedAngle" |
| 4529 | + "hidden": false, |
| 4530 | + "name": "BulletSpeedVariance" |
4432 | 4531 | } |
4433 | 4532 | ], |
4434 | 4533 | "sharedPropertyDescriptors": [] |
|
0 commit comments