Kisai's Forum Posts

  • You know, I've been sort of lost on your equation for awhile. Maybe I just put it in wrong or... I'm just being incredibly stupid. For example, I put in...

    Attack hit box:

    Base damage = 10

    Lightning = 1

    Fire = 0

    Earth = 0

    Water = 0

    Enemy defense:

    Lightning = 1

    Fire = 1

    Earth = 1

    Water = 1

    Now, I assume this would mean that the damage given to the enemy would be 10, but after trying it out, turned out to be 2.5. I... think I might've missed something. Did I? Or should it happen like that?

    Then again, your original post had dividing the base damage by 4, but in that second post, you don't...

  • The reason I was multiplying was because I wanted the elemental defenses to be multipliers. Just in case I wanted to do something like have an omni-elemental attack. An attack with all of the elements present. Now let's say we have an enemy who's weak to one element, but resistant against another. The 2x and 0.5 would cancel each other out. And the resistances and weaknesses could continue if the enemy was weak to more than one element, or resistant to more than one.

    I'll try putting in your calculation and see what it's like. ^^; Not very good at math, so I can't even imagine what it'd be like until I put it in. I can't visualize this stuff very well. I'm gonna have to try it out. ^_^;

  • In my game, the player will be able to access a menu and change their elemental attack mid-stage. There are four elements: lightning/wind, fire, earth, and water/ice.

    I wanted the enemies to have a variety of possible elemental defenses. From normal damage, to double damage, to half damage, to zero damage. And in my attempt to to this all in as few events as possible, as efficiently as possible, I gave the Enemy group 4 variables: lightning, fire, earth, and water. Now I didn't have to make separate groups for different elemental enemies, and if I wanted to allow an enemy to have more than one elemental defense, or a contradicting one, I could!

    Just so you know what I planned...

    Lightning weapon VS neutral enemy = normal damage.

    Fire weapon VS fire-resistant enemy = 0.5 damage.

    Earth weapon VS earth-weakness enemy = 2x damage.

    Water weapon VS water-immune enemy = no damage.

    What I tried for the variables was this:

    1 = normal damage to that element.

    2 = double damage to that element.

    0 = immunity to that element.

    0.5 = half damage to that element.

    That was my plan in working out some calculation to handle all that stuff. "Base Damage" is how much damage an attack would be able to do, having given the Attack family a "Base Damage" variable so all objects under that family could have that variable, but modified for each hit box. I also gave that family its own set of elemental variables just so I wouldn't have to make new families for each element either. If an attack didn't have one of the elements, that element would be set at 0.

    Attack.Value('Base Damage')*((Attack.Value('Lightning')*.Value('Lightning'))*(Attack.Value('Fire')*.Value('Fire'))*(Attack.Value('Earth')*.Value('Earth'))*(Attack.Value('Water')*.Value('Water')))*global('Attack Strength')*global('Extra Attack')

    Now obviously, throwing ALL the elemental variables for the enemies and attacks gives us a little problem. Sure, it'd be novel if an attack had ALL elemental properties, used against an enemy weak to fire, but resistant to ice, since theoretically we could do something like that. But before we think of that, this calculation needs fixing. We can't even have ONE elemental attack against an enemy because we're multiplying by zeros here, and that sets the entire equation to 0.

    Would anyone happen to have any ideas or ways around this? Any suggestions? I doubt it, but I wouldn't imagine Construct would have an expression where something multiplied by zero could still equal 1. And I wanted this to be as universal as possible, done on one event, so I couldn't have to code specific weaknesses and resistances for each enemy, or certain properties into every attack's hit box. I just change some variables and I'm done.

  • I was just wondering if there was any tutorials or anything for the HTTP object. I've been looking around, but can't find anything. I was hoping to be able to create an online scoreboard somehow with the HTTP object, but have no idea how it works. @

  • But wouldn't people be able to see the images and sound files by opening up those folders? Since I assume the files would still be in the folder as .jpgs, and .wavs or whatever?

  • Graphic and sound assets are the main culprits. Don't go overboard on texture sizes nor animations. There is a reason modern AAA titles occupy a whole DVD despite being short gameplay wise.

    You know, I was just considering that as a lazy alternative to trimming down behaviors or other things. Is it possible to put the game on a CD or DVD and let it run off that? Has anyone made a plug-in for that? If not, someone SHOULD. That'd be awesome.

  • Right now, when I create an .exe file, it comes out to 23.8 MB. The problem is that I've just barely started on my game. I have 9 layouts, and almost 20 event sheets. I have approximately 110 Global Variables. To me, all of this doesn't feel like it should be taking up as much space as it should. And removing all the sound files only reduces the file size by 10 MB. Is there anything I can do about this, or are Construct .exe files normally pretty big for some reason?

  • I learned the hard way that having a global object on every layout is a recipe for disaster, since you're going to end up having a million copies of the same object.

    My question is, should I have all global objects on one layout when the application begins that the player CAN'T return to? Right now, I have Title Screen -> File Selection - > World Map, etc., etc. On that first layout, the title screen, is where all the global objects are created. However, the player can cancel out of the file selection and return to the title screen at any time. Wouldn't this end up creating another batch of global objects each time, thus causing problems? So correct me if I'm wrong, but wouldn't the ideal solution would be to have a layout before ANYTHING in the game begins that stores all the global objects, that the player can't return to?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So if you use, "Set value at X", it's being set at xX, y1? y1 will always be used in "Set value at X"? Like just a bunch of boxes? Hm... I imagined it working totally differently. I guess I'll stick with Array for save files then.

  • I figured out that for some reason, you can't set values at 0 indexes. So I began using the X index of 1 to store which save file would be accessed. At this index, 1 = save file 1, 2 = save file 2, etc.

    And I thought I could use the Y index as a "subfolder" of sorts, since you can store values at X, Y. I was going to make the first Y index store Health, for example. So 1, 1 would store save file 1's health. 2, 1 would store save file 2's health. 3, 1, you get it...

    But apparently, for some reason, I couldn't use the value of 1 for the index of Y. For some reason, it treated y1 as x1. When I tried to store the variable of Health in x1, y1, it ended up being stored in x1 alone. So it had to be put in 1, 2. I couldn't use the index of 1 for the Y coordinate for some reason. Is it supposed to be like that?

  • Destroying it does nothing. I still end up losing control after awhile. But maybe it matters which Destroy I choose? There are two, after all.

    I probably should've mentioned that destroying it was one of the first things I did, and it was from doing that, that I ended up with losing control in the first place. This led me to believe I needed to keep it un-destroyed.

    ...Um... Hm... After skipping over the frame with the edit box (the file select screen, where an edit box is needed for creating a new game and entering your name), I still see that same problem. In fact, after deleting it entirely and running the application, I still lose control.

    I wonder if there's another edit box I have somewhere, or if it's completely unrelated to the edit box.

  • I would love if I could use this for my game, but as it stands, using it is pretty glicthy. It will inevitably make the player lose all control in the game and force them to close the application. I've tried everything I could think of, but it still insists on being fickle and screwing up the game long after the layout it appears on. Would there be any way of making it more stable? ^^

  • You can use Sine behavior to do it easly without any event.

    I didn't even know you could do that. Must be a new addition to sine. Neat.

  • Has anyone done a visual effect where an object might slowly have its transparency reduced to zero, then back up to 100%? If so, are there any nice effective ways of going about this? So far, the only thing I can think of is using a variable to determine when to raise or lower the transparency. If transparency = 100, set variable to 1. If variable = 1, reduce transparency every tick. If transparency = 0, set variable to 0. If variable = 0, increase transparency every tick.

    Would something like that be my only method of executing an effect like this?

  • Right now, I'm using a global variable for a certain task. There's three layouts at work here for a simple "Return to map" option in a pause menu. 1) The world map layout, 2) The pause menu layout, which runs on a modal layout object, and 3) The current stage itself.

    I've had to use a global variable to do this. On the stage the player is on, they pause. This freezes everything on the stage as the menu is brought up because it's a modal layout object. Upon selecting, "Return to map", a global variable is set to 1. Then the modal closes, and there's an event sheet on the stage itself that states, "If this global variable = 1, go to layout World Map".

    If I had a global function object, would that be able to replace using a global variable? Since global objects are a constant that never really go away, the modal layout could close, but the global function object could still be giving orders to return to the world map, right?

    The only reason I've used a global variable is because if I remember correctly, I couldn't go from one layout to another with the modal still running, and if I had an event on the pause menu to close the modal layout, and THEN go to the world map, it wouldn't happen, because the modal layout would already be closed before that command in the line.