|
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.6.2", |
| 11 | + "version": "0.6.3", |
12 | 12 | "description": [ |
13 | 13 | "This extension allows objects to fire bullets.", |
14 | 14 | "", |
|
138 | 138 | "textG": 0, |
139 | 139 | "textR": 0 |
140 | 140 | }, |
141 | | - "comment": "Creators can use the \"FireBullet\" action multiple times in a frame and it will be counted as a single \"shot\".", |
142 | | - "comment2": "" |
| 141 | + "comment": "Creators can use the \"FireBullet\" action multiple times in a frame and it will be counted as a single \"shot\"." |
143 | 142 | }, |
144 | 143 | { |
145 | 144 | "type": "BuiltinCommonInstructions::Standard", |
|
202 | 201 | "textG": 0, |
203 | 202 | "textR": 0 |
204 | 203 | }, |
205 | | - "comment": "Subtract 1 from ammo (if not unlimited ammo)", |
206 | | - "comment2": "" |
| 204 | + "comment": "Subtract 1 from ammo (if not unlimited ammo)" |
207 | 205 | }, |
208 | 206 | { |
209 | 207 | "type": "BuiltinCommonInstructions::Standard", |
|
355 | 353 | "textG": 0, |
356 | 354 | "textR": 0 |
357 | 355 | }, |
358 | | - "comment": "Increase heat (if needed)", |
359 | | - "comment2": "" |
| 356 | + "comment": "Increase heat (if needed)" |
360 | 357 | }, |
361 | 358 | { |
362 | 359 | "type": "BuiltinCommonInstructions::Standard", |
|
397 | 394 | "textG": 0, |
398 | 395 | "textR": 0 |
399 | 396 | }, |
400 | | - "comment": "Check if this caused overheat", |
401 | | - "comment2": "" |
| 397 | + "comment": "Check if this caused overheat" |
402 | 398 | }, |
403 | 399 | { |
404 | 400 | "type": "BuiltinCommonInstructions::Standard", |
|
523 | 519 | "textG": 0, |
524 | 520 | "textR": 0 |
525 | 521 | }, |
526 | | - "comment": "Detect when reload is completed", |
527 | | - "comment2": "" |
| 522 | + "comment": "Detect when reload is completed" |
528 | 523 | }, |
529 | 524 | { |
530 | 525 | "type": "BuiltinCommonInstructions::Standard", |
|
613 | 608 | "textG": 0, |
614 | 609 | "textR": 0 |
615 | 610 | }, |
616 | | - "comment": "Only reload the amount of ammo available", |
617 | | - "comment2": "" |
| 611 | + "comment": "Only reload the amount of ammo available" |
618 | 612 | }, |
619 | 613 | { |
620 | 614 | "type": "BuiltinCommonInstructions::Standard", |
|
754 | 748 | ], |
755 | 749 | "objectGroups": [] |
756 | 750 | }, |
| 751 | + { |
| 752 | + "description": "Fire bullets toward an object.", |
| 753 | + "fullName": "Fire bullets toward an object", |
| 754 | + "functionType": "Action", |
| 755 | + "name": "FireTowardObject", |
| 756 | + "sentence": "Fire _PARAM4_ from _PARAM0_, at position _PARAM2_; _PARAM3_, toward _PARAM5_ with speed _PARAM6_ px/s", |
| 757 | + "events": [ |
| 758 | + { |
| 759 | + "colorB": 228, |
| 760 | + "colorG": 176, |
| 761 | + "colorR": 74, |
| 762 | + "creationTime": 0, |
| 763 | + "name": "Calculate the trajectory angle and use the \"Fire bullets\" action", |
| 764 | + "source": "", |
| 765 | + "type": "BuiltinCommonInstructions::Group", |
| 766 | + "events": [ |
| 767 | + { |
| 768 | + "type": "BuiltinCommonInstructions::Standard", |
| 769 | + "conditions": [], |
| 770 | + "actions": [ |
| 771 | + { |
| 772 | + "type": { |
| 773 | + "value": "FireBullet::FireBullet::Fire" |
| 774 | + }, |
| 775 | + "parameters": [ |
| 776 | + "Object", |
| 777 | + "Behavior", |
| 778 | + "GetArgumentAsNumber(\"XPosition\")", |
| 779 | + "GetArgumentAsNumber(\"YPosition\")", |
| 780 | + "Bullet", |
| 781 | + "Object.AngleToObject(TargetObject)", |
| 782 | + "GetArgumentAsNumber(\"Speed\")", |
| 783 | + "" |
| 784 | + ] |
| 785 | + } |
| 786 | + ] |
| 787 | + } |
| 788 | + ], |
| 789 | + "parameters": [] |
| 790 | + } |
| 791 | + ], |
| 792 | + "parameters": [ |
| 793 | + { |
| 794 | + "description": "Object", |
| 795 | + "name": "Object", |
| 796 | + "type": "object" |
| 797 | + }, |
| 798 | + { |
| 799 | + "description": "Behavior", |
| 800 | + "name": "Behavior", |
| 801 | + "supplementaryInformation": "FireBullet::FireBullet", |
| 802 | + "type": "behavior" |
| 803 | + }, |
| 804 | + { |
| 805 | + "description": "X position, where to create the bullet", |
| 806 | + "name": "XPosition", |
| 807 | + "type": "expression" |
| 808 | + }, |
| 809 | + { |
| 810 | + "description": "Y position, where to create the bullet", |
| 811 | + "name": "YPosition", |
| 812 | + "type": "expression" |
| 813 | + }, |
| 814 | + { |
| 815 | + "description": "The bullet object", |
| 816 | + "name": "Bullet", |
| 817 | + "type": "objectListOrEmptyIfJustDeclared" |
| 818 | + }, |
| 819 | + { |
| 820 | + "description": "Target object", |
| 821 | + "name": "TargetObject", |
| 822 | + "type": "objectList" |
| 823 | + }, |
| 824 | + { |
| 825 | + "description": "Speed of the bullet, in pixels per second", |
| 826 | + "name": "Speed", |
| 827 | + "type": "expression" |
| 828 | + } |
| 829 | + ], |
| 830 | + "objectGroups": [] |
| 831 | + }, |
757 | 832 | { |
758 | 833 | "description": "Fire bullets toward a position.", |
759 | 834 | "fullName": "Fire bullets toward a position", |
|
784 | 859 | "GetArgumentAsNumber(\"XPosition\")", |
785 | 860 | "GetArgumentAsNumber(\"YPosition\")", |
786 | 861 | "Bullet", |
787 | | - "Object.AngleToPosition(GetArgumentAsNumber(\"TargetXPosition\"),GetArgumentAsNumber(\"TargetYPosition\"))", |
| 862 | + "Object.AngleToPosition(GetArgumentAsNumber(\"TargetXPosition\"), GetArgumentAsNumber(\"TargetYPosition\"))", |
788 | 863 | "GetArgumentAsNumber(\"Speed\")", |
789 | 864 | "" |
790 | 865 | ] |
|
1007 | 1082 | "textG": 0, |
1008 | 1083 | "textR": 0 |
1009 | 1084 | }, |
1010 | | - "comment": "Move temp variable to the next angle a bullet will be sent", |
1011 | | - "comment2": "" |
| 1085 | + "comment": "Move temp variable to the next angle a bullet will be sent" |
1012 | 1086 | }, |
1013 | 1087 | { |
1014 | 1088 | "type": "BuiltinCommonInstructions::Standard", |
|
1119 | 1193 | "textG": 0, |
1120 | 1194 | "textR": 0 |
1121 | 1195 | }, |
1122 | | - "comment": "Create bullet", |
1123 | | - "comment2": "" |
| 1196 | + "comment": "Create bullet" |
1124 | 1197 | }, |
1125 | 1198 | { |
1126 | 1199 | "type": "BuiltinCommonInstructions::Standard", |
|
1150 | 1223 | "textG": 0, |
1151 | 1224 | "textR": 0 |
1152 | 1225 | }, |
1153 | | - "comment": "Move bullet (apply angle and bullet speed variances)", |
1154 | | - "comment2": "" |
| 1226 | + "comment": "Move bullet (apply angle and bullet speed variances)" |
1155 | 1227 | }, |
1156 | 1228 | { |
1157 | 1229 | "type": "BuiltinCommonInstructions::Standard", |
|
1191 | 1263 | "textG": 0, |
1192 | 1264 | "textR": 0 |
1193 | 1265 | }, |
1194 | | - "comment": "Add identifier variables (to enable advanced picking by users)", |
1195 | | - "comment2": "" |
| 1266 | + "comment": "Add identifier variables (to enable advanced picking by users)" |
1196 | 1267 | }, |
1197 | 1268 | { |
1198 | 1269 | "type": "BuiltinCommonInstructions::Standard", |
|
1243 | 1314 | "textG": 0, |
1244 | 1315 | "textR": 0 |
1245 | 1316 | }, |
1246 | | - "comment": "Rotate newly created bullet, if needed", |
1247 | | - "comment2": "" |
| 1317 | + "comment": "Rotate newly created bullet, if needed" |
1248 | 1318 | }, |
1249 | 1319 | { |
1250 | 1320 | "type": "BuiltinCommonInstructions::Standard", |
|
1284 | 1354 | "textG": 0, |
1285 | 1355 | "textR": 0 |
1286 | 1356 | }, |
1287 | | - "comment": "Update statistics", |
1288 | | - "comment2": "" |
| 1357 | + "comment": "Update statistics" |
1289 | 1358 | }, |
1290 | 1359 | { |
1291 | 1360 | "type": "BuiltinCommonInstructions::Standard", |
|
3759 | 3828 | "textG": 0, |
3760 | 3829 | "textR": 0 |
3761 | 3830 | }, |
3762 | | - "comment": "If Max Ammo is set, do not exceed the value", |
3763 | | - "comment2": "" |
| 3831 | + "comment": "If Max Ammo is set, do not exceed the value" |
3764 | 3832 | }, |
3765 | 3833 | { |
3766 | 3834 | "type": "BuiltinCommonInstructions::Standard", |
|
4623 | 4691 | "textG": 0, |
4624 | 4692 | "textR": 0 |
4625 | 4693 | }, |
4626 | | - "comment": "Shots per reload must not be \"0\"", |
4627 | | - "comment2": "" |
| 4694 | + "comment": "Shots per reload must not be \"0\"" |
4628 | 4695 | }, |
4629 | 4696 | { |
4630 | 4697 | "type": "BuiltinCommonInstructions::Standard", |
|
0 commit comments