B
Brian Deckman
Guest
This is driving me nuts for the past week!
Parent child relationship no longer - 5 separate objects in room.
Edited this from original post - took out all the debug, and simplified.
Event: Create
// First FIND all Player villages (old parent) global.temp_list[xxx,yyy ] seeds properly.
var xxx = 0;
var yyy = 100;
var zzz = 0;
for (zzz = global.Village_Count; zzz > 0 ; zzz -= 1)
{
if (global.Village_Array[yyy,8] = global.Player_Name)
{
global.temp_list[xxx,0] = global.Village_Array[yyy,1] // village number
global.temp_list[xxx,1] = global.Village_Array[yyy,2] // village name
xxx += 1
yyy -= 1
}
}
global.yyyy = yyy + 1
return global.temp_list
- - - - - - - - - - - - - - - - -
obj-Next
Event: Left Button
global.xxxx += 1
if global.xxxx >100
{
global.xxxx = 99
}
- - - - - - - - - - - - - - -
obj_Prev
Event: Left Button
global.xxxx -= 1
if global.xxxx < 0
{
global.xxxx = 1
}
Push :: Execution Error - Variable Index [46,1] out of range [500,0] - -5.temp_list(100017,1472001)
at gml_Object_obj_Village_Name_DrawEvent_1 (line 3) - draw_text(x + 10,y,global.temp_list[global.xxxx,1]);
Now the push error tells me global.temp_list [global.xxxx,1] fails.
I am getting a global.xxxx value of 37,32,37,41,36,39,32,57,91,100,,,,, after depressing the left mouse button (yes I have ran it that many times this morning!)
after I rerun after failure, to test what the value of global.xxxx
There is no rhyme or reason for this!
global.xxxx should only increment or decrement by 1 after each depression of left mouse button.
What am I missing? HELP!
Just changed global.xxxx to lives. There is something amiss! With lives draw shows massive "jumps" in increment/decrement!
tested this code 7/15/2016
//
obj_Next
if (mouse_check_button_pressed(mb_left))
{
lives += 1
}
This is the only code for these objects. no change in outcome. (obj_prev subtracts 1 by code - not working)
Moved to Create Event - activates with any mouse depression within room - but yes by only 1. There is a hint here - now I must figure it out! frustration overload!
Parent child relationship no longer - 5 separate objects in room.
Edited this from original post - took out all the debug, and simplified.
Event: Create
// First FIND all Player villages (old parent) global.temp_list[xxx,yyy ] seeds properly.
var xxx = 0;
var yyy = 100;
var zzz = 0;
for (zzz = global.Village_Count; zzz > 0 ; zzz -= 1)
{
if (global.Village_Array[yyy,8] = global.Player_Name)
{
global.temp_list[xxx,0] = global.Village_Array[yyy,1] // village number
global.temp_list[xxx,1] = global.Village_Array[yyy,2] // village name
xxx += 1
yyy -= 1
}
}
global.yyyy = yyy + 1
return global.temp_list
- - - - - - - - - - - - - - - - -
obj-Next
Event: Left Button
global.xxxx += 1
if global.xxxx >100
{
global.xxxx = 99
}
- - - - - - - - - - - - - - -
obj_Prev
Event: Left Button
global.xxxx -= 1
if global.xxxx < 0
{
global.xxxx = 1
}
Push :: Execution Error - Variable Index [46,1] out of range [500,0] - -5.temp_list(100017,1472001)
at gml_Object_obj_Village_Name_DrawEvent_1 (line 3) - draw_text(x + 10,y,global.temp_list[global.xxxx,1]);
Now the push error tells me global.temp_list [global.xxxx,1] fails.
I am getting a global.xxxx value of 37,32,37,41,36,39,32,57,91,100,,,,, after depressing the left mouse button (yes I have ran it that many times this morning!)
after I rerun after failure, to test what the value of global.xxxx
There is no rhyme or reason for this!
global.xxxx should only increment or decrement by 1 after each depression of left mouse button.
What am I missing? HELP!
Just changed global.xxxx to lives. There is something amiss! With lives draw shows massive "jumps" in increment/decrement!
tested this code 7/15/2016
//
obj_Next
if (mouse_check_button_pressed(mb_left))
{
lives += 1
}
This is the only code for these objects. no change in outcome. (obj_prev subtracts 1 by code - not working)
Moved to Create Event - activates with any mouse depression within room - but yes by only 1. There is a hint here - now I must figure it out! frustration overload!
Last edited by a moderator: