goblynn93's Forum Posts

  • This is what I am seeing instead of a space:

    ?

    I think I might have found the issue...

    My CSV file is possibly encoded as ANSI instead of UTF-8?

    Going to try that...

    EDIT

    Fixed!!

    I opened up my .CSV in Notepad editor and Saved As with UTF-8 encoding instead of ANSI.

    No more ?!!

  • dl.dropboxusercontent.com/u/39000273/Data%20Entry%20Test%20Project.capx

    There you go!

    I used to have a button to export the arrays to the Browser Log but they looked fine there. Its in the List that it falls apart.

    Thanks!!

  • Hello!

    I have imported a plain text .csv file into an array.

    I loaded the array items into a List object.

    When I look at the list there are question marks inside black diamonds where the spaces should be...

    dl.dropboxusercontent.com/u/39000273/Untitled-1.png

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've figured out how to use IndexOf() and it works great as long as my string is exactly the same as my IndexOf(str).

    I am guessing there is a way to add in Left (text, count) to get the rest of this done...

    *edit

    Looking farther it doesn't seem there is an easy/elegant way to do this.

    IndexOf("B"wildcard) would be ideal.

    Without that option I have to pull each cell value individually, ForEach, truncate it, check it vs my conditions, reject or accept it, set a variable with its cell number, and move on.

    That's a lot to do... No Wildcard??

    No way to do like command line style "DIR B*.exe"?

  • I haven't tried it yet but looking over your image I think I understand why it works. The Trigger Once keeps the Instance Variable change to only the object breaking the rules instead of across the whole batch.

    Unfortunately I did something really really stupid when I was saving out the CAPX and I have to redo everything I did to get to the point I was at and failing.

    Thanks for light at the end of the tunnel! Construct 2 is way outside my normal job of video engineer and you guys are so helpful!

  • Wow thanks for the responses!

    klkitchens method is very fancy... I think I understand how it works and it solves another issue I was having without having to post about it now!!

    Paradox the Every X second and increment trigger sounds like the best option... I can adjust it easily as the number of objects to be spawned changes and as I get more or less objects I can easily change cycle time as well.

    Thanks for the great answers!

  • Just in case anyone reads this I will explain why it would be useful in my situation...

    My project is built for a Desktop with two monitors... one monitor is only for displaying information so being able to lock the mouse to the first monitor would be an advantage for not losing the mouse!

    Even if we could set the X, Y of the mouse that would give us the ability to create our own mouse lock-down! Or jump the mouse to the X, Y of an object would do much the same... some kind of control over cursor position!

    Thanks for the reply!

  • Thank you for taking a look!! Its a mess, I know...

    If you watch the numbers they vanish in groups instead of fading or vanishing because of an overlap condition...

    The slow fade out is intentional. They all fade eventually or else I would never end up with more space to emit more things into!

    What I want is when the larger objects are emitted and are overlapping the smaller objects that the smaller objects go away and leave clear space for the bigger objects...

    it won't make much sense as a game thing because the project is not a game in the end...

    Currently: (not the CAPX)

    Bouncing ball controls emitter position.

    Emitter checks that it is not overlapping another emitter, an emitted object, or one of the "walls".

    If the Emitter is clear it emits a Place Holder which then get Text and other things Pinned to it.

    The larger sprites are the focus, the smaller sprites are filler.

    What I want:

    Bouncing ball controls emitter position.

    Bigger emitter emits when clear of walls and other big objects.

    Smaller emitter emits when clear of all walls and big and small objects.

    If the bigger emitter puts a big object on a smaller object I want the smaller object(s) to go away.

    The big objects should dominate the space. Any time they are ready to show up they should and everything that's smaller and in its way should Destroy.

    I hope that makes sense...

  • Its not always possible to make a capx. Not without rebuilding the entire project to clean out client restricted content...

    Repeat 10 times

    Spawn Object Size 10, 10 at Position 5, 5

    Add 10 to Position X

    This spawns 10 square objects in a straight line all at the same time.

    I would like to place a slight delay between each spawn. 0.01-0.1 seconds.

    I've tried to add "Wait" in various places and it will skip spawning objects or have zero effect.

    Repeat 10 times

    *Wait 1 second*

    Spawn Object Size 10, 10 at Position 5, 5

    Add 10 to Position X

    results in object spawning being skipped and I only get the last few

    Repeat 10 times

    Spawn Object Size 10, 10 at Position 5, 5

    Add 10 to Position X

    *Wait 1 second*

    seems to have no effect and all objects spawn all at once.

    Perhaps using Repeat X Times is not the way to accomplish this? Its nice and cyclical but maybe I need to build something less procedural with the same results so I have someplace to put in my pauses?

  • I managed to brute force something I can share...

    basically I have bouncing balls controlling some sprites as emitters. The emitters check for certain collisions/overlaps and if they are in the clear they emit.

    The big emitter is dominant. It can emit on top of the small emitter. If the big emitter emits on top of a small object it goes away.

    Or at least that's the goal.

    There is probably some broken/unused stuff in the capx but I tried to get it down to just the emitter engine and what they emit.

    Yes, its 3840x1080... browser zoom is a little odd with it but I set Chrome zoom level I want, exit out, come back in and its centered better... Its an odd project!

    dl.dropboxusercontent.com/u/39000273/spawn%20destroy%20sample.capx

  • nope... didn't help...

    I'm not sure which would take me longer rebuilding this into a capx I can post or just figuring it out...

    I wish Copy Paste from one project into another would at least pull all the objects needed, trying to make samples of problems from big projects is so tedious...

  • Unforunately the problem is heavily embedded in a project that I can't share and there are lots of things controlling other things making it not so easy to pull apart for a clean version. Nor does rebuilding it makes sense...

    I did figure out my issue though... I had forgotten to increment my Instance Variable that gave each a unique ID. Once I get that in there I think this will work.

  • So I've tried to apply the instance variable that seemed to be working and now that everything has its own version I am seeing random objects being destroyed. going to have to dig farther... frustrating.

    Is there a really good tutorial on Instances and picking/spawning/destroying sprites with instances?

    *added: I can't seem to find anything that focuses just on this. It all seem to just sort of gloss over this part of Construct 2 like I should know what's going on from my extensive web and computer programming background that I don't have.

    I know it can't be as hard as I am making it. Construct 2 makes everything so easy -once you know how-...

    Problem is I am much too much a newbie I don't even know the proper terms to begin a search for what I need!

  • I have an object that is spawned multiple times. I would like those objects to be destroyed when the overlap another object.

    I can get the object to Destroy on overlap but the problem is -all- the objects are destroyed not just the 1 that is overlapping at the time...

    How do I do something like:

    If any instance of Object X is overlapping Object Y then Destroy the instance of Object X that is overlapping and leave the rest alone?

    I tried to use an Instance Variable Boolean and then If True Destroy Object but it still destroys all the objects not just the one that was set to True.

  • Well I have not found a complete solution to my problem yet.

    I have worked around the issue by setting the Mouse to None when it crosses over areas that I want to display cleanly.

    :) Always more than one way to accomplish something similar/acceptable.