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 ... 18
Ask a Question / Having one actor create a bound instance of another actor?
« on: November 17, 2018, 11:43:52 pm »
Hello, I am trying to work on implementing some UI elements, such as buttons and progress meters which would be effectively identical for several actors who would use them. I would prefer not to make dozens of duplicates of each of these UI features, however, I can not seem to come up with a way to reliably get the actor doing the spawning to be linked with the actor being spawned.

For example: I have a progress bar for each of several characters, which would slowly fill over time. My current attempt is to have the actor for the character set a global variable to their name, then for the created actor to upon being created make a local variable matching the global variable, then use the [game attribute with the name [name variable] & [rest of the attribute's name] ] block to get the proper values.

Instead, all instances of the progress meter are created last, and take on the attributes of the *last* actor which would have spawned it.

Is there any way to get this to work, or is creating duplicate actors the only feasible solution?

Ask a Question / Re: Integers overflowing in the low billions?
« on: October 29, 2018, 03:04:56 pm »
Ah ok. I will try to see if I can figure out a way to use the number variables in my math indirectly and see if that works then...

Ask a Question / Re: Integers overflowing in the low billions?
« on: October 29, 2018, 01:46:33 pm »
I'm looking in my code and I don't have anywhere that the number that is overflowing gets "set" as a rounded number. Is it also set to an integer when it is used in a math formula which uses a rounded value?

Ask a Question / Re: Integers overflowing in the low billions?
« on: October 29, 2018, 12:40:06 pm »
Is there a good way to just grab the first four digits of an integer? I've been doing it the long way like:

If (Variable) < 1,000
  Set (display) to Round(Variable)
  Set (display letter) to (blank)
If (Variable) < 1,000,000
  Set (display) to (Variable/1000)
  Set (display) to Round((Variablex100) / 100)
  Set (display letter) to K
(repeat for million, billions, and trillions)

Also, to be clear, the overflow would only happen when using a Round () block? Or is there a different attribute type I need to use?

Ask a Question / Re: Integers overflowing in the low billions?
« on: October 29, 2018, 11:16:17 am »
Yeah, the problem I have with not rounding is that for some reason they have this weird tendency to do stupid things like

100-5 = 95.00000000000000000000000000000000000001

which just kills my display. Is there any way to avoid that problem while not using rounding?

Ask a Question / Integers overflowing in the low billions?
« on: October 29, 2018, 10:20:37 am »
Hello, I am working on an incremental game at the moment, and am hitting a problem with large integers; I had asked about them before and was told that the point at which integers should overflow is about 10^308; but instead I am getting a result that integers are consistently overflowing into negative values at about 2.2-2.3 billion.

This seems like a remarkably low number to overflow on, especially for an incremental game. Is there anything I can do to overcome this issue; or is this limit pretty much hard coded into the system?

Edit: Something else I do notice is that it only seems to do this when math is involved with the number; if I set a number directly to 2.3 billion and ask the game to display it, it works. When one of my formulas creates a number at that value, it overflows. I've attached the math formula which is causing the issue.

Ask a Question / Easiest way of making entire game smaller?
« on: September 13, 2018, 12:55:32 am »
So, a game I am working on fits on my screen, but I learned after finishing the first version that it is too tall for most screens. So, I need to make it smaller. Problem is, everything in the game is designed to work at a specific size. So, I will probably need to reduce all the font sizes, resize all the UI assets, all the actors, the game window, coordinates being used, and so many other factors that it would likely take as long to rescale everything as making the entire first version took to build in the first place.

I am wondering though, is there anything I could do that might make this process easier?

Ask a Question / Re: Passage of time doesn't always work?
« on: September 02, 2018, 11:13:55 pm »
It is from an extension. I haven't had any problems saving with it, and have been using it for a long time. The only new thing here is my attempt to use the date feature to calculate when the game was last saved vs when the game is opened.

Ask a Question / Passage of time doesn't always work?
« on: September 02, 2018, 05:37:15 pm »
Hey, I'm not sure if I'm using the code wrong, or if there is a problem with Flash or certain browsers. I am working on a game which progress should be happening even while the game is off. So, I have it programmed to check the date when saving, and to compare the date when loading.

This works for me, but I have had several people report that it does not work for them. I've attached the code to this post. Is there anything that looks wrong with it, or is there anything I can do to make it more reliable?

Ask a Question / Re: Is there a maximum value for Variables?
« on: July 22, 2018, 05:15:26 pm »
Thanks, and yeah I will hopefully(?) not need a number with 300 decimal places. xD

Ask a Question / Is there a maximum value for Variables?
« on: July 22, 2018, 03:58:26 pm »
Some coding systems have overflow limits, while others do not, or do not reach them under normal circumstances. I am working on a side project that is an incremental game. These kinds of games can end up with variable values that are ridiculously large; so much so that abbreviation for numbers become meaningless after the trillions and start to use A, B, C, D and so on as abbreviation for values above that.

Before I get too far along in programming the game, I figure that it might be a good idea to ask and find out if there is a specific point where Stencyl's variables begin to overflow, so that I can work on a way to work around that, or if it will be able to store any number no matter how large?

I never noticed that block before. I'll give that a try, thanks.

I have been working on an RPG, and have been adding random scenes which can occur with party members while exploring the dungeon in the game. Since these scenes are triggered based on time, rather than exactly what floor of the dungeon you are on, I need to be able to send the player back to the floor they were on.

Right now, I am using a string of if statements which check the floor variable and sends you to the appropriate floor. This, however, is a very messy way of doing it, as every time I add a new floor to the dungeon, I need to go back and manually add it to every scene which takes place in the dungeon.

I've tried using "select attribute" instead, but it requires a scene attribute to work, which can only be local. Do any of you know a way to simplify the code so that it remains functional as new floors are added on it's own? I've attached an example of the code I am using now to help clarify what I am trying to do.

Ask a Question / number pad doesn't work in .exe export
« on: March 15, 2018, 12:41:21 pm »
Not sure if this is something that I can fix or if it's an engine issue, but I exported my game to .exe, and found that the number pad aliases for my controls don't work. Currently, I have it set up so that Num-0 works in place of the spacebar, Num1-3 work the same as normal 1-3, and Num-Enter works the same as normal enter. This works fine in flash, but when exporting to .exe, the numbers on the number pad don't work, though the number pad's Enter key does work.

Is there any way to fix this problem?

Ask a Question / Re: Max string size reached, Will this kill my project?
« on: February 04, 2018, 05:53:33 am »
The actors are used to fade in the images when they become relevant, and then allow the images to pan up and down through keyboard commands.

I did some more tinkering last night. I think I might have fixed the problem; or more likely kicked the can a little ways down the road and will hit the problem again later. Because I got that new error that said it was out of memory, I tried running several images in the game through a compression program to reduce their filesize, then tried adding new images to the game and was able to do so without the compiler failing.

So, I think the problem seems to be that the compiler crashes when handling either too much total filesize, or too many images of a large filesize. I don't think I'd know for sure though if that is the only factor or if number of files plays into it until/unless I get more crashes before reaching the filesize I was at before.

Pages: 1 2 3 4 ... 18