Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Galdon2004

Pages: 1 2 3 4 ... 19
Ask a Question / Re: Hitboxes and hurtboxes
« on: April 05, 2020, 05:12:52 pm »
You don't want 10000 hits (automatically)
you just want 1 hit
but MUST USE collision shape in animation

Eh, this is how to answer....
You would have that issue with every kind of hitbox in the engine. You get around it by programming it to have a cooldown on being hit so it only triggers once.

I started working on the same problem before getting sidetracked by StencylJam. Spawning invisible actors seemed to work well enough until I needed a better handle on precision. I ended up making custom hitboxes just by storing a list of coordinates. Every attack has a defined attack point (e.g. punch attack point is located on the player's fist in the punch animation). I can loop through each of the enemy hitboxes and figure out which one(s) the attack point landed in.

Yeah, invisible actors can be hard to work with precisely.

Ask a Question / Hitboxes and hurtboxes
« on: April 04, 2020, 08:53:26 pm »
So, I wasted most of the day tinkering with this before remembering that the "member of group" detection detects the actor's default group, and not the group the hitbox belongs to. This leaves me with difficulty figuring out how to make hitboxes and hurtboxes work.

I am trying to make combat for a platformer, where actors can touch each other without automatically dealing damage, and deal damage using their attack animations. The only way i can think to make it work without being able to identify to colliding hitbox's group would be to have invisible actors spawn in just to act as hitboxes, which feels like a very messy and unnecessarily complicated way to handle it.

Is there any cleaner way to handle detecting specific hitboxes, or is there any plan to allow them to work more intuitively at some point?

Ask a Question / Black Boxes after enabling full screen
« on: March 22, 2020, 08:05:15 am »
So I recently enabled full screen and 1.5x scaling in one of my projects. I am getting reports now that during the game sometimes actors change to black boxes; even when in normal scaling mode and not in full screen. This also sometimes leads to crashes. It doesn't seem to be happening to many users, but seems to be happening most to actors who are being tweened; such as rotating or growing.

Does anyone have any thoughts on what the cause could be and how I could troubleshoot it?

Ask a Question / Re: Grouping buttons onto scrollbar ?
« on: March 12, 2020, 12:41:05 pm »
Having each button check what the previous button is doing is a bit overcomplicated I think. What I do for for scrolling a large number of actors is to have one global default position variable which tracks the X or Y coordinates. When the scene opens, it sets that coordinate to where the first actor would be.

The scene would then spawn in the actors, and each actor would have a "when created" event to set it's starting coordinates to where the global variable is, then changes the global variable to what it currently is plus the actor's width or height, and a few extra pixels for buffer. This will automatically make the next variable set it's starting coordinates directly next to,  or below it without overlapping.

To move them, you can have them set their coordinates in an always event to set their coordinates to their local starting coordinate variable plus a variable which tracks how much the buttons have scrolled. If you put this into a behavior, it becomes pretty effortless to add new distinct buttons to the list without having to do any major editing to the code.

Ask a Question / Full Screen question
« on: March 04, 2020, 04:59:37 am »
Edit: I figured out the solution to my initial problem; turns out I should have been using true and false, rather than full screen enabled and "not<fullscreen enabled>"

But I do have a bit of a blurring issue that I'm unsure of how to solve. I want it to stretch to fit the screen, However, the amount the game stretches causes too much blurring when it's a large stretch. Is it possible to mix the fixed scaling and stretching such that it picks the fixed scale option which is closest to the screen resolution in use and scale from there? Or does it already do that automatically?

Additionally, is there a good way to add in higher resolution versions of an animation after the fact if applying this to a previous project that is at 1x scale currently?

Ask a Question / Re: Having a lot of issues with big numbers
« on: March 02, 2020, 04:09:36 pm »
Working on trying to re-convert things to normal and I hit this compile error:

./src/scripts/Design_1537_1537_WillpowerConversionandDisplayBackup.cpp(220): error C2177: constant too big

Which refers to the behavior which converts the large variable into readable units (1,000,000 to 1.00 M, 1,000,000,000 to 1.00 B, etc up to decillions. Did some testing and it gives the error when the math involves the quintillions. So, even if the numbers can "reach" the undecillions in theory, it seems that it can not actually use those numbers.

Ask a Question / Re: Having a lot of issues with big numbers
« on: March 02, 2020, 12:20:09 am »
I'm not adding anything to a list either. Does it convert the variable type if the rounding happens without storing the result? For example, if I take Variable X, and tell it to set Variable Y to the round of Variable X divided by 100, would that cause Variable X to still turn into an integer?

Ask a Question / Re: Having a lot of issues with big numbers
« on: March 01, 2020, 09:08:36 pm »
Unfortunately, I don't have any experience with code mode or extensions. So, I'm not sure where to begin with writing one to prevent the math from becoming an integer.

I tried to remove all the rounding in the game as best as I could. Which is how I was able to get past the billions. I'm not sure what might still be forcing the variable to turn into an integer...

Ask a Question / Having a lot of issues with big numbers
« on: March 01, 2020, 06:44:42 pm »
So, in one of my projects, I have been having a lot of issues with big numbers. The first time it was rounding causing it to become an integer, which made the numbers overflow in the billions range. I stopped rounding the numbers, but found that they would still overflow somewhere in the quadrillions to quintillions range.

I attempted to make a workaround by having a stand-in variable that represents a quadrillion of the previous number, but that seems to have only made things worse. I have several screens of code dedicated to making the math work every single time I need to use this variable, and it is extremely prone to having unexpected errors due to just the sheer volume of how much code I need to write every time I use that variable.

I am wondering, if anyone else has dealt with this kind of issue, is there an easier way to handle numbers large enough to cause overflow?

Ask a Question / Re: Managing randomly created characters.
« on: January 19, 2020, 03:20:52 pm »
Here's a sample of some of the code from the other project, this one in particular refers to a number variable. If it is run with a typo in the variable name, or if I forget to pre-make variables with the character names before compiling, it crashes in the EXE version.

Ask a Question / Re: Managing randomly created characters.
« on: January 19, 2020, 02:30:11 pm »
I see, the usage I was doing when the game would crash was when using text variables, not lists or maps.

Ask a Question / Re: Managing randomly created characters.
« on: January 19, 2020, 01:18:43 pm »
I assume you initiate by setting the variable's value before retrieving it?  Or is there another way to initialize the variable?

Ask a Question / Re: Managing randomly created characters.
« on: January 19, 2020, 08:49:08 am »
thanks I'll tinker with the behaviors. What blocks create global variables? I'm trying to find them now that you mention them, but I don't see it. The closest I can find is the set game attribute with name [] to [] block, but that doesn't create an attribute. if I put something into it that does not yet exist it just crashes the game in exe and is ignored in flash.

Ask a Question / Re: Managing randomly created characters.
« on: January 18, 2020, 10:45:29 pm »
That line sounds like it would, add to a list the number of items in the list minus one, plus one?

Ask a Question / Re: Managing randomly created characters.
« on: January 18, 2020, 08:34:20 pm »
I can take a look at the behaviors, thanks.

As for elaboration, in the game you have a base that you are building, and characters may show up periodically to join it, and can be seen walking around the base. The characters would need to spawn actors for their clothes that stay on top of them to match their randomized appearances, and would need stats to track their coordinates on screen so the scene knows where to put them when reloading the scene and so the clothing actors know where to be, and probably stats for what the characters are good/bad at doing.

The reason normal global variables wouldn't work is that global variables have to be made in advance before the game runs, and I feel like I would need to dynamically create new variables and save them when a new character is added.

Pages: 1 2 3 4 ... 19