Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / A Star - for AGK2 - help me coding it please :(

Author
Message
RifleRound
8
Years of Service
User Offline
Joined: 25th Jan 2016
Location:
Posted: 13th Mar 2016 11:04 Edited at: 13th Mar 2016 11:14
hello there...


soooooo

im trying desperately since yesterday to implement a Star and its not working....
soooo I wished I could find help here maybe.

sooo what i have right now is:


plattform[1].connectionToPlattformExists[2] //contains an integer, tells if Plattform 1 and Plattform 2 are connected (1 for connected, 0 for not connected)
plattform[1].connectionToPlattformLength[2] //contains an float, with the cost from Plattform 1 to 2

i also have:

getPlayerPlattform() //gets the plattform on which the player stands
getHeuristic(1,2) //returns the air-distance from plattform 1 to plattform 2


now....
what i need is an function which tells me to which Plattform I need to go next.
like this:

getNextPlattform(getPlayerPlattform(),aimPlattform) //i dont have this

sooo for example if the plattforms are arranged like:
1 --- 2 ---- 3 ---- 4 ---- 5 ---- 6---- 7--- 8---- 9
and my Player stands on Plattform 6 , and the aimplattform is 9
this function should return 7


this is my code:



well it keeps returning 0

and... well.... I dont know why and im debugging , but without a working debugger its hell ...

sigh..


RifleRound
8
Years of Service
User Offline
Joined: 25th Jan 2016
Location:
Posted: 13th Mar 2016 14:08
--- works already.... (solved)

i recoded everything :/

sooo if anyone is interested :

Login to post a reply

Server time is: 2024-11-25 10:23:04
Your offset time is: 2024-11-25 10:23:04