Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mixing variable types in a numerical calculation
(01-05-2021, 06:25 PM)patters Wrote: castleIntactAttr is the sum of the attributes for all four character positions occupied by the castle. It will be checked every increment of the cannon shot trajectories. If it changes, then the shot has hit the castle. However, depending on how fast the trajectory maths ends up once compiled, I may be able to use PLOTs instead of multiple DRAWs. If this is the case I can simply check the PLOT coordinates are not within box occupied by the castle characters and abandon this ATTR method.

Checking a point within a square region is definitely much faster and easy to implement. Also I don't understand why you just dont check ATTR position of the cannon itself? When it matches that of the castle you have a hit.

Messages In This Thread
RE: Mixing variable types in a numerical calculation - by boriel - 01-06-2021, 08:36 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)