- Home /
Question by
EdvinSoderman94 · Jul 26, 2012 at 06:28 PM ·
javascriptvariablefunctionpathfindingrts
adding multiple values to single function/variable.
For a pathfinding script written in unityscript/javascript. By using Nodes in an X*Y grid. The script is for a game much like age of empires. I am using the free verision of unity, but will upgrade to pro in some months.
How to create something like:
var Node(x,y,parent);
or:
function Node(x,y,parent);
and then assign the "holders" values to an array like this:
CurrentNode = new Node(x,y,parent);
OpenList.Add(CurrentNode);
Or is there some other way to do this?
Also, if you know any SIMPLE examplescripts of pathfinding in javascript plz send me the link to them! It would help alot!
Any help is greeted with love!
Tried to keep it as short as possible, hope you understand what I mean. //Edvin
Comment