K
KekkoKamen
Guest
Ok,
Every frame, I'm creating an animation curve and I destroy it after it's been used in the draw event. The reason for that, is that I feed the curve updated values every frames, and draw that curve in the draw event.
In summary, every frame, I create an animation curve and destroy it after it has been used.
While I run the game, it works perfectly, the curve is drawn like I need it to. But when I restart the room using room_restart(), I get a code error in the step event saying that it could not create curve.
I figured that maybe when restarting the room in the step event the curve was not getting destroyed since it only happens in the draw event, so I added animcurve_destroy(my_curve) just before the room is restarted. After doing that, it got weirder, because now I can restart the room but only once, if I restart it twice I get that same code error as before.
When restarting a room, shouldn't everything in the room starts anew ? I don't uses globals, it's the only room in the program. I don't understand why it wouldn't work.
Every frame, I'm creating an animation curve and I destroy it after it's been used in the draw event. The reason for that, is that I feed the curve updated values every frames, and draw that curve in the draw event.
In summary, every frame, I create an animation curve and destroy it after it has been used.
While I run the game, it works perfectly, the curve is drawn like I need it to. But when I restart the room using room_restart(), I get a code error in the step event saying that it could not create curve.
I figured that maybe when restarting the room in the step event the curve was not getting destroyed since it only happens in the draw event, so I added animcurve_destroy(my_curve) just before the room is restarted. After doing that, it got weirder, because now I can restart the room but only once, if I restart it twice I get that same code error as before.
When restarting a room, shouldn't everything in the room starts anew ? I don't uses globals, it's the only room in the program. I don't understand why it wouldn't work.