nimos100's Recent Forum Activity

  • You use addons in your project, so unless someone have those installed or are willing to install them I doubt you will get help Can you post screenshots of you code instead then it might be easier for people to help you.

  • 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.

  • 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.
  • [quote:1w6l5982]I just made 3 more families - LgDisk, MdDisk and SmDisk. So i should be able to change and add 2 more events for - System - For each LgDisk/ MdzDisk/ SmDisk.

    And forgive me

    nimos100

    , i'm not understanding your text1.text = str(object_1.Pin.pinnedUID)

    Can i trigger that with - LgDisk > On Created?

    Sorry was just using a textbox as example.

    My point were as you pin one object to another, the object that you pin the object to can be received, since that is the case you can get the size and thereby add the correct score.

    Here is a simple example:

    https://dl.dropboxusercontent.com/u/109921357/Get%20pinned%20UID/Get_pinned_UID.capx

    If you click one of the stars (Blue circles) you get a text showing its UID and the UID of the disc that its pinned to as well as the size of the disc. Which if I understood you correct would decide the score.

  • You can get the pinned UID when you use the pin behaviour.

    For instant:

    On start of layout
          Pin object_1 to object 2
    
    On key pressed 'A'
         text1.text = str(object_1.Pin.pinnedUID)  <-- (Will set Text1.text to the UID of object2, you can use this to pick the correct disc and then get the correct size/score)
    
    [/code:1v4hxh6y]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not really sure there is a best way to integrate music files. You could try to reduce the bitrate on import. If its because you don't want to wait for the loading. You can use Audacity and cut out a section that you can use for testing while making your game and when you are done copy over the correct audio file. At least that way you can add the music and test that it works etc.

    Another solution is to make a variable containing the audio file name and just change that around from the test file to the correct file when you are done. Obviously you would have to add the variable name instead of the audio filename the places where you used it with the audio object.

  • You can turn the objects global in the properties panel. This will make them stay between layouts.

    An array should be global by default as far as I know.

  • [quote:1l7ubrr1]What I want to do is to use a variable as an object in expressions, for exemple, in my game I have a variables that contain the name of the Hero the player choose for the A slot, another with the chosen Hero for the B slot (etc for C and D). So one variable per slot : ChoixHeroA / ChoixHeroB / ChoixHeroC / ChoixHeroD...

    Here what I want to do ( would make 4 events only : one per slot) :

    lerp(self.width, (ChoixHeroA.POWER/ChoixHeroA.POWER_MAX)*BarrePOWER_A.LargeurInitiale, 5*dt)

    Here what i have to do ( make 40 events : 4 slots x 10 hero) :

    lerp(self.width, (HardcoreGirl.POWER/HardcoreGirl.POWER_MAX)*BarrePOWER_A.LargeurInitiale, 5*dt)

    Nice graphic and idea for a tower defence

    I think your problem is in your object design, so you should be able to fix it by thinking about your heroes a bit differently. Meaning that your heroes share a lot of common attributes and functionality, Like health, they can move around and so on.

    Since these things are shared, what you can do is look at all your heroes as being the same object type, except with different values, such as name, damage, movement speed and so on.

    So you can solve it several ways. Either you can make one hero and make a unique identifier such as a name variable and use that whenever you have to work with a hero, like this:

    //Require: 
    //Hero.Name
    
    Function Power   (Just a function)
    Pick Hero.Name = Function.param(0) <--- (Function.param(0) would contain the name of the hero you work with) 
    lerp(self.width, (Hero.POWER/Hero.POWER_MAX)*BarrePOWER_A.LargeurInitiale, 5*dt) <-- (This wouldn't work in this example. But what is important to notice is that you can replace the "HardcoreGirl" with "Hero" and thereby make it work for all of them. rather than having to duplicate code, which I guess you want to avoid. But the principal is the same."
    
    [/code:1l7ubrr1]
    
    In this case assuming the lerp worked, it would happen to the hero with the name you call the function with.
    
    Another way is to use a family and add all your heroes to the family. Which would allow you to do as show above as well. Just make sure that all shared variables are added to the family object and not the individual heroes.
    
    Again a good idea to use a unique variable such as name even if they are in a family.
    
    Both methods also allow you to use "for each FAM_heroes" if that's what you called the family or "For each Hero" if you just use one  sprite for all heroes.
    
    However using Families are in my opinion the way to go as you can better work with each individual hero.
    
    If none of what I wrote here makes sense. I suggest you read about "Functions" and "Families" in the manual. And if I misunderstood you, then ignore what I wrote
  • You can generate 4 random numbers and store them in variables then combine them and store them in a string.

    Random_IP = <Random nr 1> & "." & <Random nr 2> & "." & <Random nr 3> & "."& <Random nr 4>

    You can then use tokenat(Text, index, Seperator) if you ever have to extract the numbers again.

    Tokenat (Random_IP, 0, ".") <---- Will get you <Random nr 1> in above. So you simply increase the index number to get the rest of the numbers.

  • Timer behaviour extended checks

    A minor suggestion to extend this behaviour, so it would be possible to check if a certain timer behaviour is currently active.

    Event condition:

    Is timer running - Would check if any timer is currently running for the behaviour.

    Is timer with tag running - Would allow the user to specify which tag there should be made a check for.

  • Auto/manual sorting of the list object

    Would be nice if there were a property for making a list auto sort or to manually do it. This could be either a property you could turn on for the list it self in the properties panel or as an action that you could call in your code.

    Action:

    Sort list - Would sort the list using a basic sorting method. So "a" would be before "b" and numbers would be before letters etc. Could be expanded so you would be able to use tokenat to customize which parameter of an entry text should be used for the sorting method.

  • I don't think there are any rules regarding the size of such, it pretty much depends on what you need/want it to be.

nimos100's avatar

nimos100

Member since 23 Sep, 2012

None one is following nimos100 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies