S
ShadowLenz
Guest
hi! i'm currently making an RPG and when i established the movement, and solids collision, the firs room map and else,
was the time for a new room, so i created a second room, and when i created: the obj_next and obj_last (for tracking back to the previous room)
and go to the "step event" of obj_character.
(obviously the are other few variables but it's to much to read, this only matters)
obj_character goes like this:
STEP_EVENT:
///colission with obj_solid
if (instance_place (x+hort_veloc, y, obj_solid)) { hort_veloc = 0; }
if (instance_place (x, y+vert_veloc, obj_solid)) { vert_veloc = 0; }
else
contact = instance_place (x+hort_veloc, y, obj_solid);
if (contact) {
if (contact.colission == true) {
hort_veloc = 0;
}
}
by this far was perfect, no problem or errors but when i add the event to collide whit the obj_next
///go nxt room
permit = instance_place(x , y, obj_entry);
with (permit) {
if (room_exists (map)) {
other.thexit = thexit;
room_goto (map);
}
else
show_message ("error map bad: " + permit.map);
}
(also in the map the obj_next have creation code)
So i launch the game and this came out
Variable obj_entry.colission(100009, -2147483648) not set before reading it.
at gml_Object_character_obj_StepNormalEvent_4 (line 15) - if (contact) { if (contact.colission) vert_veloc = 0; }
only when i add this the game does not work.
was the time for a new room, so i created a second room, and when i created: the obj_next and obj_last (for tracking back to the previous room)
and go to the "step event" of obj_character.
(obviously the are other few variables but it's to much to read, this only matters)
obj_character goes like this:
STEP_EVENT:
///colission with obj_solid
if (instance_place (x+hort_veloc, y, obj_solid)) { hort_veloc = 0; }
if (instance_place (x, y+vert_veloc, obj_solid)) { vert_veloc = 0; }
else
contact = instance_place (x+hort_veloc, y, obj_solid);
if (contact) {
if (contact.colission == true) {
hort_veloc = 0;
}
}
by this far was perfect, no problem or errors but when i add the event to collide whit the obj_next
///go nxt room
permit = instance_place(x , y, obj_entry);
with (permit) {
if (room_exists (map)) {
other.thexit = thexit;
room_goto (map);
}
else
show_message ("error map bad: " + permit.map);
}
(also in the map the obj_next have creation code)
So i launch the game and this came out
Variable obj_entry.colission(100009, -2147483648) not set before reading it.
at gml_Object_character_obj_StepNormalEvent_4 (line 15) - if (contact) { if (contact.colission) vert_veloc = 0; }
only when i add this the game does not work.
Last edited by a moderator: