New marked map area functions
-
@waldron Sorry I don't understand the question
-
@pianofire sorry, say if i only want a characters state to action in certain areas.
so in my case i have a ladder so i press up to climb it but i dont want to be able to press up and enter the state anywhere only in those areas? -
So if you mark your ladder collision boxes as Ladder1, Ladder2 etc you could do something like this:
if detectMapAreaCollision( areaName, sprite ) then canClimb = strBeginsWith(areaName, "Ladder")
and then:
if (canClimb and c.y) then // move sprite up
-
wonderful thank you i presume i can access a lot of actions with this including getting text and sounds to play in certain areas this should keep me busy for a while
-
@pianofire That is awesome.
-
This post is deleted! -
@pianofire i must be doing something wrong am i missing anything? variable?
-
@waldron said in New marked map area functions:
@pianofire i must be doing something wrong am i missing anything? variable?
OK I was missing the area name variable but still not working.
-
@waldron sorry it was only a code snippet. Have a look at the checkCollisions function in the post at the top
areaNames = getMapAreaNames() for i = 0 to len(areaNames) loop areaName = areaNames[i] area = getMapArea( areaName ) if detectMapAreaCollision( areaName, sprite ) then
-
@pianofire I added that part still no joy il wait till iv got a bit more time on my hands maybe missing something silly