dop2000's Forum Posts

  • Why do you need a character 1920x1080 pixels in size? This is insane. Please read this article:

    construct.net/en/blogs/construct-official-blog-1/remember-not-waste-memory-796

  • Ashley I don't want to create a new post for this simple request, but could you also change the way Escape button works when editing scripts in event sheets?

    Now, with autocomplete I often find myself pressing Esc button to close an unwanted drop-down list (as it's done in many other IDEs). And instead this exits the script editor and undoes all edits! You can add many lines of code, then press Ecs and it will all be lost in an instant.

    Could you change it so that pressing Esc first time closes any drop-down lists, pressing it second time exits the script editor, but preserving all changes?

    .

    Please vote for this idea if you agree:

    construct3.ideas.aha.io/ideas/C3-I-1187

  • Use anchor only for the white sprite, remove anchor from the red sprite. Pin red sprite to the white sprite on start of the layout. And of course set the origin image point on the red sprite at the right edge.

  • Search the tutorials section, there are lots of good (and bad) examples.

    It all greatly depends on your game, but you can use something like this as a starting point:

  • Examples you posted are for HTML DOM objects, they will not work for Text in Construct.

    You need to change horizontalAlign property, as described here:

    construct.net/en/make-games/manuals/construct-3/scripting/scripting-reference/plugin-interfaces/text

    This works for me, but you need to run it in the latest beta version:

    const textObject = runtime.objects.Text;
    const textInstance = textObject.getFirstPickedInstance();
    
    textInstance.horizontalAlign="center";
    

    I'm new to scripting, so if anyone knows how to optimize this code, please tell.

  • Well, I can only tell that event #5 and function "Bee_Enter" should definitely work and set instance variables on the Bee correctly. FireRate should be 0.1 and Duration=3. Maybe there are some other events which you didn't show on screenshots that change these variables.

  • I am not familiar with the addon you are using for action sequence, but I'm pretty sure the problem is somewhere with that addon and not with function parameters.

    Run your game in debug mode, check Bee instance and I bet you it will have correct values in FireRate and Duration instance variables.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley What about the keyboard shortcuts? Chrome intercepts many shortcuts, for example Ctrl-F4 (debug mode) or Ctrl-W (close event sheet/layout) will close the entire Construct window. This is extremely annoying and is one of the main reasons I prefer Desktop build..

    Also, will there be an option to set preview browser to NWJS (to be able to run and test NWjs plugin-specific events)?

  • Here is a much simpler version, drag markers with mouse:

    dropbox.com/s/vjibkjmtawms68w/CharacterSelection3.c3p

  • Here you go:

    dropbox.com/s/rpomc62vabnpb9s/CharacterSelection2.c3p

    .

    You are really over-complicating things. You can easily reduce the number of sprites from 6 to 3 and get rid of families if you use different frames/animations for different players.

  • It's because the variable value remains 1 and your event "variable1=1 ... set typewriter" is restarted on every tick - 60 times per second.

    You don't really need the variable here, just start typewriting directly in "On key released" event.

    Or if you need the variable for some reason, make sure to reset it to 0 when typewriting starts.

    Or add "Trigger once" condition, but be careful, when used incorrectly it can cause many problems.

  • You probably have default controls enabled on enemy object, disable them in Platform properties.

    Another possible explanation - if you have PlayerFamily and using it in events (for example "PlayerFamily simulate jump"), when you cloned your Player object, the cloned Enemy object was also added to the same family.

  • To save an object:

    // First you need to pick one instance of object
    // this can be an instance of Object or Toy family or Ball family, for example:
    Touch on touched Toy
    	Set sJson to Toy.AsJSON
    	Set sname to Toy.ObjectTypeName
    

    To re-create the same object:

    System Create object (by name) sName
     System Pick Last Created Toy
    	Toy load from sJson
    
  • then to load it i create a ball or toy by UID and do the following?

    There are multiple problems with this:

    1. You can't "create by UID", when you create a new object, it will have a new UID, different from what you saved earlier.

    2. When you create a family, a random family object will be created. For example if your Toy family has 3 members (Bear, Monkey and Chicken), when you do "Create Toy", a random animal will be created. So you need to create the right object specifically. For this you need to also save object's name (Toy.ObjectTypeName) and then create this object by name. After that you can use event "System Pick Last Created" and load it from JSON.

    3. Finally, you don't need save/restore two JSON strings for each family. JSON string contains all object properties, which already includes all family properties. So you can use just one (any one) string - Object.AsJSON, Ball.AsJSON or Toy.AsJSON - they all will be identical.