dop2000's Recent Forum Activity

  • You can pass Array.AsJSON and set array from JSON string. But of course it's still cumbersome to use.

    Another option is to create multiple instances of array object, then you can store different data in each instance and pass array.UID as a parameter.

  • if param(x) == 0 && param(x+1) == "Set" >> set varaible to 0.

    Are you still using the old Function object? You really should update it to built-in functions. You will be able to name and set a proper type for each parameter.

  • Don't worry about it, most apps work this way. The Android OS decides when to unload each inactive app from memory.

  • Use a calculator:

    (mouse coordinates-tilemap position)/tile size

  • Yeah, I have the same error when using the latest NWjs version 82.

    The remote preview works fine with NWjs 75

  • Mikal's new Greengrinds addon has this condition. EDIT: and the official Greenworks plugin too!

  • Yeah, that's one way to do it. You can also use a binary value - see the documentation for setbit and getbit expressions.

    Another option is to use 4 variables: Fire, Earth, Water, Air. They can be boolean, but I prefer to use number variables with values 0 for false and 1 for true.

    Then when fire attack is placed in any slot, you set Fire variable to 1. When water attack is in any slot, set Water to 1.

    Then you can use them to build the name of the bullet template:

    Set TemplateName to BulletType
    
    If Fire=1 : Set TemplateName to (TemplateName&"_fire")
    If Earth=1 : Set TemplateName to (TemplateName&"_earth")
    If Water=1 : Set TemplateName to (TemplateName&"_water")
    If Air=1 : Set TemplateName to (TemplateName&"_air")
    

    Or a shorter method:

    Set TemplateName to BulletType & (Fire=1 ? "_fire" : "") & (Earth=1 "_earth": "") & (Water=1 "_water" : "") & (Air=1 : "_air": "")
    

    As a result you will have a string like "nova_fire_water", even if the water was added first in the first slot.

  • I was planning on doing most of my damage and modifier coding directly on each sprite.

    Actually, yes, you can do this instead of using the array. You can use a single Bullet sprite with multiple animations in it (bullet, bomb, nova). And add a bunch of instance variable to the sprite - "damage", "effect" etc.

    Then put 40 copies of this sprite on unused layout, set their animations, configure each copy for a specific attack, and set them as templates. For example, a bullet for fire+air attack may look like this:

    Then you can spawn a bullet from this template and it will be created with all the correct values and the correct animation. You will need a single action for all 40+ attacks!

  • First of all, it was a wise decision to ask for advice before starting to develop the game! I've seen too many examples where people did the opposite.

    While you can create 40+ boolean variables and code each of the attacks separately, this won't be a good solution. Such code will be difficult to manage and worst of all - it won't be expandable. Imagine if you decide to introduce two new elements later, when the game is almost ready!

    So my suggestion is to use some data object to store all attacks and their properties. Here is a example with an array:

    I chose an array because it's easy to edit in C3, but there are other options - JSON, CSV (Excel), XML etc. In fact, I would probably use the array for entering and editing data, but convert it internally to JSON in runtime.

    With all the values configured, you will only need 3 variables to start an attack and your code can look something like this:

  • Remove the silence at the beginning/end of the music track in any audio editor. I'm using GoldWave.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Desktop build of C3 has been retired. You can probably find and download an old version of it, but it may not work correctly.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 250 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x4
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies