[Suggestion]"Object's Name" parameter filed

0 favourites
  • 10 posts
From the Asset Store
Source File, music and art pack for Android Negotiator
  • Hi,

    I would like to suggest adding an extra optional parameter input field, which would allow to pick/create object via its written name.

    I have large number of Tiled Backgrounds Each requiring to be created on the run. My option right now is to make loads of events, each creating one of those tiled bg's. With that extra parameter filed, I would cut down on events to just one ( with the name being called from variable, that holds different value per sprite that is used as spawn). Same would go for PICKING, FOR EACH loop, and other that require to pick object from the pop up box.

    What do you guys think, would it be useful for ya too?

  • I think I see what you are getting at. You don't want to hard code all the Event blocks for creating your different Tiled Background Object Types. That seems like a reasonable and worthwhile addition to any of the Condition or Action dialogs that require you to pick a Plugin Object Type. This would definitely be more efficient and result in a more minimized Event list. I would say that this would be a very nice dynamic feature that would be beneficial to many people.

  • Try this 3rd plugin - nickname

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For picking you should use families and families instance variables.

    Also do you really require several tiled background and can't you make use of the "Load image from URL" action with project files for example ?

  • Yo,

    Thanks!

    509Dave16 Yeah, I just want to make a loop.

    rexrainbow cheers, will try it out.

    Kyatric I do use, and I do require However, here I don't know if I can have several instances of the same tiled bg, but for each one of them load different image. If you're saying that's possible, then I will try this too.

  • I don't know if I can have several instances of the same tiled bg, but for each one of them load different image.

    As I can remember You can't do that in C2. It was possible in CC to have multiple instances of same tileBG with different texture on each of them, but not in C2 - at least while I was testing it few months ago.

  • > I don't know if I can have several instances of the same tiled bg, but for each one of them load different image.

    >

    As I can remember You can't do that in C2. It was possible in CC to have multiple instances of same tileBG with different texture on each of them, but not in C2 - at least while I was testing it few months ago.

    Cheers. Will try rex's plugin. Seams like it's good temp solution.

    EDIT@ Yeah, I tired that plugin and it will do. Thanks again rexrainbow !

  • megatronx - I had this very problem as well. I tried Rexrainbow's plugin and it works well enough for creating object dynamically it was a little short of what I needed. I found a pretty simple work around though that might help. It a bit of extra code but i keep an extra event sheet that in it I create a function for each object (Sprite, Dictionary, Text, etc) with the same name and just make the return value its As.JSON element. I can them call this function where ever based on the name of the object I want and get its JSON string and load it to a temp object as needed. I also over load the function with useful commands for instance my functions that reference dictionaries all have Get, Set depending on the number of params I pass the function. This makes working with dictionairies dynamically via ajax so much easier as I feel data management is poorly lacking (currently) in C2. This is the only way I know of for now to dynamically reference objects in C2 until they are able to put it in natively.

    Example Dictionary Function Declaration:

    If the function"PlayerSettings" is called with no Parameters then it returns the JSON string of the object

    If it has 1 param then use that param as the Key and return its value

    If it has 2 param then I set the value

    Example Usage 1

    Each Setting Dictionary gets flags added to it dynamically

    Example Usage 2

    On start of layout I call the function by its string name and set the player name

    While I use more for data manage management I feel it would work for objects as well. Hope this helps

  • This is redonk. Should just be able to store multiple named images in a single TiledBG. Same for tilemaps...

  • This is redonk. Should just be able to store multiple named images in a single TiledBG. Same for tilemaps...

    Agreed

    troublesum thanks

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)