Not = positions on tilemap?
BlitzMax Forums/BlitzMax Beginners Area/Not = positions on tilemap?
| ||
Hi! In my game I have magnets which draw the player closer to them if the player is on the same position as them. I currently iterate through each magnet on screen with a loop but want to detect when the player isn't on any magnet at all. Example psuedo code For Local MagnetIter = 0 To Number Of Magnets If PlayerY is > MagnetYPos[MagnetIter] - 32 And < MagnetYpos[MagnetIter] DragPlayer = 1 Else DragPlayer = 0 EndIf Next If DragPlayer = 1 Move Player closer To magnet ElseIf DragPlayer = 0 Do nothing And keep player at position End If The problem I'm having is that if the player is not on 1 magnet position DragPlayer will = 0. So if I had 2 magnets stacked on top of eachother if the player is not on one of them DragPlayer will = 0. So, how would I go about checking if the player isn't on any magnets at all so that i can reset the movement? I hope this made sense. :) |
| ||
Set dragplayer to 0 before your loop, and delete the 'else dragplayer=0' out of the loop. |
| ||
Thanks dude. Worked like a charm :) |
| ||
No worries... BTW, what's your latest recommendation for a decent 3D engine to use with Max? |
| ||
Well, having tried nearly all of them I would definately say TV3D. It's just too good. It's pricey though but you get what you pay for. If you want a professional 3d Solution for Max and have the money to spend then definately Truevision3D. You can even test TV3D now with max. Just download TV3D 6.5 and Gabriels wrapper (free versions) and away you go. TV3D can be used freely, fully functioning but you can't sell anything with it or remove the TV3D watermark. This way you can test the whole engine to it's fullest and if you like it you could shell out for the single Product license or the multi product license. :) |
| ||
Thanks mate. I will give it a look. "Well, having tried nearly all of them..." That's why I asked! |
| ||
Hi Amon, do you have a link to Gabriels wraper page ? //Gnasher |
| ||
Hi, sorry for the late reply. The wrapper can be found at the bottom page in this link. http://www.glimmergames.com/index.php?categoryid=12 :) |
| ||
hehe Better late then newer, thank you Amon :) for me that is preaty new to BlitzMax , how hard is it to use TV3D in BMax.. do you have a small example how it would look when using TV3d :) Br Gnasher |
| ||
Hi Gnasher. Try these demos out. They need updating to the latest version of TV3D. All that's needed is to remove the refs to beta keys as these are no longer needed. http://www.kamikazekrow.com/storage/TV3D-MaxTuts.zip I think Gabriel mentioned that he'll be updating the tutorials for this version of TV3D. It would be best to email him and ask him how far along the tutorial updates have gone or if he's started on them at all. :) |
| ||
when you say to remove the refence to the beta key in them you mean just the "xxxx" or the whole row with with the command. these whole line or just the x ? TV3D.SetBetaKey ( "UserName", "XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX" ) TV3D.SetLicenseKey ( CTV_LICENSE_COMMERCIAL, "ProjectName", "XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX" ) //Gnahser |
| ||
Remove the whole SetLicense/setbeta commands. :) |
| ||
thank you amon, time to play now :) |