1
Coding / Re: Small HTML Bug
« on: April 21, 2014, 10:53:54 am »
It's not an HTML error but a Javascript error, you have the Javascript functions calling ".accordion h3" elements, when they should be calling ".accordion img".
Looks too good to be on the Game maker 7...
In the object: objNew_File at the draw event you wrote the code:You do notice that with that code GM will be creating a font each step, right? With that code of yours he'd need to delete the font at the end of each step, which is terribly unefficient. In fact, it's better to place that code in the Create Event.Code: [Select]if not (variable_global_exists('font')) then global.font=font_add_sprite(spr_Text,'!',0,0);
draw_set_font(global.font);
change that to:Code: [Select]global.font=font_add_sprite(spr_Text,'!',0,0);
draw_set_font(global.font);
with (objlantern)
{
unique=false;
}
(instance_find(objlantern, floor(random(instance_number(objlantern))))).unique = true;
<div id="something"><image src="blah.yay"></div>
global.rupees = min(global.rupees + 1, global.rupeeMax);
var oldnum;
oldnum = global.roomnum;
if (is_moving_to_left) //you state the condition as I don't know how you do it
{
global.roomnum -= 1;
}
if (is_moving_to_right)
{
global.roomnum += 1;
}
if (is_moving_down)
{
global.roomnum += 6;
}
if (is_moving_up)
{
global.roomnum -= 6;
}
if (max(1, global.roomnum, min(30, global.roomnum)) == global.roomnum)
{
execute_string("room_goto(room" + string(roomnum) + ")");
}
else
{
with (o_player)
{
x = xprevious;
y = yprevious;
}
global.roomnum = oldnum;
}
background_assign(Tiling_bg, Nighttime_bg);
background_assign(Tiling_bg, Daytime_bg);
var i;
for (i = 0; i <= max_height_you_can_climb; i += 1)
{
if (place_free(x+your_speed, y+i))
{
x += your_speed;
y += i;
}
}