#RPG HELP TRANSITION!
31 messages · Page 1 of 1 (latest)
interesting naming scheme, hm. does Obj_Warp have a sprite set? Is its visible tag true? Does the placed instance of WarpBlock_Object have creation code? Have you used debug messages to confirm that an instance is being created?
yes, obj_warp has a 16 frame sprite, it is visible, and warp_blockObject has a creation code that takes me to x, y and room name, but debug messages doesn't work
debug message don’t work?
where did you put them?
by don’t work do you mean nothing appears in your output console?
show_debug_message("Object created")
if room == target_room && image_index < 1
{
show_debug_message("Object destoryed")
instance_destroy();
}
recommended by another member
and your output console is empty?
yes
I also tried to ask the author of the tutorial for help, but he didn't answer me
Well, if your warp object's step event generates a debug message, and your output console has no debug messages, that's an unambiguously clear sign that you never create an instance of the warp object
if place_meeting(x,y, Obj_Player) && !instance_exists(Obj_Warp)
{
var inst= instance_create_depth(0, 0 -999, Obj_Warp)
inst.target_x = target_x;
inst.target_y = target_y;
inst.target_room = target_room
}
Which means this code never runs, this is never the case
Either this code is not in the event you said it's in, or there's something wrong with your collision masks making a place_meeting check impossible, or WarpBlock_Object is not actually in the room
should be a pretty simple matter at this point, going through each of those possibilities
In the end I solved it, it was a little problem, thanks all the same for helping me 🙂
oh, okay
can you help me?
can you help me with this another problem
I can’t really do anything without any information, sorry
i will give you now
So, I solved the animation problem, but now, when I change from room 2, to go back to room 1, it spits me to the left side
the code is the same
Warp object code, is, the object that makes the animation
target_y = 0;
target_room = 0;
Step
if room == target_room && image_index < 1
{
instance_destroy();
}
Draw
draw_sprite_tiled(sprite_index, image_index, 0,0)
Animation
room_goto(target_room);
Obj_Player.x = target_x;
Obj_Player.y= target_y;
image_speed = -1;
WarpBlock_Object, the one in green you see in the video
target_y = 0;
target_room = 0;
step
if place_meeting(x,y, Obj_Player) && !instance_exists(Obj_Warp)
{
var inst= instance_create_depth(0, 0, -999, Obj_Warp)
inst.target_x = target_x;
inst.target_y = target_y;
inst.target_room = target_room
}```
this is everything
ok?