village update 3( large pics)

Miscellaneous Forums/Blitz Showcase/village update 3( large pics)

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I made it over complicated for fun. say, you had just coins.

;by bot builder

Type bonus
 Field mesh,radius
End Type

Global coin_count

Dim keys_had(100)

Function updatebonuses()
 For b.bonus = Each bonus

  TurnEntity b\mesh,0,1,0	;give it some movement, let the player know it's a collectible

  If EntityDistance(player,b\mesh)<b\radius+player_radius Then ;when the distance is less than the player radius plus the collectible radius(max distance)

   FreeEntity b\mesh		;you could just use hideentity b\mesh, and skip the delete type
   Delete b.bonus

   coin_count=coin_count+1 ;global variable
  EndIf
 Next
End Function


I took out the fields relating to allowing object specifics, and took the whole select case system out, as we know it's just coins. If this is to complex, read the tuts, oh please read the tuts.