Scavengrove's Forum Posts

  • Daggio - There was a bug in the previous C2 plugin that was preventing Spriter objects from swapping frames. It has since been fixed, so make sure you delete the old plugin from your C2 folder and get the newest from the first post: scirra.com/forum/spriter-c2-plugin-update-11-28-2013_topic59694.html

    Remember that Spriter is still in beta and the most recent releases (B5_9x) are going to have a few bugs. I think we will probably see Construct 2's import process updated soon, as well as the full B6 release. This will take a lot of the headache away (in terms of scml+scon and frequent new versions.)

  • mostaafa - if you minify the script on export, currently it breaks the spriter objects.

    Tobye - I'm using spriter w/ nodewebkit no problem. Do they show up during nodewk preview?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Daggio

    If the png images are combined into a single object in Spriter, they will be combined into a single sprite object in C2. If you open the combined sprite object in C2, you'll see they are each their own frame of the animation. So open the Argus_battleBody sprite in C2 and you'll see two frames, one for the damaged and one regular.

    C2 handles the entities correctly, but you have to set them for each instance of the object. So if you have a single *.scon/scml with with two entities, you will only import the object once. Then you place two of the spriter objects and in the object properties, (or using events) set the entity / animation for each.

    You can set the entity in the layout editor using the spriter object's properties here:

    <img src="http://i.imgur.com/UxJf0re.png" border="0" />

  • lucid - I've figured out what the problem is with my spriter objects- When I change the object's image in an animation (right click the sprite in Spriter and choose a new picture) that change is not happening in C2. Everything looks normal and works in Spriter, but in C2 the image doesn't change.

    I made a quick example to explain it better. There's a *.capx and a folder with the spriter files / images so you can see both sides:

    dropbox.com/s/l2tflu1h7engv57/spriter_bug.zip

    The star spins, click the mouse and it should change animations to one that swaps the image halfway through. But the image doesn't change.

  • It definitely was, I was using the 11/18 plugin with scon files no problem. I'll mess around with it some more and let you know if I can't get it working! Thanks for everything lucid - Spriter is really awesome and you're doing a great job :D

  • lucid When using this latest plugin, none of my spriter objects load :X!

    The sprites are all loaded when the layout starts but the animations don't play and the spriter's family don't act like they're in a container with the Spriter object.

  • aha! Just read this thread: scirra.com/forum/node-webkit-exe-doesnt-work_topic80890.html

    The "minify script" option at export causes it. FYI...

  • Anyone else have an issue where their spriter objects are completely missing after export? Works fine in preview but export to HTML5 website / nodewebkit and they vanish.

  • hmm, I see what you mean. I was reading the first example like this:

    Pick all <visible> red sprites (SOL: 4 red sprites)

    ---> Pick all <overlapping> red sprites, pick all <overlapping> black sprites. (SOL: 1 red sprite, 1 black sprite)

    But the actual effect was (SOL: 4 red sprites, 1 black sprite).

    The reason that's strange to me is that when the subevent does not have a SOL to pick from already, it DOES narrow it. Which seems like it has to be a bug. Why would more be chosen from less? If that makes sense.

  • Nice, good idea! Works just fine. Still a bug, I think, but this helps me continue forward with my project. Thank you, megatronx !

  • Link to .capx file (required!):

    dropbox.com/s/ce8lyg2ljqkhgh6/r151_overlap_bug.capx

    Steps to reproduce:

    1. Make an event with a condition involving an object.

    2. Make a subevent testing overlap with that object and another.

    <img src="http://i.imgur.com/qf3EWDh.png" border="0" />

    Observed result:

    The subevent testing overlap does not run only on the overlap, but instead runs on the SOL from the parent event.

    Expected result:

    The subevent picks only the overlapping sprite.

    If you change the parent event to not involve the object, it works fine. For example:

    <img src="http://i.imgur.com/NPgMrJp.png" border="0" />

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Internet Explorer: yes

    Operating system & service pack:

    Win7x64sp1

    Construct 2 version:

    151

  • Wow, you've put a lot of work into this! There are a lot of things to talk about that will help you out:

    1) Your capx is 180MB, which is enormous. The reason is your backgrounds are 4250x3500. However, in the game you have them scaled down to 648x487. Instead of scaling them, resize the actual image (in the editor or paint or something). The game already has noticeable lag because of the huge images, it's an easy fix and will avoid negative performance problems down the line. For future reference, it is far better to create your backgrounds from their individual components (tiled textures with sprites on top, for example) than to have the background be one giant image.

    2) You can reduce your layout sizes to the window size of the actual game by clicking on the layout objects in the project list. On the property sheet for the layout (left side of the screen by default) you can adjust the layout size to 640x480.

    3) For your input fields (name, age, etc.)- You don't need the instance variable 'control' if you're going to clone a new object type for every single button/list box/text field. The object is unique, so the events referencing them only ever apply to that single object.

    However, you can use the same object in multiple places (like in my example I sent.) If you do that, use an instance variables to differentiate between multiple occurrences of the same object. Make sense? I cleared out the instance variable from each object and put the actions for each text/list box together on one event and it worked fine.

    Like this:

    <img src="http://i.imgur.com/OF781iS.png" border="0" />

    Hope this helps!

  • What if you build your own 'For' loop to process the array, handling a specific chunk each time it runs?

    Looks like this:

    <img src="http://i.imgur.com/WbRFvar.png" border="0" />

    Kcpunk666 - Here's a capx with those events + a text output to serve as a visual indication:

    dropbox.com/s/7dt74da3e81zvyn/iterating_array_loop.capx

  • I hadn't heard of game-icons.net, that's neat! Thanks for the information.

    Implementing all 1113 icons directly into the app would not be the way to go. It'd be far too time intensive to setup and would be insanely resource heavy.

    Instead, create a Sprite object to be the placeholder. Then, use the action "Load image from URL". The game-icons.net images are all powers of 2, so set the placeholder sprite's size to a power of 2 as well. (64x64 or something).

    Don't set the URI directly to game-icons.net images (it's bad practice, and it also wouldn't work (their Cross-Origin Resource Sharing policy does not allow it.) Instead, re-host the images yourself and point to the URI there. Alternatively, if you're using node webkit or otherwise planning an "offline" export, add the icons as project files and have the URI simply say the name of the icon in the project files. (for example, "crossbow.png")

    Here's an example that uses project files: dropbox.com/s/34pisqor3m2v1uw/ebrar.capx

  • Create a global text variable for name and a global number variable for age. On the layout, you can use a textbox object for input of name and age. Then save when a button is clicked.

    Here's a quick example w/ some comments to explain it. It's a little more complicated than it needs to be, but it illustrate some tricks about re-using objects instead of making unique clones for every need.

    Example: dropbox.com/s/hj5ir6j8ng055y4/sheppard1.capx