part12studios's Forum Posts

  • how does that work exactly? making something into a string in C2? do i need to make a new variable to put the converted value or is it done in the expression itself?

    using your expression i got a syntax issue.. i think "lef" is meant to be left but still something in there wasn't working right.

    you use the "," throughout the formula which would be a period right for a timer right?

    This looks really promising I've just never had to work with casting values from a number to string or the other way around so the whole concept inside of C2 and the right way to do it is a bit mysterious to me.

  • The thread definitely talks about what I'm looking for, but i just don't follow the expressions he's using as they don't (to me) seem to really correspond to how you would work in an event sheet.

    all of the formatted string stuff was confusing.

  • Hi there, i found this thread which seemed promising but also a bit confusing..

    all that said my game has a timer.. with a NUMBER variable called "Timer".. let's say you have 4 seconds to do something.. i would need it to start at 4.0 and always show a decimal.. 3.8 3.7... 3.1 3.0 2.9 etc

    it seems like there must be some way to just get in there and be able to round a variable like my "Timer" variable to drop off anything after a certain decimal.

    Thanks!

    Caleb

  • fisholith thank you for offering this explanation but there is something about this that's totally going over my head. I get the general idea of how you're doing this, but am not sure I would actually put this in an event sheet. I have a timer that would be in 0.0 format.

    in the attachment you can see i have a timer integer which is the actual timer that is being used in the game mechanics.. my assumption is that the digits text variable in your example (i calle TimerText) is a kind of dummy variable that just displays the number variable in the appropriate way.

    in this screenshot, if i disable the 3rd line what i see is basically a decimal-less version of the countdown, so that is at least doing something to the number.. but i don't know how to actually apply the "Formatted string" lines of code you show as an example because it seems like they are what is responsible for the shifting of decimals..

    but even if that's not the case, your examples all reference a specific number in the formula.. i don't know what my timer number is at any give moment so i can't say timer.123 or timer.3 you're example talks about specific numbers, sorry I'm so confused by this.

    NOTE: Also when I have that third line in the screenshot active it just goes blank.. I just wanted to mention that i know it's wrong, i just wanted to try something as close as I could make to what you were showing in your reply.

    Thanks!

    Caleb

  • Actually I just got word from the good folks over at XDK and it sounds like while its not in place now, it is all set up to be resolved so this will not be an issue for XDK users. Crisis averted! yay

  • Hi there, this is pretty concerning because I have several builds to push out very soon and I'm using XDK. Everything is the latest but i just submitted an app and see this warning.. is it just a generic warning? I have several games I need to publish soon, but don't want to find them unable to publish Feb 1st. Man that would suck..

  • yea i think you're right about the round off stuff... and ok yea 0-100.. percent.. duh.. didn't even think of it like that.

  • doing some mad math.. i did try just now to divide a value say.. green which is:

    R - 51

    G - 153

    B - 51

    and i simply divided the value above by 255 (maybe i should do 256?) and i got basically:

    R - 20

    G - 60

    B - 20

    which looks dead on.. weird they would use a color range like this. is there some standard system that uses color in a range of 100? I've never seen that before.. or overlooked it in photoshop

  • ooooooo .. but then how do i calculate colors from RGB? if i use a color picker I get these values.. also strangely enough.. colors like blue:

    r - 0

    g - 0

    b - 204

    look perfect as best I can tell, however looking closer blue isn't perfect.. it is off.. just not as noticeable. do i still use the parameter 0 1 and 2 for RGB?

  • hobibit of all of the options above yours seems like the most straightforward, however I just posted my issue with set color.. there must be a solution, i just can't figure out what could be difference. the objects are frames of animation in sprite object so they are all in the same family..

    The only thing I can think of is that maybe since my sprite object frames are white, the white is somehow bleeding through, but if that were the case it would seem like all of them would be a little washed out and that's not the case.

    I feel like set color is the best solution, but i can't figure out why it look this way.

  • Hi there,

    I have a project i'm working on where I have a series of tiles that are set by RBG values, the problem is that i'm having issues where my webgl effect "set color" seems to have a few that display the RGB values I define correctly. See image below:

    nevermind that the word blue is green.. that's part of the game. What I want is for the world "blue" to be the exact same green as what you see in the box on the left. for some reason it comes out faded looking. i have 9 colors and most of them are dead on, however orange, purple and pink

    The image below should make the text look orange done like this:

    but instead it comes out a yellow with a weird hint of red around the edges:

    The text you see are white (255,255,255) and i'm wondering if that might be the issue, but i'm not sure what other color / effect I could use that would absolutely assure a sprite is the exact color it needs to be.

    here is what i have it setup with in the effect of the text sprite object:

    I've been stuck on this for a couple days trying things and for awhile i thought it was a logic thing, but the objects are right in the game and appear as they should, it's just that a few of them refuse to show the right exact color

    Thanks!

    Caleb

  • I don't have an android device to test easily right now, but i take it the plugin does work with Cordova and that's great news Thank you for investigating this issue first hand.

    Sincerely,

    Caleb

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ok nevermind, you CAN use the frame animation as an ID. The solution was to make an instance variable and just after the frame is called on, set the current frame to the instance variable. thanks again for this great thread!

    Also thanks for confirming the frame number is itself an identifying value. i didn't realize it could be called on any time, but now that you say that it makes perfect sense.

    Thanks!

    Caleb

  • Thanks for doing this and Magistross your example was great.

    I have a slight addition to add to this. in my case i want to be able to click one of those boxes and idenify it. since it's the same "object" all of the boxes are the same box with different colors..

    my goal would be to say have it where it tells me to pick the color from the same pool of colors.. so if it said click the red one, how would i know i'm clicking the red one or if i clicked the wrong one? it doesn't seem like the frame of animation (what determines the color) would be an identifiable parameter.. my other thought was maybe having an instance variable that would grab the random number, but this loop is happening so fast i'm not sure if it would work like that. Any suggestions?

    Thanks,

    Caleb

  • Also Somebody i like the B to make blank sub events.. very handy! I didn't know about that shortcut.