fassFlash's Forum Posts

  • THREE..

    TWO..

    ONE...

    BUMP ROCKET LAUNCHING

  • Uhm

  • Pumb

  • Bomb

  • Bump

  • Bah-bumparoo

  • I'm making a game about hexagons. There's a group called "People" which contains every hexagon, and they have their UIDs and an instance variable "faction", and each faction is a number, not a string. There's also a grid called FactionRelations, where each faction has an x value and a y value. For example, faction 2 is outlaws, and faction 0 is commoners. Then, to make them hit each other, I set the grid's coordinates X2 and Y0 to "hostile" (1 in my case), making them able to attack each other.

    And I did that: I have an event that sets the values X0Y2 and X2Y0 to 1. And, people attack each other with projectiles. So, when the player character is creating a projectile, it spawns it, sets the projectile's NPCUID variable to its own UID. There's also a second event, "Projectile: On created", which sets its faction variable to the faction value of the NPC that spawned it. And it knows which NPC it should set itself to, because it picks the People object whose UID is equal to its NPCUID variable. Well, that doesn't work. The player's faction is 2, but he can hurt himself with the projectile, and can't hurt others (a beautiful metaphor for the life of a criminal in a perfect utopia, but I still have to do a game). So I did an event that sets the Sword projectile's frame to its faction variable. Turns out that it's 0, not 2. So I screwed around, and, turns out the event where the NPCUID is taken from the Player works, but not the "On created" one. So, I disabled the picking event. It worked, the faction is 2, you can hurt people to your heart's content. However, the Sword does that because it has no specific People object to get its variables from, so it just chooses the first People object ever created, which is the player. But I want the NPC to be able to use weapons, too, and do that according to THEIR OWN faction and will instead of the players. So, what exactly happened here? The events are in the Common Sense and the Shooting groups, or may be in no group at all. There's not that many events so I'm not bothering to give a screen right now.

  • How to bump threads:

    Subscribe to Construct videos now

    I'm sorry you had to see this

  • Bump ball. Skyward Sword added Bump ball.

  • I'd like to know this as well, write fassFlash if it's solved

  • Bumperman

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a system where you can pick up items, and their number representing them shows up in the first available empty cell in the inventory 2d array, which is 10 width and 5 height. I have a tilemap that represents the 2d array.

    I'm doing the item going into the first empty (with the number 0) slot by finding the index number of the first 0. So then, I tried to make a system where the game finds out where the index number is on the array, in X and Y coordinates, and then put that number on the array. That's where I have a problem. I made 2 variables, "YIndex" and "XIndex", and the "Index" variables (I just made it to make the equations in YIndex and XIndex look less cluttered, I could as well have done ArrayName.IndexOf(0) without the variable "Index").

    How do I make these variable do the right thing? Here's a capx, the weapons don't destroy on getting picked up on purpose.

  • Click anywhere on the "View" bar, like grid width or any empty space that is not a button. It's an old glitch where your last changes don't save if you click outside the "View" bar, like the project itself.

  • > Well, an action RPG has at least from 20 to 100 enemies. Having an array for each of them is even worse than making a clutter out of instance variables. And I haven't heard anything about Instance Arrays. Is there such a thing?

    >

    Yes you can do this with a container.

    The other method is, if you currently use 2D array, you can make use of 3D array, it should do the same thing, however this will be quite advanced in a way when you manipulate the array.

    What about enemies that are spawned randomly? Will they position on the 3D array somehow too?

  • > Maybe you have to look at array first before using the tokenat method.

    >

    Well, an action RPG has at least from 20 to 100 enemies. Having an array for each of them is even worse than making a clutter out of instance variables. And I haven't heard anything about Instance Arrays. Is there such a thing?