Problem with ImageManipulator [Construct 0.99.82]

For questions about using Classic.

Post » Tue Mar 09, 2010 4:10 pm

Hi,

The idea is simple: read a ini and create a instance for every item in the ini, with the sprites with the same name.



But there are a problem:

1) read ini - OK
2) create instances - OK
3) load images and put they in the correct instances - Don't work!




file:
http://hotfile.com/dl/31985280/f440bae/ ... e.rar.html
B
7
G
2
Posts: 14
Reputation: 1,078

Post » Tue Mar 09, 2010 4:14 pm

If I remember correctly, ImageManipulator doesn't behave nicely with Start on Layout.

Try Trigger Once instead of Start on Layout; that way the layout will load first, creating sprites, then the ImageManipulator will load images into sprite objects.

Let me know if it works!
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Tue Mar 09, 2010 4:39 pm

[quote="Mipey":1ea6pm4m]If I remember correctly, ImageManipulator doesn't behave nicely with Start on Layout.

Try Trigger Once instead of start Layout; that way the layout will load first, creating sprites, then the ImageManipulator will load images into sprite objects.

Let me know if it works![/quote:1ea6pm4m]
Don't work.
I try even with key_press event in ordert to avoid interference between Layout and ImageManipulator, but don't work.

It look so http://i48.tinypic.com/152dlkn.jpg whit "start Layout" or "Trigger Once" or "key_press".
B
7
G
2
Posts: 14
Reputation: 1,078

Post » Tue Mar 09, 2010 5:25 pm

Are you trying to load different images to the same sprite frame?
If you want multiple instances with different images you have to add multiple frames to the specific sprite, then change to a different frame when loading.
Just setting a private variable wont help unless you do something like compare private variable-> set frame
BTW sprite has a function for this already "Load animation frame from file".
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Tue Mar 09, 2010 6:41 pm

[quote="newt":3uyqoyxy]Are you trying to load different images to the same sprite frame?
If you want multiple instances with different images you have to add multiple frames to the specific sprite, then change to a different frame when loading.
Just setting a private variable wont help unless you do something like compare private variable-> set frame
BTW sprite has a function for this already "Load animation frame from file".[/quote:3uyqoyxy]
Good idea! :D

I try it and I have found a Construct BUG! :shock:




If you go to debug mode, press enter and after space, Construct crash!





the critical code is:

AppPath+"\Livello_1\oggetti\"+oggetto_generico.Value('nome')+"_SP.png"


cap file:
http://hotfile.com/dl/32002914/aa27e1b/BUG.rar.html
B
7
G
2
Posts: 14
Reputation: 1,078

Post » Tue Mar 09, 2010 7:20 pm

Not sure I followed that exactly, but here is a nice tutorial about putting multiple graphics into one object

http://www.youtube.com/watch?v=fNEx8bA_R0o
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Tue Mar 09, 2010 7:50 pm

[quote="Guyon":1hdhv0te]Not sure I followed that exactly, but here is a nice tutorial about putting multiple graphics into one object

http://www.youtube.com/watch?v=fNEx8bA_R0o[/quote:1hdhv0te]
Interesting!
I'm trying to build a level with same idea but automatically through a ini file.
B
7
G
2
Posts: 14
Reputation: 1,078


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest