sattler360's Forum Posts

  • 10 posts
  • Excellent! That makes sense. Don't know why I didn't see that before.

  • I've defined a custom function in my Construct project. And yet when I go to the Functions menu it doesn't appear as an option.

    Here's what the documentation says should happen:

    Here are my functions:

    And yet when I go to add one, I only see one function listed:

    Is there something special that makes a function appear in the Functions menu?

    By the way - I'm also having trouble calling any of those functions from within my code. I assume the two problems are related.

    Tagged:

  • I'm creating a number of sprites that all need to be children of a single parent sprite.

    The "Add Child" function lets me set an *object* as a child, but not the *UID of that object*.

    Is there a way to programmatically set the parent of a child sprite that I'm missing?

    When I create the child sprite, I actually know the UID of the sprite I want to be its parent. But when I "Pick instance with UID" X (where X is the parent sprite's UID), I can't add the child sprite to its parent.

    This is what I have:

    ... which comes during a loop where I'm creating the child sprites. "builtstructures.controllingstructureID" is the UID of the parent sprite.

    Any suggestions?

    Tagged:

  • Thanks all. FWIW, I am now dedicating a frame of the "placement cursor" animation to each object. When an object is selected from the pulldown the ID of the frame is put in a global, which then lets me set the animation frame of the cursor. I just have to put a copy of each object into the placement cursor animation when I create it and keep track of which frame it's in when I do so. Not terribly tricky and seems to work fine. Thanks for your help.

  • Thanks for the suggestions. I can set the value of the cursor to a given sprite, but how do I set the cursor value to the *name* of a sprite? I will have 100 different sprites to choose from.

    The animation idea is interesting, but also seems like a lot of if-then work ("if selected option is X, use animation frame Y, and so on..."). I guess I could pre-load the ID of the animation frame and say "set animation frame to the value of selectedobject.cursoranimationframe".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'd like to allow the player to "place" a given object at the mouse's X/Y coordinates. They'll select the object from a pulldown list, click somewhere on the screen, and the selected object will appear where they clicked.

    I've worked out how to allow the player to select an object from a pulldown list and set a global variable to the object's name, but I can't change the mouse cursor to the selected object.

    I can "Set cursor from sprite," but that forces me to pick a specific object, not a global variable.

    I've thought about creating the variable object programmatically and pinning it to the mouse X/Y every tick (setting the actual cursor to None), but *that* forces me to pick a specific pinnable object too, not a global variable.

    I suppose I could set up a vast if-then selection tree, where if the global variable = objectX, set cursor to objectX .. etc etc, but that seems ridiculous.

    Any suggestions?

    Tagged:

  • FWIW, here's how I did it:

    1. Added LoadStructures (pulled in the JSON file), tagging it uniquely

    2. Added a new event to check when that uniquely-tagged LoadStructures event finished

    3. grabbed the .LastData value of the LoadStructures event (which was everything in the JSON file) and added it to my in-game array

    So tagging the LoadStructures AJAX object was the answer, but *referencing* that was the hard part to figure out

  • Shouldn't I see an "AJAX" option in my "Add New Object Type" dialog box? (screenshot above)

    For example, the "Sprite" plugin is preloaded, so every time I need a Sprite I select it from the "Add New Object Type" dialog box and create a new sprite. Shouldn't I also have an AJAX option in my "Add New Object Type" dialog box .. so when I need to add a new AJAX expression I can do so?

  • Right. But I don't see any AJAX options in my "Add New Object Type" dialog box. If it's added, why don't I see AJAX options there when I'm adding a new object?

  • Howdy. I'm trying to add a new AJAX object (so I can populate an in-game array with the contents of a JSON file), but the AJAX options aren't appearing in the "Add New Object Type" dialog box.

    At one point in my project I was able to add an AJAX function...

    and my Addon Manager says AJAX is loaded...

    But for the life of me I can't figure out why I can't add more Ajax objects. Did the plugin get uninstalled somehow? Can I reinstall it?

  • 10 posts