Kazan's Recent Forum Activity

  • Hi all. Can someone please help me in figuring this out?

    Okay, so I have an enemy family, the family has a family instance variable of "HP" and I've set it to 100.

    I have a bunch of enemies in one layout and when damaged the HP value changes individually for each one, perfect so far.

    If I leave the layout however, and then come back to it later their health values reset to 100. I don't want that, I want the damage each of them took to persist between layouts...but family instance variables aren't static, and it doesn't seem that they can be set to be static either. I mean, I think I understand why they can't be static but I'm not sure what else to try now.

    Global variables don't make a whole lot of sense for multiple enemies of the same type, right? And local variables have always confused me a bit to be honest and I'm not sure how to implement something like that anyway.

    Any solution to this problem? Thanks for any help.

  • Hi

    Is it possible to pick from 2 different arrays at random?

    For example I have array1 and array2. Is there some sort of expression I could use to randomly pick one of those two arrays?

    Thanks

  • granpa okay, I'll give that a shot. Thank you very much

  • If anyone can give me a tip though on how to add multiple values into an array without having to put them at specific indexes though it would be appreciated.

    Like it would be nice to add someone's name and have all the associated data go along with it in that same column. Is that something that's even possible?

  • blackhornet

    Okay, okay yeah that makes a lot of sense actually.

    Thank you very much

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • blackhornet

    Ohh, I think I see. So I'm inserting twice and that's basically shifting all of my values over twice? I still don't understand how the other characters are ending up with 3 values for gender though. Shouldn't that stay at 2 regardless?

    That's a problem. Inserting values seemed ideal since I don't want to have to set values at specific indexes later in game. I want to be able to just "insert" a new row and column sort of dynamically and be done with it.

  • I'm having some really annoying issues with arrays. Maybe I'm just not understanding how they work on a fundamental level.

    I have an array like this one with some values filled in that pertain to characteristics of the the characters at the top. Things like age, gender, eye color etc. I set all this up at the start of the layout.

    I want to be able to add NEW characters into the array but every time I try to do that the array gets really weird in the debug layout. For example if I try to insert another character named "Jim" on the x axis he'll be inserted at the front of the array no problem...but if I try to add the other values, gender and so on they'll be strewn throughout every corner of the array.

    Everythings good.

    And then I insert new values...

    What the heck?

    Also, by default an array has a 1 for depth, if I turn that to zero (because why the hell would I need zdepth in a 2d array, right?) this happens.

    Can anyone clue me in on what exactly it is that I'm doing wrong here? What am I not understanding?

    Thanks for any help.

  • Pulstar

    That's...amazing, that's pretty much all I needed.

    Thanks so much, man

    That's a pretty clever way to draw a ray btw. I mess with UE4 on occassion and always wished C2 had the equivalent in certain scenarios. I'll definitely remember that for later.

  • Hey thanks a lot!

    That's really quite helpful actually, I'm going to play with that a bunch and see what makes it tick. I think I understand what you did for the most part.

    I didn't mention it in my original post because I didn't want to bog it down with details but I am indeed trying to make something like this work with an isometric grid So yeah, this will take some research and study. This is a great help.

    Again, thanks. Appreciate you taking the time to help

  • Hi everyone.

    I was wondering if anyone would be able to offer me some some hints/tips on how to go about creating a wall placement system, like the kind you would see in games like Prison Architect, Rimworld, or even The Sims.

    What I have so far is a setup that will place wall tiles down wherever I'm dragging, which isn't right but that's as far as I've gotten with it so far.

    Ideally, I would want to click with the left mouse button and drag out a wall (at this stage it would appear as like a ghost version of the wall) then, when I let go of the mouse button the wall would then be placed.

    Another question I have is how do you ensure that wall tiles only drag out horizontally or vertically instead of just going wherever the cursor is?

    Thanks for any help you can give me!

  • Thank you!

  • Hi.

    Simple question I think (hopefully a simple answer).

    Is there way to tell during gameplay which layout is active and is currently playing?

    I'm trying to create a kind of "smart" menu system using only one event sheet and I want certain buttons in the menu to be either active or inactive depending on what layout is playing. But I'm not sure how to go about telling it which layout it's in.

    Thanks!

Kazan's avatar

Kazan

Member since 15 Jan, 2012

None one is following Kazan yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies