A* as a Stencyl extension (with basic sample) [ABANDONED]

stevehearn

  • Posts: 44
i keep getting a class error trying to run app. eg using 4th demo i get "Events for 'Target' (32) -  Class not found "

« Last Edit: July 05, 2014, 05:15:11 am by stevehearn »

FortySe7en

  • Posts: 304
Trying to rebuild old game that used A* with the new updated extension, I keep getting stuck at:
[...]/DecisionMaking.hx:75: characters 14-35 : com.stencyl.Engine has no field tileLayers

Any idea?

FortySe7en

  • Posts: 304
I've managed to fix it thanks to mr SadiQ who told me what to replace with what.
Attaching a version that works on 3.2

What I had to do is replace (around line 76 or so of decisionmaking.hx ):
Code: [Select]
var layer = engine.tileLayers.get(layerID); with
Code: [Select]
var layer = cast(engine.layers.get(layerID), Layer).tiles; and add this at the start (after 1st import command)
Code: [Select]
import com.stencyl.models.scene.Layer;

UnrealCanine

  • Posts: 243
Do we need to run the code as an event or can we attach it to a behaviour? Because in my game, sometimes I want NPC's to follow/target another NPC, and other times I want them to head to a specific point

Also, if the path is blocked entirely, do they do the best they can, or will they just give up?

UnrealCanine

  • Posts: 243


Any idea why this isn't working? It's on an behaviour attached to an actor.

WHen I had the 'get path' on an always block, he used moved left and right, now he doesn't move at all

laserhosen

  • *
  • Posts: 21
Does this extension no longer work with 3.3? All I get is a white scene whenever I try to test.

darrigaz

  • Posts: 124
Same. This seems to have broken since 3.3. Logs say something about
AppData\Roaming\Stencyl\stencylworks\engine-extensions/decision-making/DecisionMaking.hx:75: characters 14-35 : com.stencyl.Engine has no field tileLayers

DoctorMikeReddy

  • *
  • Posts: 180
I have applied the patches on Page 6 and 7 and this is working for v3.3.2