Master Cabalist
Member
I have an object named PoisonObject. In it is a create event. In the create event is an instance that
reads attackTarget = noone. I have a piece of code calls upon the attackTarget in an event
BatParentObject. Note the if attackTarget == other.id. This is the error I'm getting.
above.
reads attackTarget = noone. I have a piece of code calls upon the attackTarget in an event
BatParentObject. Note the if attackTarget == other.id. This is the error I'm getting.
What happens, functional-wise, is the Forest Brain Object (of which it is a parent of BrainParentObject of) - when it collides the brains one of the two die and throw the errorif (mouse_check_button_released(mb_left))
{
//inst = instance_position(mouse_x, mouse_y, all)
inst = instance_position(mouse_x, mouse_y, BrainParentObject)
attackTarget = inst;
if distance_to_object(attackTarget)<attackRange
{
if (inst.object_index != BrainParentObject && inst.object_index != BatParentObject)
{
//end battle
attacking = false;
speed = 0;
path_speed = 0;
image_index = 0;
// move_towards_point(mouse_x, mouse_y, flyspeed);
with attackTarget
if attackTarget == other.id
decision_timer = room_speed+(image_number-image_index)*sprite_get_speed(sprite_index);
}
if(point_distance(x, y, inst.x, inst.y))
{
//sprite_index = global.party_walk;
sprite_index =global.party_still;
}
}
}
above.