JMKit's Recent Forum Activity

  • Well it defiantly helped in terms of the sprite being able to keep the same color from layout to layout which is great.. I'm just left wondering if it's possible at all to get the effect value into that variable without me explicitly re-typing it.

    Here's a link to a basic sample project

    https://www.dropbox.com/s/b5rauqmuidlxwnw/ColorTests.c3p?dl=0

    I only use one single sprite here 'Ball' with different instance variables to say which color should trigger when clicked and yes I can do what I did here which is to re-type the tint color again:

    but it would just be a big time saver with more colours if I could some how say, pick the sprite with the specific instance variable and get it's tint value and put it into the variable - if it's not possible I understand and can still work with the advice I've been given.. It just seemed odd to me that I could get a bunch of other information from a sprite but not the effect value

  • Ok thanks guys I’ll try that out :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the reply, I guess another explanation would be, I want to go back and forward through different layouts and have a sprite ‘rememebr’ It’s effect parameters

    So if you say it is possible to set it via a globe variable I could set that when setting the colour then when loading the layout get it back from there.. how would I go about doing that?

  • I'll try and explain the best I can what I'm looking to do..

    So say I have a white sprite, I give it the tint effect and a color '140, 176, 136'

    I want to be able to click it and have it's value - rgb(140, 176, 136) stored in a global variable.

    Is there anyway to do this?

    The reason I want to do it is so I could just refer to a colour as (for example)

    Global Number Item_Color = 1

    and then the item in question could see the item_color number and associate it with the rgb value that's also stored in a variable rather than have to hand code each rgb value for many sprites I intend to want to be able to customise the color of.

    I hope that's explained my question I'd appreciate any advice here

    Tagged:

  • Thanks for the reply, Do you know if there's an easy way to prompt a user to enable software rendering?

    If a game is published and some people can't see the effects it can lead to bad reviews / bad experiences etc, and it's quite a lot to explain to a casual player to do..

    I'm open to understanding any other reasons It may be happening too

  • I've created a basic test of colour changing using the tint effect here: jmkit.com/duh/Colourtest

    the numbered sprites at the bottom change the white circle at the top to their respective colours, it works and displays just fine for me in all browsers (firefox, safari, chrome) but I have someone who can't see the colour effects at all, and even trying other effects like water ripples, they see nothing, just the base - white circle.

    Does anyone know what might be causing this issue, it's happening with the latest build and with a game i've uploaded over a year ago - with a guy that has literally just updated to the latest version of chrome.. on the same machine it loads fine on firefox.. any advice would be greatly appreciated

  • I don't have any experience with that.

    Just a shot in the dark, haven't tried this, but you might be able to use window.location.href in an Browser.ExecJS expression.

    Hey, perfect that does let me use presumably all the other expressions, I just needed to tweak it to say window.parent.location.href and it displays just as I wanted. Thanks for the advice!

  • You could try the javascript addon.

    hmm is that the plugin SDK or something else?

  • Use the Browser object's URL expression. (Browser.URL)

    https://www.scirra.com/manual/110/browser

    Hey thanks for pointing me in the right direction, so I have it showing the path of the original html file, but if I have the game embedded on another page, how would I get it to show the parent URL. there doesn't seem to be an expression for that?

  • So I found out they are still using c2_callFunction (for legacy reasons)

    but even trying c2 I see

    [quote:2itvq2ce]c2_callFunction is not defined

    I checked and double checked the function object is in my project, and I made a function with the same name trigger a scene change but still seeing that error

  • Hi, is there any way to detect the url the game is being played / embedded on

    so as an example page1.html would trigger a function telling the game to show 1 - page2.html would trigger a function telling the game to show 2

    any help appreciated!

  • Ah great thanks for clarifying there.

    Just one other thing then, if I don't have access to write inside the advert launching javascript .js file, would I still be able to add that just in the index.html file as a script and it know what to do?

    as in this section

    adsCompleted = function() { 
            c2_callFunction("myAdsCompleted");
    }[/code:15rz3lyb]
    
    or do i need to also reference the source .js file in there somewhere too?
JMKit's avatar

JMKit

Early Adopter

Member since 21 Mar, 2015

None one is following JMKit yet!

Connect with JMKit

Trophy Case

  • 9-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies