Exile03330's Forum Posts

  • With the new draw method is there a way to scale the image? I tried scale ratio, but the image parts stay the same size.

    Thanks!

  • > I am having problems using character maps that set something to hidden. The expected sprite hides in Spriter just fine, but is visible in C2. I never tested this in earlier version of the plugin. Is this expected?

    >

    > Thanks!

    >

    I can confirm this happens. I had a bunch of male NPCs with skirts on

    Instead of setting something to hidden, I just set all of them to a blank sprite. So it probably still needs fixed, but in the meantime, a blank sprite works.

    ha! That is funny.Yeah I used to do what you suggested before messing with hidden.

    Thanks for confirming.

  • I am having problems using character maps that set something to hidden. The expected sprite hides in Spriter just fine, but is visible in C2. I never tested this in earlier version of the plugin. Is this expected?

    Thanks!

  • The Spriter plugin has been updated and resolved these issues. I also got some feedback from the Spriter forum regarding plugin usage.

    http://brashmonkey.com/forum/index.php? ... variables/

    Thanks! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Aher0

    Yeah, I may end up just using variables in C2 which if fine. I guess I wanted to know more for a learning experience hehe. Anyhow, check out this link for adding Spriter.

    http://brashmonkey.com/forum/index.php? ... nstruct-2/

    The biggest thing is changing your save settings in Spriter and saving both .scml and .scon files. Then drag those files to the layout in C2. Oh, and make sure you have the Spriter plugin downloaded and in the correct folder. Its quite powerful.

    I have a timer that I was thinking about changing from using many events to using an animation from Spriter. The triggers would tell me when to change a variable. I may just do that and use the triggers and not worry about the variables in the animation.

    If you have some time give it another shot <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">.

  • I have been messing around more with Spriter and wanted to take advantage of the events, tags, and variables that can be added to the animation.

    I am able to get the Events to trigger in C2. I also am able to get Tags to work. However, I am having issues getting the correct variable value when Events trigger.

    What I want is to have the Spriter animation variable change throughout the animation. The first 1/3 of the animation it will be 3, then 2/3 it will be 2, and then the rest it will be 1. In Spriter at each event key frame I have the variable active and is setting the actual value. I do it like this:

    time 0 value 3

    time 334 value 2

    time 667 value 1

    When updating a text box in C2 upon each triggered Event I am not getting the expected 3, 2, then 1. Oh, and it looks like the animation needs to stop then play for the trigger at time 0 to fire. It does trigger if its repeated.

    Does anyone have a simple Sprite file and capx they can share that shows what I am asking?

    Thanks!

  • juani

    Ah, I used a tool to create the JSON and must have missed a cell. Nice catch. Thank you.

  • Randomly get Javascript error with array loaded with JSON

    Click the "Random" button and click through the alerts. Usually after the first few the error will occur.

    https://drive.google.com/file/d/0B_14V9 ... sp=sharing

    Attach a Capx

    https://drive.google.com/file/d/0B_14V9 ... sp=sharing

    Description of Capx

    Function (Set Array) that loads an Array with JSON string.

    Function (Get Random Number) loop through the array randomly selecting values and removing them from the array so it gets smaller. Each time a value gets selected the array gets smaller so there are no repeated values.

    Steps to Reproduce Bug

      Click the "Random" button and click through the alerts. Usually after the first few the error will occur.

    Observed Result

    An error occurs.

    Expected Result

    Not to have an error.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 10 Preview 10130

    Construct 2 Version ID

    R208

    edit: Updated title

  • You could add a variable to the chest sprite to identify if the chest has random loot or fixed.

  • Aphrodite HAHA! That was a great comment. All the comments have helped to better understand what is happening. I appreciate it!

  • Oh man after reading your comment LittleStain and thinking about it for a while... it makes sense! Pixels can be subdivided. Thus, there are values in between. So, top left of a sprite is (0,0) which I was assuming is a single pixel (I was looking at the whole square). That pixel covers the values 1> x >= 0. What you said about 2,2 being the bottom right of the middle seems more clear now. I was so stuck with the idea of physical pixels like on a monitor and that something cant be smaller than the physical pixel. I am not sure If I explained myself well, but I think I understand it more.

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you can set the origin points with half measures also now! so if your picture is 17x17 your center coordinates should be X 8.5 y 8.5 ! you can calculate the center with the calculator by taking the width height of your sprite, and divide it by 2! then input the result for X Y in the origin point thing! hope it helped! not sure if i was on point! dident really understood ur question!

    Thanks gamecorpstudio.

    Hmm, maybe I should ask the author of the tutorial to clarify why to use divisible by 2 width and height. I didn't try .5 pixels hehe. I should just accept that it works lol. Just wish I knew why or how.

    In the tutorial the author used a 256x256 sprite and set the origin at (0,128) because of how he wants it to rotate. So, 256/2 = 128. I get that. But visually that pixel isn't in the middle. You would have to have an odd number to get a whole pixel in the middle. For example: A 3x3 sprite would look like this where [x] is the center:

    x x x

    x[x]x

    x x x

  • Hello,

    I was checking out the tutorial below and got hung up on the even vs odd pixels.

    https://www.scirra.com/tutorials/1377/h ... onstruct-2

    In the video it was mentioned to use a sprite with even width and height instead of odd because the center would be off by a pixel. I don't see how you get a center with even sides. Trying to visual this I i was checking out what C2 does. The origin appears to be in the Top Left of the pixel chosen as the origin. I guess this would actually make it the center visually since it intersects the 4 center pixels. I was under the assumption rotation occurs around the pixel itself.

    Image:

    https://drive.google.com/file/d/0B_14V9 ... sp=sharing

    Thanks for any clarity!

  • Unfortunately I was not actively working as much with Windows 8.1 so I did not have a lot of hands on with it. I can't really compare because I have been nearly only using 10. However, the performance and experience has been great for what I have been doing.

  • Hello rekjl! I have been using Windows 10 for the last few months. With the latest release of C2 (R206) and Win 10 (10130) I have not encountered any issues with it. Actually, I have not had any issues with any software with the latest build of Win 10.