View Single Post
Quick Comments
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default Quick Comments - 03-02-2016, 09:13 PM

Short answer:

1) Remember the first unprinted rule of programming: The darn thing does exactly what you tell it to!

2) In Minimap Movement there is nothing to stop the "for all ..., one ... at a tiime" the loop when a match is found. So if you select Forward, and start at 15, the index changes to 16 and, since 16 matches the next entry it increases to 17 and so the MiniMap continues to update until the last element is reached.
3) I have found using 3D text as and mouse clicks together can be problematic. Sometimes the event is not fired at all and other times it only works if you click on the ink.
4) Make sure the camera is pointing where you want it before moving it. Remember it might not be where you originally set it.
5) Other things to look at:
Use opacity and isShowing for an object at the same time in not recommended. If you are not using transparency (opacity between 0 and 1) then stick with isShowing.
The position of the current object should be stored in a world variable otherwise you minimap method will always start at 15 regardless of the previous position of the triangle.

Finally I would recommend writing several "helper" functions to do things like:
  1. Set and clear isShowing for your controls so that it is easier to turn them on and off without missing controls.
  2. Functions to select the index of the next location. This involves using Mod() and if statements to keep the triangle within the allowed range.


Mark Henwood
mhenwood@ieee.org
   
Reply With Quote