jumprock's Recent Forum Activity

  • 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!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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)

  • I think I understand what you're suggesting and I appreciate the idea - will try it out.

    Would be great if you didn't need to take such a round about process to achieve something like this.

  • Hello, I have a sprite type for standard non player controlled (npc) sprites and at any one time there are a handful of these on screen.

    I am doing a loop through this sprite type and within each sprite I've saved the UID of a second sprite (of the same type) in a variable. I'll use this UID to reference the second sprite by way of Pick Instance by UID.

    The problem is that I am unable to reference two instances of the same sprite type at once in order to achieve something like the following:

    npc_sprite(1).width = npc_sprite(2).width

    I've put the (1) and (2) in there to demonstrate that these are different instances of the same sprite type, named npc_sprite.

    Hope what I'm trying to achieve makes sense, is there a way to do this?

    P.S. I am only using width as an example as the property I am trying to reference is actually a custom variable.

  • Hi cow_trix, I wasn't able to open your demo - said there was an unknown plug in ID.

  • Thanks for the suggestions - I'm using dataStructures plug in and it's doing exactly what I need it to.

  • I'm not sure if that's the problem.

    The basic situation is that I have a platform game with a main sprite that has a weapon pinned to it, when the character switches from moving left to moving right I am mirroring it so that it faces the correct direction. Previously the pinned items would reflect this and also mirror accordingly, this doesn't seem to be happening now and I have to manually mirror each pinned item. This would start becomming laborious if I was constructing a character that had multiple items pinned to it for whatever reason.

    I am not changing the angle value at all (I read the release notes and removed the angle transformation).

    Is this the intended behaviour?

  • Hi, is it possible to shift items in an arrray (this was previously called rotate in construct 1 I believe).

    I am wanting to store the last 10 positions of a sprite so that when a new postion is added to the 10th slot the position currently in the tenth moves down to fill the ninth, and so on so that the item currently in the first slot gets replaced by the second and is dropped off the end.

    Is there any way to accomplish in Construct 2?

jumprock's avatar

jumprock

Member since 17 Nov, 2011

None one is following jumprock yet!

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies