Pages: « 1 2
  Print  
Author Topic: Flipping, scaling and rotating instances  (Read 26313 times)
Offline (Unknown gender) TheExDeus
Reply #15 Posted on: August 03, 2014, 04:06:31 pm

Developer
Joined: Apr 2008
Posts: 1860

View Profile
Quote
I was thinking more from a programming point of view. I prefer that the user doesn't have to deal with this pre-creation code directly. I think it would be better that he modifies the fields values in the instance properties.
Ou that, that will work like in GM, where you just click and drag. There are many possibilities on how to present it to the user or even what options to add, but that is not the point of this topic.
Logged
Offline (Unknown gender) egofree
Reply #16 Posted on: August 04, 2014, 11:18:03 am
Contributor
Joined: Jun 2013
Posts: 601

View Profile Email
I did some tests. In the creation code of an instance, i tried the following properties, with different values :

image_xscale
image_yscale
image_alpha
image_angle (already reported by BreakDown)


They are not doing anything. In GM Studio, they work as expected.
« Last Edit: August 04, 2014, 11:25:03 am by egofree » Logged
Offline (Unknown gender) TheExDeus
Reply #17 Posted on: August 04, 2014, 12:35:06 pm

Developer
Joined: Apr 2008
Posts: 1860

View Profile
Quote
I did some tests. In the creation code of an instance, i tried the following properties, with different values :
Works for me. There is some bug that sometimes the creation code is not written out properly though. Like I add "image_angle = 90;" an it works fine, but when I add a second line "image_xscale = 2.0;", then only the first line is getting written to IDE_EDIT. Then I add some more lines and it writes them all out fine. Maybe something just didn't save correctly for me. The same if I delete the contents of the creation code, close the window and open it again - it is still there. So I have a feeling LGM has some kind of bug.

Quote
image_angle (already reported by BreakDown)
image_angle is fine. view_angle was broken.
Logged
Offline (Male) Goombert
Reply #18 Posted on: August 04, 2014, 04:39:31 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
What would help in this situation is for someone to post the contents of output_log.txt and we would know the exception that occurred.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) TheExDeus
Reply #19 Posted on: August 05, 2014, 03:07:22 am

Developer
Joined: Apr 2008
Posts: 1860

View Profile
LGM doesn't trow any exception and so the log doesn't show any. It just doesn't save the creation code correctly. At one point the button "Instance creation code" just stopped working and didn't open the code window anymore. But still not exceptions.
Logged
Offline (Unknown gender) egofree
Reply #20 Posted on: August 12, 2014, 11:27:56 am
Contributor
Joined: Jun 2013
Posts: 601

View Profile Email
I think i've finally found why the methods for scaling and rotating instances didn't seem to work in the creation code of an instance. It's because in my project the object has a draw event and a script with the following line :

Code: [Select]
draw_sprite(sprite_index,image_index,x,y);
This is a normal behavior, and it works the same in ENIGMA and GM.
« Last Edit: August 12, 2014, 02:35:19 pm by egofree » Logged
Offline (Unknown gender) TheExDeus
Reply #21 Posted on: August 12, 2014, 03:12:13 pm

Developer
Joined: Apr 2008
Posts: 1860

View Profile
Well that was a stupid mistake. :D But glad that got sorted. Now we just have to wait on the LGM room editor changes to support this though. :)
Logged
Offline (Unknown gender) time-killer-games
Reply #22 Posted on: August 13, 2014, 12:53:12 pm
"Guest"


Email
You forgot about image_blend but ince I don't use that in the room editor personally I could care less if that's added. As for scaling, that would be amazing. I look forward to using it (if it's ever added)
Logged
Offline (Unknown gender) egofree
Reply #23 Posted on: August 13, 2014, 02:07:29 pm
Contributor
Joined: Jun 2013
Posts: 601

View Profile Email
You forgot about image_blend but ince I don't use that in the room editor personally I could care less if that's added. As for scaling, that would be amazing. I look forward to using it (if it's ever added)

I started this morning to work on the image blending. Yesterday evening i've seen that in gmx files the alpha value is stored in the color code, so i told to myself that it would be better to take also into account the color. I am trying to see how to display correctly the image blending in the rooms editor with Java.
Logged
Offline (Male) Goombert
Reply #24 Posted on: June 15, 2016, 06:23:29 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
I just want to bump this topic because I don't like sweeping bugs under the rug and mention that I can not reproduce an issue with the instance creation code saving. I made an example project and first tested the image_alpha and ran it, worked fine. I then added a second line to set image_angle and it worked fine. I did not close and save the instance creation code, I left it open the whole time. So it seems to not be an issue with the current master, may have been an issue in the old LGM or else it's related to the IDE_* file stuffs.
« Last Edit: June 15, 2016, 06:26:37 pm by BlitzBert » Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Pages: « 1 2
  Print