Agni's Recent Forum Activity

  • Cipriux

    Thanks Cipriux! This just feels rather time-consuming if there are multiple fonts and font-styles that I'm working with (and upper/lowercase characters). I haven't seen any other spritefont/bitmap font tools that do the left-aligning to solve pixel perfect rounding issues.

    Isn't it much easier to be able to take the png output from a program like BMFont or FontFactory and plug it in directly? The programs calculate your pixel widths as well so you can import it directly into an array and set character widths that way instead of manually measuring the width of each character.

  • Hmmm left aligning makes it so we can't use a lot of the cool/easy font tools I've found (e.g., BMFont) and seems non-standard. Has anyone found a quick workaround rather than adjusting/counting pixels for every character in Photoshop/Gimp?

  • Global array doesn't seem to help since it's the problem I'm trying to fix. Not familiar with importing from a CSV/JSON to Dictionary, however I found another one of RexRainbow's awesome plugins will fix this here:

    scirra.com/forum/plugin-hash-table_topic47637_page1.html

    JSON formatted import to hash table and then I can call the value at any time!

  • Is there anyway for me to import a large group of global or local variables into Construct as a CSV or something? I have an array of 100+ variables and I'd like to use identifiers for my code but still be able to move stuff around easily.

    Example:

    Global variables I want to set below so I can call ItemArray.at(PlayerDamage), PlayerArray.at(PlayerDamage), SpellArray.at(PlayerDamage), etc. If I later want to insert PlayerDefense at 2 and shift everything down.. doing it manually would be quite the pain if they are global variables in Construct vs. very easy in traditional code + copy paste from Excel.

    PlayerDmg 0

    PlayerLife 1

    SlayerEnemyTypeA 2

    SlayerEnemyTypeB 3

    SlayerEnemyTypeC 4

    SlayerEnemyTypeD 5

    SlayerEnemyTypeE 6

    ResistMagicA 7

    ResistMagicB 8

    ResistMagicC 9

    ResistMagicD 10

    ResistMagicE 11

    etc.

  • Wow I'm dumb, sorry! I was using the SOL: Pick All Instances action instead! My fault. Your plugin is amazing, thank you so much!

  • Yes I want to get the created instance but only that instance (even if I am creating 10 of the same instance via Nickname). The family thing seems to pick all of them right?

  • This plugin is amazing and has saved me a ton of time but wondering if there's a way for me to pick the last object loaded and manipulate it.

    For example, I have a large array where I've stored everything that needs to be made (e.g., Nickname, XLoc, YLoc, Angle).

    I can use tokenat + nickname in a 'for each element' loop to create all the instances. However, Nickname doesn't pick the last item and doing 'Pick all into family' seems to set every single sprite to that angle.

    I've tried the system condition of picking ToLoad with instance -1 (i.e., last created) but it still sets every sprite to the original angle for some reason.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Cool it works. Hopefully this isn't too computationally intensive. My problem was not using looping 'For each attack' and 'For each enemy' before storing into the array so it was only getting one of them I assume (e.g., I use a flamethrower attack and two fire sprites tick at same time, only one was getting stored in the array)

  • Hmm, I think you're simplifying a bit. Trying to expand the example to include many different attack types. A single local variable on the enemy can only toggle whether it takes damage from a single source - if I dropped fire and then shot at an enemey, I'd want it to take the shot damage regardless of when the fire is damaging it.

  • I'm trying to start timer with this array method.. is there another way you would suggest having a timer for a unique enemy/attack pairing?

  • Yea but that can cause a double tick of damage right? On collision triggers then if the 'every X seconds' trigger is about to fire, it will tick again.

  • Okay here's what I did.. not sure why this is not 100% working for all hits and only some.. will figure out a mini capx to post if I don't get this working and it's not obvious to you what's wrong with it.

    1) Create an array to store each unique enemy + damagesenemy pairing

    2) On enemy/damagesenemy overlap, check for lastindexof(str(enemy.uid&","&damagesenemy.uid))

    3) If it doesn't exist (-1), do damage

    4) Then push a new row with the pairing + a timer.

    5) Loop every tick to decrease all values in the array

    6) Delete records that have timer go below 0.

Agni's avatar

Agni

Member since 14 Feb, 2013

None one is following Agni yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies