R
Ryscale
Guest
Hello everyone
Firstly I would like to introduce to you my problem, at first i was using a line of code which was for a object to go to point A and go to point B( point A and B are objects). There are multiple Point B's in the map near one another but the object only picks 1 the same one every time.
Now that i added a picker which choose's the ID of a flower and does the exact thing but now its just broke, below is the code.
>>>>>>>>>>>>>>I added this within my create event..
flower1 = inst_4D092D21;
flower2 = inst_536C30F0;
picker = choose(flower1, flower2);
>>>>>>>>>>>>>and this is the step event
///moving to flower
if (land = false and start = true) {
direction = point_direction(x,y,picker.x,picker.y);
}
///if collide with flower move to hive
if (land = false and place_meeting (x,y,picker)){
land = true;
start = false;
}
///moving to beehive
if (land = false and start = false){
direction = point_direction(x,y,o_bee_col.x,o_bee_col.y);
}
///if collide with hive move to flower
if (land = false and place_meeting (x,y,o_bee_col)){
land = true;
start = true;
}
///timer
if (land = true){
speed = 0;
if (timer == 0){
land = false;
speed = 1;
picker = choose(flower1, flower2);
}
}
>>>>>>>>>>>>>>>>alarm 0 event
alarm[0] = irandom_range(5,15);
if (land = true){
timer -= 1;
}
Firstly I would like to introduce to you my problem, at first i was using a line of code which was for a object to go to point A and go to point B( point A and B are objects). There are multiple Point B's in the map near one another but the object only picks 1 the same one every time.
Now that i added a picker which choose's the ID of a flower and does the exact thing but now its just broke, below is the code.
>>>>>>>>>>>>>>I added this within my create event..
flower1 = inst_4D092D21;
flower2 = inst_536C30F0;
picker = choose(flower1, flower2);
>>>>>>>>>>>>>and this is the step event
///moving to flower
if (land = false and start = true) {
direction = point_direction(x,y,picker.x,picker.y);
}
///if collide with flower move to hive
if (land = false and place_meeting (x,y,picker)){
land = true;
start = false;
}
///moving to beehive
if (land = false and start = false){
direction = point_direction(x,y,o_bee_col.x,o_bee_col.y);
}
///if collide with hive move to flower
if (land = false and place_meeting (x,y,o_bee_col)){
land = true;
start = true;
}
///timer
if (land = true){
speed = 0;
if (timer == 0){
land = false;
speed = 1;
picker = choose(flower1, flower2);
}
}
>>>>>>>>>>>>>>>>alarm 0 event
alarm[0] = irandom_range(5,15);
if (land = true){
timer -= 1;
}