Aargh! Wrong start button!

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
kaypy
Artisan
Posts: 171
Joined: Sun Jan 19, 2014 7:11 am

Aargh! Wrong start button!

Post by kaypy »

It is now official: I have clicked the wrong start button too many times.

Code: Select all

local front_door_noclick=3
function front_door_click(x, y, b)
	if (b == 1) then
	    if (x > 488 and x < 512) then
	        if (y > 114 and y < 138) then
	        	dsb_sound(snd.click)
	        		-- dont start a new game unless we really mean it
				if (gt_savegames == 0 or front_door_noclick < 1) then
					gt_doorstate = 0.1
					return 999
				end
				front_door_noclick=front_door_noclick-1
			end

	        if (y > 178 and y < 202) then
	            if (gt_savegames > 0) then
	                dsb_sound(snd.click)
	                return 1
				end
			end

	        if (y > 242 and y < 266) then
				return 2
			end
		end
	end
	return nil
end
Friends don't let friends eat worm round
Post Reply