How do I Import IMAGE to a Sprite?

  • Any true programmer knows this short combination of characters by heart!

    Others (like me) can google something like "URI smallest image" and copy-paste it from stackoverflow.

    As a non-programmer I have no clue what is URI, so I would never even search for it.

    when I did search for unload image on the official C3 manual, I didn't get what I was looking for.

    The reason I sucked into C3 is because their motto was that it's for non-programmers... like myself.

    And if there are so many ready-do-use actions with few clicks, I don't see any reason why this and other actions are so hard to get. and I already know if I'll suggest this or other features, I'll get an answer that will cancel my argument anyway, so I don't bother suggesting officially, it's just to make a point as a user. :)

    But don't get me wrong, the FORUMS, this community is amazing especially thanks to people like yourself dop2000 and I'm grateful for this.

  • I still don't know how to unload the image, I didn't found any unload option while exploring it,

    Can anyone please show me how to do that via screenshot so I can follow ?

    Normally unloading a single object has negligible impact on memory use. Do you have measurements showing this is necessary? If not, it's probably a waste of time worrying about minor cases like this.

    If you find that the memory difference really does matter, the built-in way to unload images is to destroy all instances of the object, then use the Unload object images system action.

  • I'm giving my users the option to load and if they want to unload that image to a specific sprite, so they can still see the layers behind (built-in background that will come with the software) that's the reason I need to unload an image without destroying the sprite who holds it.

    The memory was something I was worried about but not the main issue and you explained it's not a big deal so that's good news for my purpose. :)

    Still, this unload image procedure is something very complicated for any non-programmer to find or even understand unlike other simple actions in C3. I hope that you'll consider to add more simple action to unload an image with just a few clicks like some other actions in C3.

    OFF-TOPIC:

    As I mentioned before, this is a good example of why I'm not bothering to suggest ideas/features or improvements to C3 anymore.

    Dear Ashley I'm not here to complain, but I hope that one day you'll look from the non-programmers / beginners eyes who like in my case: A low-level C3 user who still cannot understand many programming terms that for others are obvious.

    Taking for granted that EVERYONE knows basic programming terms is not very inviting or encouraging.

    What I'm saying is that in order to accomplish some tasks in C3 I'm looking for the "Human-Like" terms which are very friendly logical way of things which is the main reason why I like C3 for the most part.

    But to be honest many simple things such as unloading an image from a sprite... could be done with just another action on for ease of use for us... none-programmers to understand, and there are many other things that could be simplify.

    Thanks to this amazing forums I found different solutions to different issues :)

    It's the best way for me to learn as I'm working on an actual project but still considering... I'm not a programmer, my brain have it's limits (a gentle way to say: "I'm not smart as you guys")

    I'm just an animator with a basic logical-thinking who originally migrate from "Clickteam's Fusion" to Construct 3 and fall in love! :)

    Sorry about my bad English and for the off-topic, I felt like sharing my opinions.

  • There already is a built-in way to unload an image, which I just described. I don't see why you can't just use that. If you want to revert to some default image, just destroy the sprite, unload it, then put some stock image in its place with a different sprite object. If it's already easily doable, why does there need to be any new feature to cover it? As a small team with limited resources, thousands of bug reports and hundreds of other feature requests, suggestions would have to need a really good reason to motivate them, and I don't see why the existing feature doesn't cover what you want here. Don't jump straight to a feature request before properly considering the alternatives... or if the engine actually fully supports that already!

  • There already is a built-in way to unload an image, which I just described. I don't see why you can't just use that. If you want to revert to some default image, just destroy the sprite, unload it, then put some stock image in its place with a different sprite object. If it's already easily doable, why does there need to be any new feature to cover it? As a small team with limited resources, thousands of bug reports and hundreds of other feature requests, suggestions would have to need a really good reason to motivate them, and I don't see why the existing feature doesn't cover what you want here. Don't jump straight to a feature request before properly considering the alternatives... or if the engine actually fully supports that already!

    I think you don't understand exactly what I'm trying to do because of my bad English so I can't blame you or anyone for that but only myself, believe me I'm trying hard as I can to be clear.

    Also I'm not against you Ashley or Scirra team, I'm terribly sorry if it sounds like that... I'm here with MUCH LOVE and good vibes only! :)

    My sprite is already on the layout on a specific size, I don't want to destroy it.

    It's first frame is empty, this is where the LOADED image will be placed (from my understanding).

    All I need is to CLEAR it or REMOVE or UNLOAD from that specific frame and not just the option to replace with another, it is very important in my project that it can get back to empty frame since there are Layers behind it with built-in backgrounds that needs to be seen and change viability is not a solution for what I'm looking for.

    And my point again, what you described may be helpful... maybe even the solution, but I didn't understand even where that UNLOAD IMAGE action you said is already built-in because I couldn't find it.

    Thanks to dop2000 (you rocks!) I just used the very long characters under the URI section and it did the job for my solution, all I'm saying is... instead of that URI mystery (for a non-programmers like myself) I wish I could find that "UNLOAD IMAGE FROM SPRITE" action that I still can't find... maybe it's hidden somewhere obvious that I missed, but since you're saying it is already built in C3 so I'm still looking maybe I'll find it under a different object and not under the related sprite object.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • All I need is to CLEAR it or REMOVE or UNLOAD from that specific frame and not just the option to replace with another, it is very important in my project that it can get back to empty frame

    This doesn't make sense. You first say that you don't want to replace it, but then you say you want to go back to an empty frame, which means replacing it with a transparent image.

    I think you are confusing "unloading" with "replacing with a smaller image to save memory". They're not exactly the same thing. The System object can unload object images. If instead you want to replace a sprite frame with a different image, another way of doing that without having to use obscure data URL strings, is just to create a small Drawing Canvas object, clear it, and save the image. Then you can load the SavedImageURL in to the Sprite object. This also has the benefit that you could draw any content at all in the Drawing Canvas object (e.g. clearing to a fixed color, adding a border, etc).

    So I think there are already a few good options to do exactly what you want. In general it's better to ask "what other options are there?" before "can a new feature be added to do this?"

  • > All I need is to CLEAR it or REMOVE or UNLOAD from that specific frame and not just the option to replace with another, it is very important in my project that it can get back to empty frame

    This doesn't make sense. You first say that you don't want to replace it, but then you say you want to go back to an empty frame, which means replacing it with a transparent image.

    Why it doesn't make sense?

    It's simple I don't want to destroy the sprite or to replace the sprite All I want is to replace it's first frame with the image that will be LOAD into this specific animation frame, in this specific sprite.

    As I said, I have the first animation frame which is empty, I want to replace it with the loaded one.

    But I want the option to UNLOAD(or clear) the ALREADY LOADED IMAGE from the specific first animation frame with a click of a button, and making the user to replace it with a different image.

    So it is using the exact same sprite as holder, same animation, same frame.

    I'm sure that there are other options, that's the beauty about programming many solutions.

    BUT I have no clue about these options (as I said I'm not a programmer, I don't understand these terms, I'm still learning) so I try to use what I understand best.

    I'm not exactly familiar with how to control or work with the canvas and I already have other issues with layout/window/fullscreen sizes (other thread..) so this is why I just want the most obvious solution for me to load / unload replacing a specific frame for specific animation on a specific sprite. because that's the only option I currently understand. because it make more sense to me with my current limited logic, sorry for not being as smart as most of the people here, I'm not a programmer THIS is why I'm using C3 and not other tools, Logic is the only thing I can follow.

    The hard time I get is to find that feature you said is already in Construct 3 so I don't need to ask for such feature... since it's already exist, but WHERE?! can you please show in a screenshot? it will be very helpful for me to try and replicate it instead of keep searching that unload image action you said before that is already built-in and I can't find.

    If this is going no where I'm sorry for the trouble.. we're both wasting much time understanding each other obviously at least on this subject, I'll just use that confusing URI way for now, at least it works. but thanks anyway I do appreciate you're trying to help Ashley. :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)