Object Problem

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
Danny769
Posts: 55
Joined: Wed Feb 01, 2006 12:29 pm

Object Problem

Post by Danny769 »

How would i unselect the TownCenter by clicking a part of the background, and by clicking on another object

Its a Port of AOE2

Code: Select all

   if &#40; &#40;TownCenter&#91;1&#93;.X+TownCent&#58;width&#40;&#41; >= cursorX&#41; and &#40;TownCenter&#91;1&#93;.X <= cursorX+cursor&#58;width&#40;&#41;&#41; &#41; then 
      if &#40; &#40;TownCenter&#91;1&#93;.Y+TownCent&#58;height&#40;&#41; >= cursorY&#41; and &#40;TownCenter&#91;1&#93;.Y <= cursorY+cursor&#58;height&#40;&#41;&#41; &#41; then 
	TownCenter&#91;1&#93;.Select = 1
      end 
   end
All it needs to do is make Select = 0
Post Reply