Enemy not working plz help

{"data":{"behavior":{"v":"2","nodes":[{"inputCount":2,"outputCount":2,"name":"Proximity","behaviorType":"logic.components.Prox2","x":270,"y":256,"group":"","id":"7289466438833c47","notes":null,"n_o":null,"targetEntityId":0,"threshold":250,"targetClassId":13361371,"nearestOnly":false,"firstObject":true,"allObjects":false,"contains":false,"shape":0},{"inputCount":0,"outputCount":1,"name":"Always","behaviorType":"logic.triggers.Always","x":90,"y":288,"group":"","id":"728946655ef2224b","notes":null,"n_o":null},{"inputCount":3,"outputCount":1,"name":"Random","behaviorType":"logic.logic.Random","x":270,"y":352,"group":"","id":"72894665d7f10849","notes":null,"n_o":null,"min":0,"max":360},{"inputCount":2,"outputCount":2,"name":"Rotation","behaviorType":"logic.properties.Rotation","x":450,"y":352,"group":"","id":"7289466541effa4e","notes":null,"n_o":null},{"inputCount":0,"outputCount":1,"name":"Once","behaviorType":"logic.triggers.Once","x":90,"y":352,"group":"","id":"72894665118ef647","notes":null,"n_o":null,"resetOnLevelStart":false},{"inputCount":3,"outputCount":1,"name":"Switch","behaviorType":"logic.logic.Switch","x":270,"y":480,"group":"","id":"72894666ebd77e40","notes":null,"n_o":null,"_startVal":0,"dataType":2},{"inputCount":1,"outputCount":1,"name":"Extractor","behaviorType":"logic.properties.Extractor","x":450,"y":576,"group":"","id":"7289466681324245","notes":null,"n_o":null,"targetId":341630744,"prop":"y"},{"inputCount":1,"outputCount":1,"name":"Extractor","behaviorType":"logic.properties.Extractor","x":450,"y":480,"group":"","id":"72894666ec863a4e","notes":null,"n_o":null,"targetId":341630744,"prop":"x"},{"inputCount":2,"outputCount":1,"name":"PointAt","behaviorType":"logic.components.PointAt","x":630,"y":512,"group":"","id":"7289466748bd2245","notes":null,"n_o":null},{"inputCount":0,"outputCount":1,"name":"Collision","behaviorType":"logic.triggers.Collision","x":90,"y":96,"group":"","id":"72894667d49d304e","notes":null,"n_o":null,"targetClassId":13361799,"targetEntityId":0,"collisionFilter":15,"collideWithEntity":false,"delay":0},{"inputCount":1,"outputCount":1,"name":"Destroyer","behaviorType":"logic.components.Destroyer","x":630,"y":-32,"group":"","id":"728946677dff0243","notes":null,"n_o":null},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":450,"y":256,"group":"","id":"72894667d3987449","notes":null,"n_o":null,"startVal":3,"tag":"","roundMode":1},{"inputCount":3,"outputCount":3,"name":"Velocity","behaviorType":"logic.properties.Physics","x":630,"y":256,"group":"","id":"728946684061c34f","notes":null,"n_o":null},{"inputCount":3,"outputCount":2,"name":"Animation","behaviorType":"logic.properties.Animation","x":450,"y":128,"group":"","id":"7289466858cd5447","notes":null,"n_o":null,"animationName":"Walking","loop":null,"playAll":null,"priority":null,"lastFrameSticky":null},{"inputCount":3,"outputCount":1,"name":"Switch","behaviorType":"logic.logic.Switch","x":270,"y":160,"group":"","id":"72894668e0c5f741","notes":null,"n_o":null,"_startVal":1,"dataType":2},{"inputCount":3,"outputCount":2,"name":"Animation","behaviorType":"logic.properties.Animation","x":450,"y":-64,"group":"","id":"72894668adfae04f","notes":null,"n_o":null,"animationName":"Dead","loop":null,"playAll":null,"priority":0,"lastFrameSticky":true},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":90,"y":192,"group":"","id":"72894668d6e17c4f","notes":null,"n_o":null,"startVal":8,"tag":"","roundMode":1},{"inputCount":3,"outputCount":1,"name":"Switch","behaviorType":"logic.logic.Switch","x":-90,"y":192,"group":"","id":"728946688bc5ab48","notes":null,"n_o":null,"_startVal":0,"dataType":2},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":90,"y":0,"group":"","id":"72894668552e4346","notes":null,"n_o":null,"startVal":0,"tag":null,"roundMode":1},{"delay":3,"count":1,"version":2,"inputCount":3,"outputCount":1,"name":"Timer","behaviorType":"logic.triggers.Timer","x":-90,"y":64,"group":"","id":"72894669bf4a3141","notes":null,"n_o":null},{"inputCount":3,"outputCount":1,"name":"Switch","behaviorType":"logic.logic.Switch","x":90,"y":480,"group":"","id":"728946692fe12e43","notes":null,"n_o":null,"_startVal":1,"dataType":2},{"inputCount":3,"outputCount":1,"name":"Switch","behaviorType":"logic.logic.Switch","x":270,"y":-32,"group":"","id":"72894669f8d7d743","notes":null,"n_o":null,"_startVal":1,"dataType":2},{"inputCount":4,"outputCount":2,"name":"Position","behaviorType":"logic.properties.Position","x":630,"y":160,"group":"","id":"72894669569c4848","notes":null,"n_o":null,"pixelUnits":true,"resetVelocity":false}],"links":[{"input_id":"7289466438833c47i1","output_id":"728946655ef2224bo0"},{"input_id":"72894668e0c5f741i2","output_id":"7289466438833c47o0"},{"input_id":"72894667d3987449i1","output_id":"7289466438833c47o0"},{"input_id":"72894666ebd77e40i1","output_id":"7289466438833c47o0"},{"input_id":"728946688bc5ab48i2","output_id":"728946655ef2224bo0"},{"input_id":"728946692fe12e43i2","output_id":"728946655ef2224bo0"},{"input_id":"72894665d7f10849i0","output_id":"72894665118ef647o0"},{"input_id":"7289466541effa4ei0","output_id":"72894665d7f10849o0"},{"input_id":"7289466541effa4ei0","output_id":"72894665d7f10849o0"},{"input_id":"72894665d7f10849i0","output_id":"72894665118ef647o0"},{"input_id":"72894666ebd77e40i2","output_id":"728946692fe12e43o0"},{"input_id":"72894666ec863a4ei0","output_id":"72894666ebd77e40o0"},{"input_id":"7289466681324245i0","output_id":"72894666ebd77e40o0"},{"input_id":"7289466681324245i0","output_id":"72894666ebd77e40o0"},{"input_id":"7289466748bd2245i1","output_id":"7289466681324245o0"},{"input_id":"72894666ec863a4ei0","output_id":"72894666ebd77e40o0"},{"input_id":"7289466748bd2245i0","output_id":"72894666ec863a4eo0"},{"input_id":"7289466748bd2245i0","output_id":"72894666ec863a4eo0"},{"input_id":"7289466748bd2245i1","output_id":"7289466681324245o0"},{"input_id":"72894669f8d7d743i2","output_id":"72894667d49d304eo0"},{"input_id":"72894668552e4346i1","output_id":"72894667d49d304eo0"},{"input_id":"72894669bf4a3141i0","output_id":"72894667d49d304eo0"},{"input_id":"7289466858cd5447i1","output_id":"72894667d49d304eo0"},{"input_id":"72894668e0c5f741i0","output_id":"72894667d49d304eo0"},{"input_id":"728946692fe12e43i0","output_id":"72894667d49d304eo0"},{"input_id":"72894667d3987449i0","output_id":"72894668552e4346o0"},{"input_id":"728946684061c34fi2","output_id":"72894667d3987449o0"},{"input_id":"728946684061c34fi2","output_id":"72894667d3987449o0"},{"input_id":"728946684061c34fi2","output_id":"72894668552e4346o0"},{"input_id":"7289466858cd5447i0","output_id":"72894668e0c5f741o0"},{"input_id":"7289466858cd5447i1","output_id":"72894667d49d304eo0"},{"input_id":"72894668e0c5f741i0","output_id":"72894667d49d304eo0"},{"input_id":"7289466858cd5447i0","output_id":"72894668e0c5f741o0"},{"input_id":"72894668adfae04fi0","output_id":"72894669f8d7d743o0"},{"input_id":"72894668d6e17c4fi1","output_id":"728946688bc5ab48o0"},{"input_id":"72894669569c4848i3","output_id":"72894668d6e17c4fo0"},{"input_id":"728946688bc5ab48i1","output_id":"72894669bf4a3141o0"},{"input_id":"728946688bc5ab48i2","output_id":"728946655ef2224bo0"},{"input_id":"72894668d6e17c4fi1","output_id":"728946688bc5ab48o0"},{"input_id":"72894668552e4346i1","output_id":"72894667d49d304eo0"},{"input_id":"72894667d3987449i0","output_id":"72894668552e4346o0"},{"input_id":"728946684061c34fi2","output_id":"72894668552e4346o0"},{"input_id":"72894669bf4a3141i0","output_id":"72894667d49d304eo0"},{"input_id":"728946688bc5ab48i1","output_id":"72894669bf4a3141o0"},{"input_id":"728946692fe12e43i0","output_id":"72894667d49d304eo0"},{"input_id":"728946692fe12e43i2","output_id":"728946655ef2224bo0"},{"input_id":"72894666ebd77e40i2","output_id":"728946692fe12e43o0"},{"input_id":"72894669f8d7d743i0","output_id":"72894669f8d7d743o0"},{"input_id":"72894669f8d7d743i2","output_id":"72894667d49d304eo0"},{"input_id":"72894668adfae04fi0","output_id":"72894669f8d7d743o0"},{"input_id":"72894669f8d7d743i0","output_id":"72894669f8d7d743o0"},{"input_id":"72894669569c4848i3","output_id":"72894668d6e17c4fo0"}]}}}

I not sure why its not working, @ManiacPumpkin this is
a modified version of your code, maybe you can help?

1 Like

Screenshots are usually more helpful because sometimes people can figure it out by glancing at them. Also, context on what you want it to do would be useful

1 Like

It’s supposed to chase the player


@CodeAlpaca

You should make it so when you hit one of those dead bodies, and hit it again it doesn’t replay the animation with a switch.

Well, which entity did you grab it from? I have it set different for each one.

Also your game is a platformer. The code is for a top down enemy chase.

1 Like

No,I got the code from rebirth

Those bug enemies are still based for a top down movement since they are technically on the wall.

in case you wanted AI, here is the AI I used to make my enemies move.

1 Like

You could’ve just used the same Velocity block instead of 2, but its cool.

1 Like