dop2000's Forum Posts

  • As for your original question, I think if you tick Minify Script during export, it may be possible to get the Source Map - the list of all C2 names and their corresponding minified names. This map is used to read logs and error messages of minified apps and there should be some configuration options in Java to generate it.

    However, if C2 export changes names before minification, this will not help.

  • How many objects do you need to create this way? Maybe it will not be such a bad idea to add a bunch of events like this:

    If enemyType="Zombie" Create EnemyZombie

    Combine all such objects into a family, define an instance variable LevelBuilderCode and use it to link your C2 object with your level builder object. You'll be able to select any object/instance by picking family member where LevelBuilderCode="..."

    As for the object-specific instance variables, maybe consider replacing them with dictionaries. You can attach an instance of a dictionary to each object and this will give you an unlimited number of variables which you can easily add/remove/modify in runtime.

    One more thing - to minimize the number of objects, group similar objects in one sprite with different animations. Animation name can be passed as a string from your level editor.

  • You project size is 1GB???

    And you don't even bother naming your sprites properly?

    No, sorry man, I'm not downloading this.

  • I don't quite get it - why do you need objects' names, properties, instance variable names in runtime?

    Are you planning to access objects by their 'given' name, something like this?

    enemyType = choose("Vampire", "Zombie")

    System -> Create instance of Object "Enemy" & enemyType

    And this will create an instance of either EnemyVampire sprite or EnemyZombie sprite?

  • Thanks korbaach, used your formula today in my game!

    BTW, the reverse formula for setting slider position to current volume is this:

    position = 10^(volume/20)

  • It should be working, maybe it's off by more than 2 pixels.

    Also I mixed up x and y in my previous comment.

    try

    Distance(sprite.x, sprite.y, 432, 49) <50

    If it works, try <20, then <10

    Or use MoveTo plugin.

  • X and Y coordinates almost always will be in fraction of a pixel, for example x=49.028388481, y=432.1493800217

    You should try something like this:

    System -> Compare two values -> Distance(sprite.x, sprite.y, 49, 432)<2

    Also, check the MoveTo plugin:

    It's easy to use (easier than custom movement) and I think it has "On reached destination" event.

  • you can do this:

  • Also, instead of searching for an empty slot, you can use Insert/Push/Pop actions to add/remove elements.

  • This should get you started:

    https://www.dropbox.com/s/ygidyzwdtnt4t ... .capx?dl=0

  • Try setting the speed before you set the angle.

    If speed=0, then Bullet-Set Angle action is ignored.

  • Scrap my previous advice

    Replace your whole event with this:

    You probably don't need the array. Just set some instance variable on the dots that are already connected.

    And one last thing - StartLine function requires three parameters and you only passing two.

  • There is also a trick if you need to pick 2 dot instances and work with them independently in one event.

    Create a family and add your dot sprite to it.

    This will allow you to do things like this:

    On touched dot   <-this will pick one instance of dot
        Pick familyDot where <some criteria>   <-this will pick another instance of dot
        Line set width to distance(dot.x, dot.y, familyDot.x, familyDot.y)  <- draw line between two instances
    [/code:3o3pzqqj]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In your event #5 the system picks 1 dot (which is clicked). Inside this event you can't pick other dots.

    If you need to pick another dot, you should do it either in a function, or add event "System->Pick all dots" and nest your events #8 and #9 inside it.

    There are other errors in your game, but at least if you fix this your second line gets created.

  • Nothing is wrong, it's the way time and distance work in our Universe