Jump to content
Tankbuster

setMarkerPolyLine anyone tried it?

Recommended Posts

https://community.bistudio.com/wiki/setMarkerPolyline

I went into dev build earlier to have a little play with this (I've got a lot of use for isNotEqualto as well, but that's for another day) the biki page says it needs 4 elements in the array. The first 2 elements are the pos of the start of the line, the next two are the end of the line, but markerPolyLine returns a 6 element array, the last 2 being a pos near the end of the line. I can add elements to the array and send it back to setMarkerPolyLine to get straight lines with turns in it, that's all great.

The biki says setMarkerPolyline requires 4 elements but if it has any less than 6, the line disappears, though allMarkers still has it.

Do we know why the array has these 2 apparently spuroius elements on the end?

Share this post


Link to post
Share on other sites

Interesting! To clarify, it requires at least four elements, and the number of elements/array count must be divisible by four. So 4,8,12,16,etc. The question of why remains. 

Share this post


Link to post
Share on other sites

I've worked out why extra pos on the end of the line is. It's me letting go of the keys/mouse button in the wrong order which makes the game add another very short line to the end of the main one.

  • Like 1

Share this post


Link to post
Share on other sites

This sounds awesome! I've been doing custom markers with drawTriangle for a while, but it's fairly high maintenance - this sounds like a much cleaner way of doing it

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×