0 Favourites

How do I this?

  • It is my first time with Construct and there are many things I do not know

    the first i need to create an object, but not a specific object, just the one that his name match with the text in the Global Variable

    in my case, i just can specify one single object

    the other thing is, following a tutorial i have created an rpg inventory, how i do for set the value of the global variable with the name of the object placed in the equipslot of the inventory. so when you put an object on the equip slot in the inventory, then you can make it appear in the game by clicking on it

    this inventory uses one single sprite for all the items, and every frame is one single item

    this a picture of the inventory on the tutorial

  • You can't create objects using a text string, so you have to make a condition first then use the create object.

    Example:

    Object_to_spawn = GVpcSlot1
            Create object butterfly
    
    Object_to_spawn = GVpcSlot2
            Create object Cat
    
    Object_to_spawn = GVpcSlot3
            Create object Dog
    [/code:1jhnpopb]
    
    So use your global variables as tests in your conditions and based on that create the correct object.
  • Lol, you know that we have almost 700 pokemons? In that way i have to do it 4200 times, is the only way to do it?

  • Lol, you know that we have almost 700 pokemons? In that way i have to do it 4200 times, is the only way to do it?

    But the only thing to really keep in mind when designing your game is to take something like this into account, so for instant how do you organize or design a pokemon object so it can handle that many in a way you can work with it.

    It is unfortunately one of the lesser good things about C2 in my opinion, the bigger and more advanced your game become, the more you will notice the lack of tools for helping you manage and working with huge projects, its really on a minimum I think. But after a while as you loose control over bigger and bigger projects and scrap them, you will eventually realize that organising and really design things to be able to handle stuff you might add later is crucial for any big projects or they will most likely fail.

    Here are 2 tips for you:

    1. Do a lot of small independent tests - Analyse you game for elements where you assume problems might occur, obvious this is easier the more experience you have, but for instant if you know that you will need a lot of different units types in your case 700, how can you design such object so you can work with them efficiently, its definitely not a good idea to make 700 global variables to keep track of them, so how do you get around that? And you do this as a separate project simply to test whether its going to work or not, so don't add it in your final project and its best to do it before you even start the project.

    2. How do you organize a project so you can find things - In my game Dragonhelm in my description (Which is now abandoned) there is 5657 events. Now imagine finding a specific function or event, if you might not remember exactly what its called, or if you notice a bug in the game, but which event actual caused it?. So spending time on making a system so you know exactly where to look for things is a must. A good idea would be for instant not to mix functions and other types of events etc, but whatever works for you. But this is where C2 really crumbles in my opinion, the lack of tools for helping with this, you are really left with this almost alone.

  • Lol, you know that we have almost 700 pokemons? In that way i have to do it 4200 times, is the only way to do it?

    Yeah, use 1 object with 700 frames, or if they animate, with 700 animations.

  • There is a handy Nickname plugin that enables you to create an object by its nickname.

  • Here are 2 tips for you:

    1. Do a lot of small independent tests - Analyse you game for elements where you assume problems might occur, obvious this is easier the more experience you have, but for instant if you know that you will need a lot of different units types in your case 700, how can you design such object so you can work with them efficiently, its definitely not a good idea to make 700 global variables to keep track of them, so how do you get around that? And you do this as a separate project simply to test whether its going to work or not, so don't add it in your final project and its best to do it before you even start the project.

    2. How do you organize a project so you can find things - In my game Dragonhelm in my description (Which is now abandoned) there is 5657 events. Now imagine finding a specific function or event, if you might not remember exactly what its called, or if you notice a bug in the game, but which event actual caused it?. So spending time on making a system so you know exactly where to look for things is a must. A good idea would be for instant not to mix functions and other types of events etc, but whatever works for you. But this is where C2 really crumbles in my opinion, the lack of tools for helping with this, you are really left with this almost alone.

    Thanks for your tip, actually i have a good system to organize my project, I'll find that plugin

  • There is a handy scirra.com/forum/plugin-nickname-behavior-nickname_t74522 Nickname plugin that enables you to create an object by its nickname.

    Thanks so much, is what i need

  • > Lol, you know that we have almost 700 pokemons? In that way i have to do it 4200 times, is the only way to do it?

    >

    Yeah, use 1 object with 700 frames, or if they animate, with 700 animations.

    I need to set skills and different behaviors for ech one, i don't think I can do it in that way.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Sure you can, you have instance variables (and arrays) to do that. And you will end up with 700 times less code.

  • Sure you can, you have instance variables (and arrays) to do that. And you will end up with 700 times less code.

    I'll try it, but if you can give me an example I'll appreciate it.

  • Example for instance variables ? They are pretty basic.

    https://www.scirra.com/tutorials/search ... 0variables

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