Kaisirak's Recent Forum Activity

  • It depends: -doing it on the same computer is pretty easy.

    -Doing it online with mostly client side programming requires a little programming and basic network knowledge but is not too hard.

    -Doing it with mostly server side coding and using C2 mostly for display is the hardest and more network intensive but also the most secure(really hard to cheat).

    Most of the time you won't need the third option, unless you're creating an MMO or any game where online is the most important aspect.

    If your friend knows what he is doing, he can really implement both without it being too hard.

  • If you're using tokenat, it shouldn't be an issue though.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well no actually, that's the point of the array, you won't make a mess precisely because you only need one X for each type of building instead of having an instance variable for each object you create and then having to decrease each of the existing objects' variable.

    What you don't seem to understand is that you can't change the default value assigned to a type of object, however what you can do is change the value you check when creating a new instance, which is what I do with the array. But nothing prevents you from using a variables in a player object, that would work just like the array.

    TL;DR : you can't change the default value, because it's a default value, arrays rule, I'm awesome

    Kaisirak out...

  • Well you can use a text variable or even a text, and either:

    obj.options & "1," on option 1 selected

    obj.options & "2," on option 2 selected etc

    or append text

    And to deselect one, use replace to find the value of the option and replace it with an empty string.

    As for choose, instead of using one value for each option, use twice the same.

  • I see the problem.

    When you create a new instance, construct2 "picks" it, and since you assigned 10 as the default A value, it reduces your credit by 10. What "I" does is set A to 5 for all the instances that already exist.

    A simple solution to this problem would be using an array to store each type of building's cost.

    Here is the capx: modified_buildings

  • Is there a way to select which member of a famility to create when using System:create?

    Let's say I want to create a new enemy at runtime, but I want the enemy created to be randomly chosen in the family.

    Do I have to create an event for each type of enemy in the family or is there a more practical option ?

  • Is your variable in the family or in each building?

    You can use for each in this case but it's not necessary.

    the capx: buildings_capx

    use the letter "I" on the keyboard to see that the variable for each building is decremented by 1.

  • I don't desperately need it, and like keepee said there are workarounds, like instead of using textwidth, you can multiply the textsize by the number of letters to set the width.

    I just thought textwidth was designed to avoid doing that.

    Don't worry about it, and keep up the great work.

    As a side note, I know you said you wouldn't add rotation to the particle system, but do you think adding animation to the particle is possible ?

    I know I could create my own particle system, but it just seems like a waste of energy when the existing particle system is great and only lacks animations

  • Well actually I tested it further after seeing your post, and it seems the text being visible or not isn't relevant. But when I try setting the width of the text to the TextWidth of the text, the value is 0.

    If instead of using textWidth to set the width I use a number, then it will display the correct value. But that defeats the purpose of textWidth.

    the capx

  • I'm not sure whether it's a bug or not, but it's preventing me from doing something. Using the rev103.2.

    When a text is set to invisible, you can still access the text.Text, and it will show the correct string. However text.TextWidth will always show 0 regardless of the length of the string.

    And even after adding the event to make it visible before trying to use TextWidth, it still shows 0.

    Only way to use TextWidth is if the text is always visible.

  • Ashley, ok, it just seemed weird. I figured it worked the way inheritance works in other programming langages, that's my bad for not RTFM.

    Thanks

  • I think I have the same problem, but I'm not exactly sure.

    Here is my problem:

    I have a family called Monsters :

    • skeleton
    • muchacho
    • ...

    Every monster in the family has a "death animation"

    And here is the situation:

Kaisirak's avatar

Kaisirak

Member since 14 Aug, 2012

None one is following Kaisirak yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies