LukeW's Recent Forum Activity

  • I don't think it's UID that's causing the issue.

    I can set value to 1 in the event for example, and it's still only going to change the array for the first instance in the layout.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Right, so this is working well, except I have an issue.

    The array is checking for the Sprites UID and changing the array as necessary but, if there's more than one instance of the sprite it is not making multiple array changes.

    So I can have 5 of the same sprites on the screen, move them around and watch the array changing accordingly, but it's only changing for the first instance of the sprite. The rest are ignored.

    Any suggestions?

    Cheers

  • Hey, so I read somewhere that the C2 education package will be discontinued at some point to make way for C3, but I can't find a link to it.

    As someone who has now taught with C2 for a couple of years, I'm hoping Scirra keep the C2 packages active. First, there is no way I can justify spending $1600 for a year's use of C3 when I was paying a 1/4 of that for C2.

    Also, being in a government system, I've had no end of headaches when it comes to working with programs that work across the internet. C2 had the benefit that we could roll the software out across the network and then not have to worry about it trying to talk to servers somewhere across the world. Relying on something that is connection dependent would be a no-go for me as it's asking for trouble in a classroom (gave up on UE4 because the verification servers always got blocked).

    Can someone clarify if C2 education is going to be discontinued or not.

    Cheers

  • dropbox.com/s/ek8cv68m874mq5j/DoNOTargetANonFlyZone.capx

    Yep, something like this was pretty much exactly what I was thinking, thanks for taking the time to put it into practice. My issue with it is that there seems to be a lot of checking going on and creating unnecessary instances.

    You could also use an array t do this and just store the uid of the object in a grid space (beware one object will have a uid of 0).

    I totally forgot about arrays. This actually sounds like it could be really efficient and might solve all my issues. Cheers for that.

    Thanks, I'm going to go away and have a bit of a play with this.

  • Thanks for the replies

    Instead of spawning a beacon object you could add instance variables to the npc: "targetX" "targetY" .

    On mouse click, if there is no NPC in the space set targetX, targetY to mouse.X,mouse.Y. and trigger the pathfinding.

    I thought of that originally, but the issue with that, as 99instances2Go points out, is that it's not checking if there's another unit moving towards that space.

    Sounds like a valid solution to me. But. You gonna have all sort of little problems due the spawning. Mainly because you can not use a newly created object to evaluate things before the next top level event. You also need a system that pairs NPC to its target. That is easily done with instance variables, yet will force you in a lot of picking. And in the end you win nothing to little compared to the already proposed solution.

    I considered setting an alarm when clicking a unit to move it, so that it waits like .1 of a second before checking the area and moving off, as I thought timing might be an issue. I'm going purely theoretical though so I haven't tested anything but thought there might be some timing issues involved. It seems like a really clunky idea though and I'm convinced it's a silly way of doing it.

    I may have missed something though, but what's 'the already proposed solution' that you mention? Or are you referring to mekonbekon's post?

    Cheers

  • I had an issue like this for a tilemap that was otherwise aligned fine. Had a white line in the editor at one seam-point in the layout, but it wasn't repeated in other areas where that same tile combo was used.

    It wasn't there when the program launched though, so I just ignored it.

  • Heya

    Been trying to think of the best ways to do the following. I wanted a top down project where an npc can be clicked and ordered to move to a position if that gridspace is free. movement and everything is easy enough to set up with the pathfinding tool, but the area check is what's giving me pause.

    Was wondering if, rather than having the npc move to mouse.x, mouse.y, instead I should spawn an invisible sprite that spawns in that grid space and acts as a beacon, remaining in that area until the npc either dies or moves to another area. that way, when you click to move an npc to an area, the beacon won't spawn in that area if there's already one in the space, and so the next npc can't move.

    It seems a bit convoluted though, and I don't like that I'm effectively doubling the number of instances in the level by doing this.

    It might also be better than the second npc can move in the general area of the first, and instead fill an empty space adjacent to the targeted area.

    Is there a better way to handle this?

    Cheers

  • Heya

    Trying to make a little RTS and I want the troops to be able to move freely through each other, but only have one standing in each tile once they get to their location. Best example of this I could think of are the troops from the original Command & Conquer, where they could walk freely through a group of standing soldiers, but there could only ever be a limit to how many occupy one tile (in that game 5).

    Tried looking around the web for best practise with no luck. Even the RTS template on C2 doesn't address this issue as the tanks can occupy each other's space.

    So basically, I want troops to be able to walk past each other (so no blocking in terms of pathfinding) but I don't want them to be able to stand in the same tile once they come to rest.

    Cheers

  • Thank you.

  • How's this:

    https://dl.dropboxusercontent.com/u/542 ... lemap.capx

    If you want tiles you placed in the editor to autotile you'll have to call "bitwise update" for each tile at the start of the layout.

    R0J0hound I know it's old now, but I don't suppose you still have this lying about? The link's dead and I was hoping to have a lookie <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    Cheers

  • How do you plan to extend/shorten its length? looks like that gif is one single lazer with a clear start and finish, which means that if you keep it that way, you'll be stretching it out and it will looks weird.

    What I think would be best is to have a modular lazer beam that can be short or as long as it needs to be and the system adds in the segments to match the length. That would require breaking up them beam into parts, and each segment would need to start and finish in the same spot in the sprite sheet so the beam looks continuous as it animates.

    Someone else might have a better idea than me though.

  • It looks like that beam is split up into separate sprites. If you look carefully, you can see repeated sections, some mirrored.

    I reckon a simple way would be to have a bunch of beam segment sprites that get called in randomly and placed along a path. As long as the sprites all have the same start and end point there shouldn't be any visible seams. Hell, you could even animate them if you had the time to spend on it.

LukeW's avatar

LukeW

Member since 26 Mar, 2017

Twitter
LukeW has 9 followers

Trophy Case

  • 7-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies