shinkan's Recent Forum Activity

  • Couldn't find anything about that with search so I want to ask someone how this can be done.

    I have something like this

    Array: [
       [["name0"],[0]],
       [["name1"],[0]],
       [["name2"],[0]],
       [["name3"],[0]],
       ...
       [["name9"],[0]]
       ][/code:2dye1v6a]and
    [code:2dye1v6a]
    Keyboard: On Space pressed
      [Local text TempName = ""]
          +[empty sub-event] -> System: Set TempName to Array.At(random(Array.Width))
          
          +Array: For each XY element              
          +Array: Current value = TempName -> System: Create object Sprite at mouseX, mouseY  
                                              Sprite: Set name to Array.At(Array.CurX)
                                              Array:  Set value at (Array.CurX, 1) to 1[/code:2dye1v6a]
    
    What it does is:
    After pressing space key it generates random value from ArrayX and then sets this value as a Sprite "name" variable and changing (Array.CurX, 1) to 1
    For example after pressing a key if random generate number 3 it will look like this
    [code:2dye1v6a]Array: [
       [["name0"],[0]],
       [["name1"],[0]],
       [["name2"],[0]],
       [["name3"],[1]],
       ...
       [["name9"],[0]]
       ][/code:2dye1v6a]
    
    It all basic stuff but my question is:
    How can I set random() event to select only from Array with value (Array.CurX, 1) = 0 ?
    
    At start I'm selecting from ["name0","name1","name2","name3","name4","name5","name6","name7","name8","name9"]
    
    After pressing space couple of times I get "name2" and "name5". 
    And now on pressing space I would like to select from ["name0","name1","name3","name4","name6","name7","name8","name9"]
    
    For now I have event Array: Value at (Array.CurX, 1) = 0 -> Create sprite....
    
    But then while pressing space it will still go through all array X objects, and after some time nothing will spawn but values in random will keep changing until it hits the one with (Array.CurX, 1) = 0.
    
    In conclusion, my question.
    How can I set Array.At(random(Array.Width)) with exclusion every key pressed?
    
    Can't do simple "Array.At(random(Array.Width)-1") or "Array.Delete index "x" from X axis" because all values in Array are hardcoded and other stuff depends on them.
  • remy-jay Unfortunately this issue is present since WebGL shaders was added to C2 and probably won't be fixed any time soon.

  • I was about to ask same question as

    And one more question, is there a way to rename objects or properties?

    If I have for example something like this:

    "Star1": {
        "name": "somename",
        "size": "somesize"
          }
    "Star2": {
        "name": "somename2",
        "size": "somesize2"
         }[/code:s40yz6be]
    
    I would like to change "Star2" (or any property)  name to something else. I'v been using a workaround simply creating new object  ie. "Star5" and setting it's all properties to "Star2" and deleteting "Star2". but it gets more complicated if I have more properties, objects and arrays belonging to Key I want to rename.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • And one more thing, sorry for that but I love this plugin and I'm using it a lot xD

    Could it be possible to add one more action (or combine existing one) to do a "Transition to point and zoom"?

    I've noticed that doing it like:

    +MagiCam: Camera "c": Transition to "some X value", "some Y value" in 0.5s

    +MagiCam: Camera "c": Transition to zoom level "some zoom value" in 0.5s

    don't always work in sync. Sometimes it moves to XY and then zooms a bit or vice versa - zooms and then move a bit.

  • From https://crosswalk-project.org/#documentation/about/faq

    "On top of this, Crosswalk adds extra features which are not available in either Chrome or the Android webview, such as experimental support for SIMD and support for the Presentation API."

  • if I were doing games for 20 years now, I would never use any free/paid engine because I probably could write one myself. In about 30 minutes. On a laptop, blindfolded, riding a horse backwards and using only pinky finger on my left hand.

    Actually Game Develop is much older then C2.

  • Problem Description

    Layer visibility is not changing to default value after restart/change layout.

    Description of Capx

    Very crude example with excessive use of button objects showing how layers visibility is not reset after layout restart/change

    Steps to Reproduce Bug

    • Preview
    • Click on button to set "box" layer visibility to "invisible"
    • Click other button to go to second layout (I used "go to layout" instead of restart for better visual representation, but effect is the same)
    • On layout 2 click button to go back to previous layout.

    Observed Result

    After setting layer visibility to different one from default value (from visible to invisible and/or vice versa) this layer will keep its visible state after restarting layout or switching to different layout.

    Expected Result

    Layer visibility should reset to default state after restarting layout. So if layer is visible and you make it invisible at runtime by events it should switch back to visible (default state) after using "restart layout"

    Affected Browsers

    • Chrome: YES
    • FireFox: -
    • Internet Explorer:-

    Operating System and Service Pack

    Win 7 64bit SP1

    Construct 2 Version ID

    r165

  • At this time I'm pretty sure this is not a driver bug. I've tested this project file on few setups:

    • my pc integrated Intel HD graphics (newest drivers possible)
    • my pc with new Geforce 780 (newest drivers possible)
    • my brothers pc with some ATI card (newest drivers possible)
    • my brothers laptop with some integrated nvidia card (newest drivers possible)
    • my fathers very old laptop with some ATI card (newest drivers possible)

    On every one of this setups SpriteFont issue is present in this particular project file. Also I've made few new projects trying to recreate that issue (on every of these computers) without success. Every new project I made was displaying properly.

    So yes, this is not a driver bug - unless all currently available new drivers are broken. My current drivers for Geforce 780 are from 3/10/2014 version 335.23.

  • Make a variable to set quality settings and then use it in your events to control how many objects are you spawning, how many effects are enabled etc.

    So for example on your layout they are objects that spawns 100 sprites every seconds. This can make slower computers to slowdown a bit and loose fps.

    You could set then

    +if variable = "normal"

    + every 1 second - Object spawn 100 sprites

    +if variable = "low"

    + every 1 second - Object spawn 30 sprites

    I've used something like that in two of my games and it works really nice.

  • What do you mean by "So all widgets, small objects should share 1 object. And let robust stuff have there own sprites." ?

    Sorry but it's 3:28 AM and i'm not sure if I understand this correctly

shinkan's avatar

shinkan

Early Adopter

Member since 21 Nov, 2008

Twitter
shinkan has 8 followers

Connect with shinkan

Trophy Case

  • 16-Year Club
  • x5
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

25/44
How to earn trophies