2.15.0 issue
-
When the new update came my FTA game continued to work with a few Intermittent problems in the collision functions.
I have many almost identical CollideArea statements that some continue to work as before and others either don’t work or have a flashing graphics pattern.
So the character does a CollideArea with a map marked area of let’s say a door. The current map unloads and the a new map is loaded and the characters X Y position is made to the new loaded map.
CollideArea = detectMapCollision(“TambryDoor1”, character[character_no])
If CollideArea then
unloadMap()
LoadMap(“TambryInDoor1”)
centrePoint = {120, 150}
character[character_no].x = 120
character[character_no].y = 150
endifCollideArea = detectMapCollision(“TambryOutDoor1”, character[character_no])
If CollideArea then
unloadMap()
LoadMap(“Map1”)
centrePoint = {450, -25}
character[character_no].x = 450
character[character_no].y = -25
endifThis one for the first door works fine. However other ones almost identical give strange results like this one not allowing the collision unless I comment out at least one of the character[character_no] X Y statements like this:
CollideArea = detectMapCollision(“TambryDoor3”, character[character_no])
If CollideArea then
unloadMap()
LoadMap(“TambryInDoor3”)
centrePoint = {-180, 50}
//character[character_no].x = -180
character[character_no].y = 50
endifSo if I changed the character[character_no].x = 180
(Non negative value) it worked.
It had no effect negative or positive on character[character_no].y = -50
Then I went back to the working Tambry Door1 CollideArea and tried changing Both character position X and Y statements to negative and it continued to work.
Something is the problem on these in that TambryDoor 1,2, 4 work and the others don’t with different symptoms such as not allowing the collision at all or on trying to leave back to Map1 from TambryDoor5 you can’t, you just get a graphics flashing screen.
-
@tdg8934
PROBLEM: Sprite collision misbehaving
REASON: shape_box type sprite collision was being incorrectly calculated as being too small - fixed in 2.15.0
FIX: If setSpriteCollisionShape() is being used, adjust the width and height parameters to be slightly smaller. If only default collision shapes are being used, add setSpriteCollisionShape() with parameters to get the desired shape dimensions.i imagine your collision boxes are now to big and have to be reduced due to the patch
-
@waldron that did the trick!
I wasn’t using setSpriteCollisionShape before. As a test I first entered in:
character[i].show_collision_shape = trueI saw that there was a box around my character which not knowing better would think that’s ok for a body collision with the MapAreaCollision being a door.
Then I entered in:
setSpriteCollisionShape(character[i], Shape_box, 10, 10, 0, 0, 0)When playing the the game I saw the collision box that was around the characters body had decreased to a 10 by 10 size (roughly from his head to his mid section). I tried all the working and not working collisions again and everything worked again using the simple fix.
Thank you!
-
@tdg8934 your welcome and glad it's worked out it's not to bad to fix once youv fixed one collision just reduce the rest by the same amount, and now we have offsett collision boxes to which will be handy for your weapon attacks :)