jumprock's Forum Posts

  • Thanks, taking off minify works.

    The plug in I'm using is here: scirra.com/forum/plugin-data-structures-in-associative-lists_topic44044.html and allows array functionality like pop, splice and shift. Will that be coming to the native construct array type?

  • Was just thinking this.

  • codeandvisual.com/test/construct_tnc/tnc.capx

    The game starts off at a nice 60fps but leave it for a few minutes and it heads down to 30fps and even further south. It seems to be accentuated when you go and collect some kittens.

    Can anyone point me to where the leak may be occuring?

  • Hi Ashley, you can see the deployed files here: codeandvisual.com/test/construct_tnc

    And download the capx here: codeandvisual.com/test/construct_tnc/tnc.capx

  • Not really, imagine this pseudo code: Boolean value = sprite.Y >10

    This would dynamically set the Boolean to True or False depending on the result of the expression (if sprite.Y is greater than 10 or not).

    Toggle just switches from true to false depending on it's last state.

  • Hi JohnJ, In this situation finding a workaround isn't really the focus, it's just serving to highlight the fact that references to two or more different instances of a single type can never exist in the same event action at the same time (and hence they can never have direct access to each other).

    Pinning was just an example (one that I currently am dealing with) of functionality that can't be used because of this.

  • Thanks Sully - makes sense

  • Hi is it possible to check the current mirrored state of a sprite?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi, with boolean instance variable it seems we can only set them manually to specifically true or false. Instead of the drop down can we rather have an expression that resolves to either true or false depending on the result?

  • Hi JohnJ, thanks for taking the time to reply but I think your example illustrates linking a sprite of one type to a sprite of a different type. What I am talking about would be like trying to pin one instance of Sprite2 (a ghost) to another instance of Sprite2 (another ghost).

  • Hey Arima, I've got a solution now but it seems kind of long winded, any chance you could explain more about of how you'd do it with events?

  • I guess I'm thinking specifically for things like having a pet/familiar follow you. You don't want to have to worry about making any complex AI or building too much logic to control it, so you just get the follower to retrace the player's exact steps via recording your their positions each loop. It looked like Pin was pretty much doing this previously, although unintentionally, when there was a lag.

    It was more a suggestion of if that functionality is a by-product of the way pin works anyway, why not add it as an option.

  • Hi, an answer to this question might solve a few problems for me.

    How do I Pin one sprite to another of the same type at runtime? (via the Pin command).

    As far as I've been able to tell you can't reference two different sprites of the same type at the same time, so my_sprite(1) can't be pinned to my_sprite(2). I also don't think you can hold types other than Boolean, Number or String in a local/global variable, so that approach wouldn't work.

    Any confirmation/clarification about this would be much appreciated!

  • There was a fix to the pin function with r69 which fixed the unintentional lag with the pin function. I'm making a game now that has sprites trail the main hero sprite and have coded it up so it works, but was thinking it was be great if you could specify the lag on the pin command to a custom number of frames to achieve this without the considerable amount of commands I've had to use.

    The way I see it you could set pin to 0 for locking items to the exact co-ordinates of the master sprite on each frame, however, if you set pin to 10 then there would be a 10 frame delay before the pinned items started following the master sprite, meaning they would position themselves to the relative location of the master sprite from 10 frames previously.

    Not sure if it's viable but it would be a cool option :)

  • Hi, in r69 I can build and test my file fine, but when I export and deploy to the server, the game pauses during hte loading process and I ge thte following error in the JavaScript console:

    if using WebGL: this.ga is undefined, c2runtime.js (line 92

    if not using WebGL: this.fa is undefined, c2runtime.js (line 71)