• entries
208
383
• views
66190

# Pathing

133 views

In the first version of JavaTactics that was posted (still downloadable above...) I had something that I was calling paths. Now these aren't the paths found to for moving from one side of the map to another, but rather for moving in between one tile. Its a set of nodes that have relative pixel locations based on time duration.

Path aPath = new Path(1 1,1);//CREATES A NEW PATH WITH ID 1, AND FINAL MOVE COORDS TO dx=1 AND dy=1aPath.createNode(0,0,100);aPath.createNode(2,1,100);aPath.createNode(4,2,100);aPath.createNode(6,3,100);aPath.createNode(8,4,100);aPath.createNode(10,5,100);aPath.createNode(12,6,100);aPath.createNode(14,7,100);aPath.createNode(16,8,100);aPath.createNode(18,9,100);aActor.attachPath(1);//ATTACHES PATH 1 TO THE ACTORaActor.activate() {   getPath(path).start()}

Following this method it is really easy to make new movement for our actors. From jumps to simple moving.

The problem that I'm having is with my event system in the new version...but should have that fixed by tonight.

There are no comments to display.

## Create an account

Register a new account