Loading sprites from a folder

Get help using Construct 2

Post » Mon Apr 01, 2013 7:41 pm

Hi!

Guys I am working on a game that will have lets say 100 items. Each item will be a sprite, right?

My question is, once I have a event on my game that says, character use sword ID1234, can I pull this sprite sword from a folder instead I have it preloaded in my game layout?

I would like to have a option to each time my character pickup a new weapon, my game read this event and load this image from a location instead I have hundreds images loaded already.

Hope you can understand my question.

Thanks!!!
B
8
Posts: 24
Reputation: 985

Post » Mon Apr 01, 2013 7:51 pm

If I'm understanding you correctly, you can save the images as project files, and load them via the "Load from URL" action.

Using project files in Construct 2
B
44
S
13
G
7
Posts: 338
Reputation: 10,379

Post » Mon Apr 01, 2013 8:00 pm

I have read what you sent me and I guess this it, but I could not figure how to make it here in my project lol

Do I need to add webstorage, Ajax or something else to my project?
B
8
Posts: 24
Reputation: 985

Post » Mon Apr 01, 2013 8:10 pm

All you should need to do is load the images as project files, and then call them using the Load image from URL action.

Project Files
zatyka2013-04-01 20:14:21
B
44
S
13
G
7
Posts: 338
Reputation: 10,379

Post » Mon Apr 01, 2013 8:29 pm

Thanks alot zatyka!

I will keep on reading it cause I did not figure it out yet. I guess I understood your explanation, I just need to figure how to make it work.

If you have any capx file as example I would appreciate alot, if not, no problem, I will learn this one way or other :P

Thanks!!!
B
8
Posts: 24
Reputation: 985

Post » Mon Apr 01, 2013 8:38 pm

B
44
S
13
G
7
Posts: 338
Reputation: 10,379

Post » Mon Apr 01, 2013 8:50 pm

Okkkkkk I was in the right path!

Let me understand that... doing this will make my capx goes larger in size, however my html website will only load the images when they needed right?

Another question, if instead a .jpg file I wish to add animation, should I create a .capx with only a animation inside?

Thanks alot zatyka!!! Very helpful!!!!!!!!!!!!
B
8
Posts: 24
Reputation: 985


Return to How do I....?

Who is online

Users browsing this forum: theosciandra and 25 guests