Files
GDevelop/newIDE/app/resources/examples/basic-artificial-intelligence/basic-artificial-intelligence.json
T
2018-06-17 14:33:50 +01:00

1958 lines
50 KiB
JSON
Executable File

{
"firstLayout": "",
"gdVersion": {
"build": 97,
"major": 4,
"minor": 0,
"revision": 0
},
"properties": {
"folderProject": false,
"linuxExecutableFilename": "",
"macExecutableFilename": "",
"orientation": "default",
"packageName": "",
"projectFile": "C:\\Users\\szoszo\\Desktop\\Projects\\gametemplates\\gdevelop5\\basic-artificial-intelligence\\basic-artificial-intelligence.json",
"sizeOnStartupMode": "",
"useExternalSourceFiles": false,
"winExecutableFilename": "",
"winExecutableIconFile": "",
"name": "Basic artificial intelligence",
"author": "",
"windowWidth": 800,
"windowHeight": 600,
"latestCompilationDirectory": "",
"maxFPS": 60,
"minFPS": 10,
"verticalSync": false,
"platformSpecificAssets": {},
"loadingScreen": {
"showGDevelopSplash": true
},
"extensions": [
{
"name": "BuiltinObject"
},
{
"name": "BuiltinAudio"
},
{
"name": "BuiltinVariables"
},
{
"name": "BuiltinTime"
},
{
"name": "BuiltinMouse"
},
{
"name": "BuiltinKeyboard"
},
{
"name": "BuiltinJoystick"
},
{
"name": "BuiltinCamera"
},
{
"name": "BuiltinWindow"
},
{
"name": "BuiltinFile"
},
{
"name": "BuiltinNetwork"
},
{
"name": "BuiltinScene"
},
{
"name": "BuiltinAdvanced"
},
{
"name": "Sprite"
},
{
"name": "BuiltinCommonInstructions"
},
{
"name": "BuiltinCommonConversions"
},
{
"name": "BuiltinStringInstructions"
},
{
"name": "BuiltinMathematicalTools"
},
{
"name": "BuiltinExternalLayouts"
},
{
"name": "TextObject"
},
{
"name": "LinkedObjects"
},
{
"name": "CommonDialogs"
},
{
"name": "DestroyOutsideBehavior"
}
],
"platforms": [
{
"name": "GDevelop JS platform"
}
],
"currentPlatform": "GDevelop JS platform"
},
"resources": {
"resources": [
{
"alwaysLoaded": false,
"file": "bordure2.png",
"kind": "image",
"name": "bordure2.png",
"smoothed": true,
"userAdded": true
},
{
"alwaysLoaded": false,
"file": "tankV1.png",
"kind": "image",
"name": "tank1",
"smoothed": false,
"userAdded": true
},
{
"alwaysLoaded": false,
"file": "tankV2.png",
"kind": "image",
"name": "tank2",
"smoothed": false,
"userAdded": true
},
{
"alwaysLoaded": false,
"file": "tankV3.png",
"kind": "image",
"name": "tank3",
"smoothed": false,
"userAdded": true
},
{
"alwaysLoaded": false,
"file": "tankV4.png",
"kind": "image",
"name": "tank4",
"smoothed": false,
"userAdded": true
},
{
"alwaysLoaded": false,
"file": "tankV5.png",
"kind": "image",
"name": "tank5",
"smoothed": false,
"userAdded": true
},
{
"alwaysLoaded": false,
"file": "tankV6.png",
"kind": "image",
"name": "tank6",
"smoothed": false,
"userAdded": true
},
{
"alwaysLoaded": false,
"file": "tankV7.png",
"kind": "image",
"name": "tank7",
"smoothed": false,
"userAdded": true
},
{
"alwaysLoaded": false,
"file": "bordure.png",
"kind": "image",
"name": "bordure.png",
"smoothed": false,
"userAdded": true
},
{
"alwaysLoaded": false,
"file": "TankB1.png",
"kind": "image",
"name": "TankB1.png",
"smoothed": false,
"userAdded": true
},
{
"alwaysLoaded": false,
"file": "alert.png",
"kind": "image",
"name": "alert.png",
"smoothed": true,
"userAdded": false
}
],
"resourceFolders": []
},
"objects": [],
"objectsGroups": [],
"variables": [],
"layouts": [
{
"b": 0,
"disableInputWhenNotFocused": true,
"mangledName": "scene",
"name": "scene",
"oglFOV": 90,
"oglZFar": 500,
"oglZNear": 1,
"r": 0,
"standardSortMethod": true,
"stopSoundsOnStartup": true,
"title": "",
"v": 64,
"uiSettings": {
"grid": false,
"gridB": 255,
"gridG": 180,
"gridHeight": 32,
"gridOffsetX": 0,
"gridOffsetY": 0,
"gridR": 158,
"gridWidth": 32,
"snap": true,
"windowMask": false,
"zoomFactor": 1
},
"objectsGroups": [
{
"name": "Solid",
"objects": [
{
"name": "Perso"
},
{
"name": "Mur"
}
]
}
],
"variables": [
{
"name": "IntersectionX",
"value": "0"
},
{
"name": "IntersectionY",
"value": "0"
}
],
"instances": [
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "",
"locked": false,
"name": "Perso",
"width": 0,
"x": 272,
"y": 83,
"zOrder": 0,
"numberProperties": [
{
"name": "animation",
"value": 0
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "",
"locked": false,
"name": "Mur",
"width": 0,
"x": 384,
"y": 256,
"zOrder": 0,
"numberProperties": [
{
"name": "animation",
"value": 0
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "",
"locked": false,
"name": "IA",
"width": 0,
"x": 548,
"y": 57,
"zOrder": 0,
"numberProperties": [
{
"name": "animation",
"value": 0
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "",
"locked": false,
"name": "IA",
"width": 0,
"x": 545,
"y": 220,
"zOrder": 0,
"numberProperties": [
{
"name": "animation",
"value": 0
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "",
"locked": false,
"name": "IA",
"width": 0,
"x": 107,
"y": 44,
"zOrder": 0,
"numberProperties": [
{
"name": "animation",
"value": 0
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "",
"locked": false,
"name": "IA",
"width": 0,
"x": 111,
"y": 101,
"zOrder": 0,
"numberProperties": [
{
"name": "animation",
"value": 0
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "",
"locked": false,
"name": "IA",
"width": 0,
"x": 109,
"y": 188,
"zOrder": 0,
"numberProperties": [
{
"name": "animation",
"value": 0
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "",
"locked": false,
"name": "Mur",
"width": 0,
"x": 480,
"y": 256,
"zOrder": 0,
"numberProperties": [
{
"name": "animation",
"value": 0
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "",
"locked": false,
"name": "Mur",
"width": 0,
"x": 576,
"y": 256,
"zOrder": 0,
"numberProperties": [
{
"name": "animation",
"value": 0
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "Interface",
"locked": false,
"name": "Note",
"width": 0,
"x": 5,
"y": 548,
"zOrder": 0,
"numberProperties": [],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "",
"locked": false,
"name": "Mur",
"width": 0,
"x": 160,
"y": -32,
"zOrder": 1,
"numberProperties": [
{
"name": "animation",
"value": 1
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "",
"locked": false,
"name": "Mur",
"width": 0,
"x": 640,
"y": 160,
"zOrder": 1,
"numberProperties": [
{
"name": "animation",
"value": 1
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "",
"locked": false,
"name": "Mur",
"width": 0,
"x": 640,
"y": 64,
"zOrder": 1,
"numberProperties": [
{
"name": "animation",
"value": 1
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "",
"locked": false,
"name": "Mur",
"width": 0,
"x": 640,
"y": -32,
"zOrder": 1,
"numberProperties": [
{
"name": "animation",
"value": 1
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "",
"locked": false,
"name": "Mur",
"width": 0,
"x": 384,
"y": -32,
"zOrder": 1,
"numberProperties": [
{
"name": "animation",
"value": 1
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "",
"locked": false,
"name": "Mur",
"width": 0,
"x": 384,
"y": 64,
"zOrder": 1,
"numberProperties": [
{
"name": "animation",
"value": 1
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "",
"locked": false,
"name": "Mur",
"width": 0,
"x": 160,
"y": 160,
"zOrder": 1,
"numberProperties": [
{
"name": "animation",
"value": 1
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "",
"locked": false,
"name": "Mur",
"width": 0,
"x": 160,
"y": 64,
"zOrder": 1,
"numberProperties": [
{
"name": "animation",
"value": 1
}
],
"stringProperties": [],
"initialVariables": []
}
],
"objects": [
{
"name": "Perso",
"type": "Sprite",
"updateIfNotVisible": true,
"variables": [],
"behaviors": [],
"animations": [
{
"name": "",
"useMultipleDirections": false,
"directions": [
{
"looping": false,
"timeBetweenFrames": 1,
"sprites": [
{
"hasCustomCollisionMask": false,
"image": "TankB1.png",
"points": [],
"originPoint": {
"name": "origine",
"x": 14,
"y": 12
},
"centerPoint": {
"automatic": true,
"name": "centre",
"x": 14.5,
"y": 12.5
},
"customCollisionMask": [
[
{
"x": 0,
"y": 0
},
{
"x": 29,
"y": 0
},
{
"x": 29,
"y": 25
},
{
"x": 0,
"y": 25
}
]
]
}
]
}
]
}
]
},
{
"name": "Mur",
"type": "Sprite",
"updateIfNotVisible": true,
"variables": [],
"behaviors": [],
"animations": [
{
"name": "",
"useMultipleDirections": false,
"directions": [
{
"looping": false,
"timeBetweenFrames": 1,
"sprites": [
{
"hasCustomCollisionMask": false,
"image": "bordure.png",
"points": [],
"originPoint": {
"name": "origine",
"x": 0,
"y": 0
},
"centerPoint": {
"automatic": true,
"name": "centre",
"x": 0,
"y": 0
},
"customCollisionMask": []
}
]
}
]
},
{
"name": "",
"useMultipleDirections": false,
"directions": [
{
"looping": false,
"timeBetweenFrames": 1,
"sprites": [
{
"hasCustomCollisionMask": false,
"image": "bordure2.png",
"points": [],
"originPoint": {
"name": "origine",
"x": 0,
"y": 0
},
"centerPoint": {
"automatic": true,
"name": "centre",
"x": 0,
"y": 0
},
"customCollisionMask": []
}
]
}
]
}
]
},
{
"name": "IA",
"type": "Sprite",
"updateIfNotVisible": true,
"variables": [],
"behaviors": [],
"animations": [
{
"name": "",
"useMultipleDirections": false,
"directions": [
{
"looping": true,
"timeBetweenFrames": 0.15,
"sprites": [
{
"hasCustomCollisionMask": false,
"image": "tank1",
"points": [],
"originPoint": {
"name": "origine",
"x": 14,
"y": 12
},
"centerPoint": {
"automatic": true,
"name": "centre",
"x": 14.5,
"y": 12
},
"customCollisionMask": [
[
{
"x": 0,
"y": 0
},
{
"x": 29,
"y": 0
},
{
"x": 29,
"y": 24
},
{
"x": 0,
"y": 24
}
]
]
},
{
"hasCustomCollisionMask": false,
"image": "tank2",
"points": [],
"originPoint": {
"name": "origine",
"x": 14,
"y": 12
},
"centerPoint": {
"automatic": true,
"name": "centre",
"x": 14.5,
"y": 12
},
"customCollisionMask": [
[
{
"x": 0,
"y": 0
},
{
"x": 29,
"y": 0
},
{
"x": 29,
"y": 24
},
{
"x": 0,
"y": 24
}
]
]
},
{
"hasCustomCollisionMask": false,
"image": "tank3",
"points": [],
"originPoint": {
"name": "origine",
"x": 14,
"y": 12
},
"centerPoint": {
"automatic": true,
"name": "centre",
"x": 14.5,
"y": 12
},
"customCollisionMask": [
[
{
"x": 0,
"y": 0
},
{
"x": 29,
"y": 0
},
{
"x": 29,
"y": 24
},
{
"x": 0,
"y": 24
}
]
]
},
{
"hasCustomCollisionMask": false,
"image": "tank4",
"points": [],
"originPoint": {
"name": "origine",
"x": 14,
"y": 12
},
"centerPoint": {
"automatic": true,
"name": "centre",
"x": 14.5,
"y": 12
},
"customCollisionMask": [
[
{
"x": 0,
"y": 0
},
{
"x": 29,
"y": 0
},
{
"x": 29,
"y": 24
},
{
"x": 0,
"y": 24
}
]
]
},
{
"hasCustomCollisionMask": false,
"image": "tank5",
"points": [],
"originPoint": {
"name": "origine",
"x": 14,
"y": 12
},
"centerPoint": {
"automatic": true,
"name": "centre",
"x": 14.5,
"y": 12
},
"customCollisionMask": [
[
{
"x": 0,
"y": 0
},
{
"x": 29,
"y": 0
},
{
"x": 29,
"y": 24
},
{
"x": 0,
"y": 24
}
]
]
},
{
"hasCustomCollisionMask": false,
"image": "tank6",
"points": [],
"originPoint": {
"name": "origine",
"x": 14,
"y": 12
},
"centerPoint": {
"automatic": true,
"name": "centre",
"x": 14.5,
"y": 12
},
"customCollisionMask": [
[
{
"x": 0,
"y": 0
},
{
"x": 29,
"y": 0
},
{
"x": 29,
"y": 24
},
{
"x": 0,
"y": 24
}
]
]
},
{
"hasCustomCollisionMask": false,
"image": "tank7",
"points": [],
"originPoint": {
"name": "origine",
"x": 14,
"y": 12
},
"centerPoint": {
"automatic": true,
"name": "centre",
"x": 14.5,
"y": 12
},
"customCollisionMask": [
[
{
"x": 0,
"y": 0
},
{
"x": 29,
"y": 0
},
{
"x": 29,
"y": 24
},
{
"x": 0,
"y": 24
}
]
]
}
]
}
]
},
{
"name": "",
"useMultipleDirections": false,
"directions": [
{
"looping": false,
"timeBetweenFrames": 1,
"sprites": [
{
"hasCustomCollisionMask": false,
"image": "tank3",
"points": [],
"originPoint": {
"name": "origine",
"x": 14,
"y": 12
},
"centerPoint": {
"automatic": true,
"name": "centre",
"x": 14.5,
"y": 12
},
"customCollisionMask": [
[
{
"x": 0,
"y": 0
},
{
"x": 29,
"y": 0
},
{
"x": 29,
"y": 24
},
{
"x": 0,
"y": 24
}
]
]
}
]
}
]
}
]
},
{
"bold": false,
"italic": false,
"name": "Note",
"smoothed": true,
"type": "TextObject::Text",
"underlined": false,
"variables": [],
"behaviors": [],
"string": "Use the arrow keys or left mouse button or touch to move the blue tank\nIf the green tanks see you they start chasing you and stop if you are out of visual range",
"font": "",
"characterSize": 20,
"color": {
"b": 255,
"g": 255,
"r": 255
}
},
{
"name": "Alert",
"type": "Sprite",
"updateIfNotVisible": false,
"variables": [],
"behaviors": [],
"animations": [
{
"name": "",
"useMultipleDirections": false,
"directions": [
{
"looping": false,
"timeBetweenFrames": 1,
"sprites": [
{
"hasCustomCollisionMask": false,
"image": "alert.png",
"points": [],
"originPoint": {
"name": "origine",
"x": 30,
"y": 30
},
"centerPoint": {
"automatic": true,
"name": "centre",
"x": 0,
"y": 0
},
"customCollisionMask": []
}
]
}
]
}
]
}
],
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 109,
"g": 230,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "Move the blue tank with the arrow keys",
"comment2": ""
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": false,
"value": "KeyPressed"
},
"parameters": [
"",
"Left"
],
"subInstructions": []
}
],
"actions": [
{
"type": {
"inverted": false,
"value": "SetAngle"
},
"parameters": [
"Perso",
"-",
"4"
],
"subInstructions": []
}
],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": false,
"value": "KeyPressed"
},
"parameters": [
"",
"Right"
],
"subInstructions": []
}
],
"actions": [
{
"type": {
"inverted": false,
"value": "SetAngle"
},
"parameters": [
"Perso",
"+",
"4"
],
"subInstructions": []
}
],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": false,
"value": "KeyPressed"
},
"parameters": [
"",
"Up"
],
"subInstructions": []
}
],
"actions": [
{
"type": {
"inverted": false,
"value": "AddForceAL"
},
"parameters": [
"Perso",
"Perso.Angle()",
"75",
"0"
],
"subInstructions": []
}
],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": false,
"value": "KeyPressed"
},
"parameters": [
"",
"Down"
],
"subInstructions": []
}
],
"actions": [
{
"type": {
"inverted": false,
"value": "AddForceAL"
},
"parameters": [
"Perso",
"Perso.Angle()",
"-75",
"0"
],
"subInstructions": []
}
],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 109,
"g": 230,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "If left mouse button or touch is down, move and rotate the blue tank toward the position of the pointer",
"comment2": ""
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": false,
"value": "SourisBouton"
},
"parameters": [
"",
"Left"
],
"subInstructions": []
}
],
"actions": [
{
"type": {
"inverted": false,
"value": "TourneVersPos"
},
"parameters": [
"Perso",
"MouseX(\"\",0)",
"MouseY(\"\",0)"
],
"subInstructions": []
},
{
"type": {
"inverted": false,
"value": "AddForceVersPos"
},
"parameters": [
"Perso",
"MouseX(\"\",0)",
"MouseY(\"\",0)",
"75",
""
],
"subInstructions": []
}
],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 128,
"g": 255,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "Send a raycast from each tank toward the player.\nThe player and the wall object is both member of a group called solid and we use this group to set the player and wall to be obstacles for the raycast",
"comment2": "Crer rgulirement un objet utilis pour chercher le joueur.\nL'objet est li son propritaire."
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::ForEach",
"object": "IA",
"conditions": [
{
"type": {
"inverted": false,
"value": "Raycast"
},
"parameters": [
"Solid",
"IA.X()",
"IA.Y()",
"ToDeg(atan2(Perso.Y() - IA.Y(), Perso.X() - IA.X()))",
"600",
"IntersectionX",
"IntersectionY",
""
],
"subInstructions": []
}
],
"actions": [],
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 109,
"g": 230,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "If the raycast hit the player, set the Alerte value of the tank to 1\nNote this solution works only because we have only a single player in the scene.\nOtherwise we should be using the variables IntersectionX and IntersectionY in order to check which instance was hit by the raycast",
"comment2": ""
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": false,
"value": "NbObjet"
},
"parameters": [
"Perso",
">",
"0"
],
"subInstructions": []
}
],
"actions": [
{
"type": {
"inverted": false,
"value": "ModVarObjet"
},
"parameters": [
"IA",
"Alerte",
"=",
"1"
],
"subInstructions": []
}
],
"events": []
}
]
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 109,
"g": 230,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "If a green tank is alerted, create a red circle, link it to the tank and make it follow the tank",
"comment2": ""
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::ForEach",
"object": "IA",
"conditions": [
{
"type": {
"inverted": false,
"value": "VarObjet"
},
"parameters": [
"IA",
"Alerte",
"=",
"1"
],
"subInstructions": []
},
{
"type": {
"inverted": true,
"value": "LinkedObjects::PickObjectsLinkedTo"
},
"parameters": [
"",
"Alert",
"IA"
],
"subInstructions": []
}
],
"actions": [
{
"type": {
"inverted": false,
"value": "Create"
},
"parameters": [
"",
"Alert",
"IA.PointX(Center)",
"IA.PointY(Center)",
""
],
"subInstructions": []
},
{
"type": {
"inverted": false,
"value": "Opacity"
},
"parameters": [
"Alert",
"=",
"150"
],
"subInstructions": []
},
{
"type": {
"inverted": false,
"value": "LinkedObjects::LinkObjects"
},
"parameters": [
"",
"Alert",
"IA"
],
"subInstructions": []
}
],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::ForEach",
"object": "IA",
"conditions": [
{
"type": {
"inverted": false,
"value": "VarObjet"
},
"parameters": [
"IA",
"Alerte",
"=",
"1"
],
"subInstructions": []
},
{
"type": {
"inverted": false,
"value": "LinkedObjects::PickObjectsLinkedTo"
},
"parameters": [
"",
"Alert",
"IA"
],
"subInstructions": []
}
],
"actions": [
{
"type": {
"inverted": false,
"value": "MettreXY"
},
"parameters": [
"Alert",
"=",
"IA.X()",
"=",
"IA.Y()"
],
"subInstructions": []
}
],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 128,
"g": 255,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "Move alerted tank toward player",
"comment2": "Arrter la poursuite au bout d'un temps."
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": false,
"value": "VarObjet"
},
"parameters": [
"IA",
"Alerte",
"=",
"1"
],
"subInstructions": []
}
],
"actions": [
{
"type": {
"inverted": false,
"value": "AddForceVers"
},
"parameters": [
"IA",
"Perso",
"50",
"0"
],
"subInstructions": []
},
{
"type": {
"inverted": false,
"value": "TourneVers"
},
"parameters": [
"IA",
"Perso"
],
"subInstructions": []
}
],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 128,
"g": 255,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "Make the tanks stop following player after some time by setting the alert value to 0, if the raycast colliding with the player, it is going to be alerted again.",
"comment2": "Arrter la poursuite au bout d'un temps."
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": false,
"value": "Timer"
},
"parameters": [
"",
"5",
"\"FinAlerte\""
],
"subInstructions": []
}
],
"actions": [
{
"type": {
"inverted": false,
"value": "ModVarObjet"
},
"parameters": [
"IA",
"Alerte",
"=",
"0"
],
"subInstructions": []
},
{
"type": {
"inverted": false,
"value": "ResetTimer"
},
"parameters": [
"",
"\"FinAlerte\""
],
"subInstructions": []
}
],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 128,
"g": 255,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "Collision management\nIf IA is in collision with the wall move IA away from the wall to avoid it going to through the wall\nIf the Player (Perso) is colliding witht the wall, move the player away from the wall to void it going though the wall",
"comment2": "Gestion des collisions"
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": false,
"value": "Collision"
},
"parameters": [
"IA",
"Mur"
],
"subInstructions": []
}
],
"actions": [
{
"type": {
"inverted": false,
"value": "Rebondir"
},
"parameters": [
"IA",
"Mur",
""
],
"subInstructions": []
}
],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": false,
"value": "Collision"
},
"parameters": [
"Perso",
"Mur"
],
"subInstructions": []
}
],
"actions": [
{
"type": {
"inverted": false,
"value": "Rebondir"
},
"parameters": [
"Perso",
"Mur"
],
"subInstructions": []
}
],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 128,
"g": 255,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "Make Alert sprite disappear if the tank is no longer alerted, also make sure the link bewteen the IA and Alert is dropped as we no longer need it",
"comment2": "Faire disparaitre les lumires d'alertes."
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::ForEach",
"object": "IA",
"conditions": [
{
"type": {
"inverted": false,
"value": "VarObjet"
},
"parameters": [
"IA",
"Alerte",
"=",
"0"
],
"subInstructions": []
},
{
"type": {
"inverted": false,
"value": "LinkedObjects::PickObjectsLinkedTo"
},
"parameters": [
"",
"Alert",
"IA"
],
"subInstructions": []
}
],
"actions": [
{
"type": {
"inverted": false,
"value": "Delete"
},
"parameters": [
"Alert",
""
],
"subInstructions": []
},
{
"type": {
"inverted": false,
"value": "LinkedObjects::RemoveAllLinksOf"
},
"parameters": [
"",
"IA"
],
"subInstructions": []
}
],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 128,
"g": 255,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "Play animation when the IA object is moving",
"comment2": "Animation des ennemis"
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": false,
"value": "Arret"
},
"parameters": [
"IA"
],
"subInstructions": []
}
],
"actions": [
{
"type": {
"inverted": false,
"value": "ChangeAnimation"
},
"parameters": [
"IA",
"=",
"1"
],
"subInstructions": []
}
],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": true,
"value": "Arret"
},
"parameters": [
"IA"
],
"subInstructions": []
}
],
"actions": [
{
"type": {
"inverted": false,
"value": "ChangeAnimation"
},
"parameters": [
"IA",
"=",
"0"
],
"subInstructions": []
}
],
"events": []
}
],
"layers": [
{
"name": "",
"visibility": true,
"cameras": [
{
"defaultSize": true,
"defaultViewport": true,
"height": 0,
"viewportBottom": 1,
"viewportLeft": 0,
"viewportRight": 1,
"viewportTop": 0,
"width": 0
}
],
"effects": []
},
{
"name": "Interface",
"visibility": true,
"cameras": [
{
"defaultSize": true,
"defaultViewport": true,
"height": 0,
"viewportBottom": 1,
"viewportLeft": 0,
"viewportRight": 1,
"viewportTop": 0,
"width": 0
}
],
"effects": []
}
],
"behaviorsSharedData": []
}
],
"externalEvents": [],
"externalLayouts": [],
"externalSourceFiles": []
}