dimanche 5 avril 2015

Game Maker, Draw Command is drawing infinitely?

So I have 20 variables named fact[x] where x is from 0 to 19. I have this command under the Left_Released in an object called randomf:



if instance_exists(facts) {
with facts {instance_destroy()}
}
instance_create(x,1395,facts)


facts (object) has this code under draw:



draw_set_font(FedraS)
draw_set_colour(c_white)
draw_set_halign(fa_center)
draw_text_ext(room_width/2,y,randomf.fact[irandom(19)],48,room_width-32)


What is happening is that whenever I'm clicking on the object, it draw a random fact and then deletes it and then draws the next fact endlessly. Where am I going wrong?


thanks.





Aucun commentaire:

Enregistrer un commentaire