dop2000's Recent Forum Activity

  • Wait, why does the first line say "Time_Fonts -> Subtract from time_font"? It should be "System->Subtract from time_font".

    This means you have two time_font variables - one global variable and one instance variable on Time_Fonts object.

    Every 1 second you are changing the instance variable, but you set your text to the global variable (which doesn't change).

    You need to decide which one you want to use and delete the other one.

  • mekonbekon

    Pretty cool, I see you only using one particle instance, this should definitely decrease the CPU utilization. However there are a couple of small issues - if you leave the asteroid in the middle of the ship, particles are spraying from image point 1.

    Also, if asteroid is half-overlapping the ship, particles are spraying only from one side of it.

    Here is my version of continuous particles:

    DEMO

    CAPX

    I added some tweaks to decrease the number of particles instances.

  • Have you read the comment above from zenox98??

    It's exactly the problem he described.

    You need to fix origin image points for all your sprites, all animations and all frames.

  • No, you would not need a separate sprite for each weapon. You can only have 2 sprites - WeaponShop and WeaponEquipped. Each sprite will have many animations - for example WeaponShop will have "SS1", "SS2", "LS1" etc (see my screenshot above).

    Also, create an instance variable "weapon_code" on these sprites. You can create other instance variables, for example "weapon_price".

    So when you add weapons to your shop, you can pick several weapon codes from the CSV. (on random, or all available for this level or using some other criteria).

    For each weapon code you create an instance of your sprite and assign WeaponShop.weapon_code=(code from CSV), WeaponShop.weapon_price=(price from CSV). And set animation, also retrieved from CSV.

    Now you have a bunch of WeaponShop sprite instances which you can display in the shop.

    When player clicks (or overlaps) any of them, you can easily get weapon code and price from sprite instance variables. And if needed, you can retrieve other data from the CSV.

    You can do all this with only a dozen or so events and sell hundreds of weapons in your shops

  • Ok, second attempt.

    http://doptrix.com/C2/BouncingParticles3/

    capx

  • [quote:7xbijjzs] Pin this to the base sprite's position only so it will move on the "horizontal" plane with the base sprite, and set up its own random vertical bullet behavior for the "height".

    oosyrag, Do you need Pin+ behavior for this?

    It's a nice solution, I tried to make something similar, only without the invisible base sprite.

    That base sprite speed needs to be different depending on its angle of motion. The closer angle is to vertical, the slower it should move.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In theory, the "On error" event should be triggered.

  • Thanks oosyrag !

    I wonder if it's possible to somehow corrupt the local storage to see what kind of error message I'll get in C2.

  • And I'll ask you again - have you tried contacting that guy from Twitter?

    Because I only have a general idea how to do it and I'm not good with math.

    I tried and it doesn't look very good and my particles are only flying to the left:

    (link removed)

  • No, you can't do it, because objects in Construct 2 are 2-dimensional..

  • , If you are planning to have hundreds of weapons you should definitely re-think your approach..

    I would make a "database" of all available weapons:

    You can create this table in Excel, save as text file (.CSV) and import to Construct 2.

    Use CSV plugin to read data from this file, it's pretty simple.

    Another option - XML. But personally I prefer CSV.

    When you have your weapons database, you can select several weapons from it (by current level, shop type) and put them into the shop. Create sprites, set animation, arrange them on the shelves, etc. Set instance variable on each sprite to weapon code.

    So for example you'll have instances with codes "ShortSword_2", "LongSword_2", "LongBow_2".

    When player clicks the long sword sprite, you can retrieve all other information from the CSV by code "LongSword_2". Deduct its price from player's money, update weapon in player's hand, update damage values etc.

    Edit: I just noticed that you are planning to sell armor and other items. You can make similar databases for them.

    Or maybe combine everything in one, but it may become too complex.

    Also, I suggest you learn how to use loops and functions, it will make your life much easier.

  • Hi DiabloOvermind,

    No, you can't do this with Particle behavior, so definitely not particles.

    I'm guessing these are sprites, probably Bullet behavior with gravity, plus some programming to make them "bounce" at different angles..

    sebrosen have you tried asking that guy on twitter?

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 279 followers

Connect with dop2000

Trophy Case

  • 10-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
  • x5
    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
  • x14
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

30/44
How to earn trophies