Mithrill's Forum Posts

  • R0J0hound

    Thank you for making this nice effect available :)

    Sadly, I ran into a problem. After export, outline is all messed up. I'm using NW.JS v0.15.0 and Construct2 r227.

    Outline in C2 NW.JS preview:

    h*t*t*p*s://dl.dropboxusercontent.com/u/43020976/C2%20pics/outline/in%20preview.jpg

    Outline in NW.JS after exporting

    h*t*t*p*s://dl.dropboxusercontent.com/u/43020976/C2%20pics/outline/after%20exporting.jpg

    I even made a plank project to see if I could reproduce this problem. Well, same problem occurred after export. Any idea what is causing this? Or how I can fix it?

    -M-

  • What is the positive value? At the size or somewhere else ?

    Sorry I kindaa confuse what yur question is

    + Bigger - Smaller

    I checked values in debug-mode and I found out that when sprite is mirrored it's width is negative value and when it's not mirrored same value is positive. Then, when sine behaviour is activated it will set sprite's width value to positive regardless of mirroring / not mirroring. Other words, sine will set sprite to not mirrored even though it's mirrored.

    Here is my original post:

    h*t*t*p*s://www.scirra.com/forum/viewtopic.php?f=147&t=177622

    -M-

  • Problem Description

    Toggle bookmark shortcut key is disabled and can't be used to type in editor.

    Attach a Capx

    h*t*t*p*s://www.dropbox.com/s/55wtmldyt5rfji1/toggle_bookmark_key_disabled_r227.capx?dl=0

    Description of Capx

    Contains a sprite object which is called sprite (creative, eh...).

    Steps to Reproduce Bug

    • go to: customize quick access toolbar / more commands / keyboard shortcuts: customize.
    • go to: events / toggle bookmark
    • sign "h" key to toggle bookmark shortcut key.
    • click close
    • click Ok
    • go to layout 1
    • click sprite object and rename it to "hero"

    Observed Result

    "h" key is disabled. Only "ero" can be typed.

    Expected Result

    be able to type "hero"

    Affected Browsers

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

    Operating System and Service Pack

    Windows 7 Professional SP1 32-bit running through vmware Fusion 5.0.5 (1945692) on Mac OS X 10.9.5.

    Construct 2 Version ID

    r227 32-bit

  • Problem Description

    When sine behaviour is used to set the width of sprite object, it will always return to positive value after "on landed" -event.

    Attach a Capx

    This example is mine:

    h*t*t*p*s://www.dropbox.com/s/8fxwib0eri1a8pr/squash%20and%20stretch%20demo%20r227.capx?dl=0

    This is example from Kyatric :

    h*t*t*p*s://www.dropbox.com/s/f2uxrxf8hbti361/sine_width_unmirror_r229.capx?dl=0

    Description of Capx

    I want to squash and stretch player sprite after "on landed" -event. I'm doing it with 2 sine behaviours, WidthSine and HeightSine. "on landed" -event will activate both sines.

    When player is not moving and lands on ground, sprite goes from mirrored to not mirrored when sine behaviour is activated. When sprite is not mirrored everything works fine. Also, this problem only occurs when player is not moving. If player is moving, then mirroring will work.

    Steps to Reproduce Bug

    • press left (player will turn left (is mirrored))
    • jump
    • wait player to land

    Observed Result

    sprite go from mirrored to not mirrored.

    Expected Result

    sprite stay mirrored.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)
    • NW.JS: (YES)

    Operating System and Service Pack

    Windows 7 Professional SP1 32-bit running through vmware Fusion 5.0.5 (1945692) on Mac OS X 10.9.5.

    Construct 2 Version ID

    r227 32-bit

  • Thank you Kyatric for you quick reply. I will post a bug report right away I also found a workaround how to fix that sine behaviour. Check my first post for details.

    -M-

  • Hi,

    Currently I'm trying to make player sprite to squash a bit on landed. I'm doing it with sine behaviours. There are total of 2 sines, WidthSine and HeightSine. "on landed" -event will activate both sines.

    The problem: when player is not moving and lands on ground, sprite goes from mirrored to not mirrored when sine behaviour is activated. When player sprite is not mirrored everything works fine. Also, this problem only occurs when player is not moving.

    I checked values in debug-mode and I found out that when sprite is mirrored it's width is negative value and when it's not mirrored same value is positive. Then, when sine behaviour is activated it will set sprite's width value to positive. Other words, that will set sprite not mirrored.

    Is this a bug in sine behaviour? Kyatric, , Ashley

    If not, how I prevent sprite/sine from mirroring unintended way?

    Here is an example: h*t*t*p*s://www.dropbox.com/s/5cn6hl1fiwc29rj/squash%20and%20stretch%20demo.capx?dl=0

    -M-

    EDIT:

    I found out what is the problem. Apparently the problem is vectorX check. How I fixed it: I Made a global variable "Facing_Direction" and when VectorX is less than 0 -> set Facing_Direction to "left". If it's greater than 0 - > "right". Then I added events: Facing_Direction is "left" -> set sprite mirrored and vice versa.

    Now, on landed will trigger both sine behaviours and they work like intended

    Last thing I needed to add was to set correct size of the sprite object. I made that with function.

    If anyone is interested to see the result, here it is: h*t*t*p*s://www.dropbox.com/s/hliduujttc7j9jn/squash%20and%20stretch%20demo2.capx?dl=0

    -M-

  • scirra.com/forum/effect-outline_t75574

    Thank you very much!!

    -M-

  • Is there an easy way to apply 1 pixel (or any pixel) wide stroke around sprites on run-time?

    I have searched WebGL effects already but I could find any effect to suit to my problem. If there is an effect, please let me know.

    Quick example what I mean:

    h*t*t*p*s://www.dropbox.com/s/00d5u6z6n13xd5s/example.pdf?dl=0

    Of course I could create a new sprite 2 px bigger than the target sprite and place bigger one behind the target sprite. That would create a "fake" stroke effect to the sprite. Problem is, I want to apply stroke around sprites which are animated. That means, I need to make 2 px bigger versions of every possible animated sprites. To me, that sounds not very efficient way.

    Ideas and examples are welcome ^^

    -M-

  • Nice! That was also one of the points to have in the chain creation but I forgot to wrote about it. So your method is actually what I was looking for ^^ Thank you so much for your help!

  • R0J0hound, thank you for your quick reply

    Yes, your method is much more simpler and easier to follow. I just learned something new, again ^^

    I found a bit difference how the chain pieces are positioned between startsprite and endsprite comparing to my method and your method. Here are the screenshots:

    my method

    your method

    I was wondering, what is causing this? Maybe something to do with the --- loopindex/(startsprite.chainAmount + 1)) ---part?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey everybody,

    I have a bit different problem. I made an experiment for my upcoming game. I wanted to create chain between 2 objects. Also, I wanted that the amount of chains is adjustable AND chains are divided in equal distance between two objects. I hope that makes sense.

    Here is a screenshot what I'm talking about:

    Problem is, I don't understand how the math works in the event. Odd, ehh? I can create something but I don't understand it.

    Here is a screenshot from my code:

    I'm referencing to line 3 and precisely this: chain: set lerpNB to ---> (1 / StartSprite.chainAmount) * loopindex

    Here is capx -file if somebody want to check the code in Construct2.

    h*t*t*p://www.mediafire.com/download/dohmd4d3wjtbdqv/chain_creation_between_2_objects_tutorial.capx

    I think everybody knows that first you need to understand the problem, before you can solve the problem. I can understand both but I can't understand why results works. In particular in this case.

    So, if somebody could explain to me why my code (line 3) is working, I would really appreciate it.

  • Thank you very much mindfaQ for your effort!! ^^

    Now when you mentioned it. Dunno why I didn't think of doing the "spreadsheet" in Construct2 :/

  • Hey everybody,

    Currently I’m making an adventure platformed game. In game, player collect coins (how original idea). After every level, player can use these coins to purchase 1 ups. Every 1up purchased will increase the 1up price by 1 (one). From levels player can also find items which will decrease the current 1up price by half.

    I ran into a problem of calculating 1up price. I’m designing and figuring out, how many coins and price reduction items I need to place in levels for best balance. So I thought that easiest way of doing that is to create a spreadsheet, where I can input coin amount per level. That way, I could (in theory) easily play around with the coin amounts to find the best balance.

    I tried and failed. Math isn’t my thing for sure. So could anyone help me to figure out how to make that spreadsheet? Even correct math formula is enough.

    run-down:

    At the beginning of the game: 1up price = 1 coin.

    Every 1up purchased increases the 1up price by 1.

    Item which will reduce the current 1up price by half.

    Any kind of help is highly appreciated.

  • Mithrill

    > Posting a comment to mark this thread

    >

    Why?

    There is a 'Bookmark Topic' link at the bottom of the page. Bookmarks are then managed through the 'User Control Panel' at the top of the page.

    Oh, I didn't knew that. Thank you for pointing that out

  • Posting a comment to mark this thread