#how can i do this?
1 messages · Page 1 of 1 (latest)
okey, what happend at start?
so if you know where you are in the world, you can check the array to see what's there
if you're learning specifically about colliders then you can ignore this and keep on as you were
Is this your code?
yes
this generate a map by tiles
I can change the comments for english to be easier to translate this code
no worries, it makes sense
when generating your map you can just construct the array too
how?
you can create the array variable without a size,
WorldTiles[,] myMap;
myMap = new WorldTiles[rows, columns];
and init the size at runtime
then when you make your city
myMap[randomX, randomY] = WorldTiles.CITY;
i think this is a little too hard for me
OK! good luck with your triggers. Arrays are great! I recommend you take a look some time.
firstly i think i should study how to make this stupid console log ;-;
what's the problem with the log?
when my hero jump to tile with city the log doesnt sent
show me the scene? the transform for the two objects you want to collide?
yes good, now can you show me the inspector for this game object when it is selected? (the knight)
ok and the town?
its alredy work 😄
ok great, what was the problem?
i shoulded write the code to city and when the city touch hero its send massage