brent_hamel's Forum Posts

  • I would just use another variable like you mentioned, variables are your friend

  • You'll have to check for the active pokemon through events. The way you have it set up now is that PCurrentHP is be given a value of "Slot = 1 ? PlayerPokemon.At(S1, 4) : Slot = 2 ? PlayerPokemon.At(S2, 4) : Slot = 3 ?, etc, etc."

    Instead you have use events that compare Global Variable for which pokemon is active and THEN set the value of PCurrentHP to "PlayerPokemon.At(S?, 4)"

    You could also try set value of PCurrentHP to "PlayerPokemon.At(s&(whatever the slot variable you're using is called), 4)" I've not tried doing it this way, but I don't see why it wouldn't work. The previous method should work 100% though.

    Hope this helps

  • Well all I was doing was referencing the colors of the pixels on my canvas, to load an array with values based on the specific colors colors. I did it all using the rgbAt expression you mentioned. It worked fast and efficiently for me, so I'm not sure where you're running into trouble. I didn't use any JSON at all.

  • Just checking in to see if this job was filled or not :)

  • TELLES0808 I believe Salvator is talking about doing this before ever comiling or running the game. What he's referring to is a much needed feature in the C2 editor, where all objects containing an image (sprite, tiled background, sprite button) would check the location of the image they have loaded (resource folder structure) and if their source image has been modified since it was last loaded into C2, it reloads and thus updates itself. It's the same idea as how C2 will check for updates when you run it. This feature would basically do the same for all external assets (images, sound, etc). Its an incredibly useful and time-saving feature in Flash and I would use it myself in a heartbeat.

  • Try this and see if it helps make what I'm referring to a little clearer.

    Level Data from an Array Capx

    Please keep in mind, that I've only used a single way to put the level data into the Array, there are lots of ways. You need to find the way that best suits your needs. Hope this helps :)

  • As you may have learned, an array is basically a grid of data. For building a tile-based level, each grid space represents a point on the layout. The system then needs to read the array data, and place the appropriate tile in the correct place accordingly (or not, if it's supposed to be empty). So my question is, how are you filling your array with the values you need to create your level. Without customizing the data in your array, all of its values will be "0", and if they're all the same, then you're entire layout will be filled with whatever "0" is supposed to be (empty tile, solid tile, etc...) So how are you entering your level data into the array?

  • How are you going about loading the array with data?

  • Try Construct 3

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

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

  • The more I use LOS the more I'm finding I'm going back to my old eventing ways of doing it :( I just need more usage than it offers right now. Not being able to pick the objects that act as obstacles is really hindering... Once again, if I knew anything about JS I'd get right on it, but the entire reason I use C2 is because hard coding severely hurts my brain lol (it helps that C2 is the best too...just sayin')

    I don't suppose anyone has any advice on how to approach modding the behaviour for this? I'm not asking for anyone to do it, but even just to point me in the direction of how to start tinkering with modding this extra option would be incredibly helpful. All I want is the ability to have the obstacles themselves be seeable (ie pickable) by the behaviour. Unless it can do this already and I'm completely doing it wrong, but so far, I've had no luck whatsoever...

  • Hmmm, also, is it better to have one object checking everything for LOS? Or everything checking for one object... I'm guessing the former, but does anyone have any input?

  • Extra sprites use extra overhead and all that jazz. This is being used in a Metroidvania style concept and all of the level data is coming out of arrays. If I can keep my object usage as efficient as I can, then I can have more going on onscreen at any one time. But for something smaller scale, I probably would use something like that. If I knew any coding at all, then I'd try modding the behaviour myself to incorporate something like "Include Obstacles (yes/no)", but I don't, so I won't lol

  • Whenever you want to turn a Y value (in pixels) into a percentage, you need to divide that value by the WindowHeight (maximum Y value) and then multiply by 100 (this gives a value between 0, 100 that represents percentage). Now if you want to work in percentages and then translate that into a Y value, just do the same thing going the other way. Percentage divided by 100 (this becomes a decimal between 0, 1) now multiply that by your WindowHeight, and you'll get your correct Y value (in pixels). Hope this helps/is useful for you :)

  • I just want to start by saying that I love this behaviour. I've been using events to do the equivalent for a long time now and this is much faster, although (this is where my question comes in) is there a way to include the obstacles amongst objects the behaviour can see. For example, in the provided demo, I'd like to have the walls be effected the same way the pigs are, but not the pigs behind the wall. Again, I've been eventing this in the past, but the behaviour is so much faster that I'd like to use it instead... any ideas?

  • Unfortunately it might be hard to pique anyone's interest when it's only "volunteer" work. Even something little to offer in return for work will help to get people interested. Personally, I make platformers and do all my own graphics, and even a basic 16x16 pixel art character, with super simple animations (like 12-20 frames for everything) can take anywhere from an hour up to an entire weekend depending on character design and animation requirements.