I looked into custom number types/functions and that seems beyond my ability. I altered the formula to work on a smaller scale. Even if the prices don't work exactly as well as the last one, I think its reasonable enough.
Looking at especially the (p * q) part of the equation, I realized that since the values will often be around the millions, I would have to pay close attention to that part of the formula and drastically decreased the scale. Surprisingly with the reduced scale, it was off my intended output by only 5% at its worst.
Hello. I have a shallow understanding of programming and even after some research, can't really understand what custom floating points / fixed point libraries are. I do most of my coding through the GUI.
I'm trying to make a supply/demand curve with a functioning market to determine resource prices, in this case, it is food.
Hello, I am making use of a formula which involves long numbers in my starcraft map.
Everything goes fine until I have to get the square root of a number greater than the real number limit (524287), then the math just overflows (circled in red above). I am not very good when it comes to math and don't know much about the best practices for decreasing the scale of the numbers. If it was a linear equation, I would just divide everything by a number and then multiply it by that number afterward. However, the presence of logarithms and exponents makes it so I'm not sure how I would decrease the scale of this equation.
Please advice on how to alter equation or ways of getting the square root of a number > 524287 in the Starcraft Editor
No, when the behavior is removed the model actor is removed.
My point was that, unlike the shield actor, it doesn't just stop after 35 seconds even when it should be there.
ShieldGenerator is the always running behavior which periodically runs a few effects for the shield generator, one of those effects creates ShieldGeneratorOn. Only ShieldGeneratorOn should be linked to the actor and that's fixed now. As a result, the shield now comes back after being attacked.
My only remaining problem is that the shield actor doesn't remain for more than 35 seconds. Looking at the shield generator in the cutscene editor, I saw the animation was 5 seconds long although I don't really know how the cutscene editor works.
Even with Play Forever flag, the animation still stops after 35 seconds. Any way to slow it down so it would last let's say a few hours to make sure there would be no problems?
I checked closely and buff does have periodic lapses in duration as shown:
1. Shield Generator Created, buff is present
2. Shield Generator Shot, no shields left and buff gone
After some investigating on how sentries use the guardian shield I ended up taking the following steps:
The Shield Generator behavior periodically runs a Create Set with a validator for "has shields". This set runs the Search Effect (for my shield generator's functionality) and an Apply Behavior. The applied behavior is called Shield Generator On. In the Shield Generator On Actor (copied from Guardian Shield) the actor is created when the behavior turns on and the animation stops when the behavior turns off. This works in creating a shield effect and removing it when the shield is destroyed.
However, there are two major problems:
1. The shield expires after 31 seconds (I assume it's because the animation only lasts for this long, any way to extend it or to refresh it? I'm bad with data editor)
How to make a shield effect (Guardian Shield) around a structure? I've tried to attach in events but didn't work. Shield should disappear when the structure's shields run out.
UI Elements are probably the best solution, however, after looking into it text tags aren't that bad in comparison and much easier. Sending actor message for tint wouldn't work well because different players would have different "map modes" selected.
The buildings in my map have a lot, important custom values that tie into player income (not really affecting the unit itself). I wished there was a better way of displaying these custom values. Soon after, I looked into using attributes as a substitute.
These attributes would be changed very constantly and would range from negatives to positives in the millions (but less than 5 million)
My question is: Are attributes less laggy that custom unit values when used for this purpose?
In my map, there are a lot of important "custom unit values" (somewhere about 20). It's very hard for me to convey these values to players without some sort of visual mapmode. Right now, you can click a button to create text tags for 20 seconds (colored by value). However, I'm looking for something more visual, hopefully, that can show on the minimap as well.
Here is an example: Each building needs food, represented as custom value #4. You click a button and all buildings with high food stocks show up in green while starving buildings show up in red. Maybe through an effect, or simply changing the unit's color. Does somebody who know the editor well know if there is a way out there to effectively display this information in a "Map mode"?
Hey guys, I'm trying to get a unit to die after 60 seconds of being alive similar to the swarm host in regular Starcraft 2. I tried looking at how the swarm host does it but couldn't find anything. These temporary units would be spawned via trigger.
0
In reply to Forge_User_04585675:
0
In reply to Forge_User_04585675:
0
Hello, I am making use of a formula which involves long numbers in my starcraft map.
Everything goes fine until I have to get the square root of a number greater than the real number limit (524287), then the math just overflows (circled in red above). I am not very good when it comes to math and don't know much about the best practices for decreasing the scale of the numbers. If it was a linear equation, I would just divide everything by a number and then multiply it by that number afterward. However, the presence of logarithms and exponents makes it so I'm not sure how I would decrease the scale of this equation.
Please advice on how to alter equation or ways of getting the square root of a number > 524287 in the Starcraft Editor
0
That fixed it, although it's now a static circle rather than more of a shield, I'm just glad I got somewhere with this.
0
In reply to DrSuperEvil:
0
In reply to DrSuperEvil:
0
In reply to DrSuperEvil:
0
In reply to DrSuperEvil:
0
After some investigating on how sentries use the guardian shield I ended up taking the following steps:
The Shield Generator behavior periodically runs a Create Set with a validator for "has shields". This set runs the Search Effect (for my shield generator's functionality) and an Apply Behavior. The applied behavior is called Shield Generator On. In the Shield Generator On Actor (copied from Guardian Shield) the actor is created when the behavior turns on and the animation stops when the behavior turns off. This works in creating a shield effect and removing it when the shield is destroyed.
0
How to make a shield effect (Guardian Shield) around a structure? I've tried to attach in events but didn't work. Shield should disappear when the structure's shields run out.
0
UI Elements are probably the best solution, however, after looking into it text tags aren't that bad in comparison and much easier. Sending actor message for tint wouldn't work well because different players would have different "map modes" selected.
0
Thanks guys, I think I'll stick with custom values and text tags then
0
The buildings in my map have a lot, important custom values that tie into player income (not really affecting the unit itself). I wished there was a better way of displaying these custom values. Soon after, I looked into using attributes as a substitute.
These attributes would be changed very constantly and would range from negatives to positives in the millions (but less than 5 million)
My question is: Are attributes less laggy that custom unit values when used for this purpose?
0
In my map, there are a lot of important "custom unit values" (somewhere about 20). It's very hard for me to convey these values to players without some sort of visual mapmode. Right now, you can click a button to create text tags for 20 seconds (colored by value). However, I'm looking for something more visual, hopefully, that can show on the minimap as well.
Here is an example: Each building needs food, represented as custom value #4. You click a button and all buildings with high food stocks show up in green while starving buildings show up in red. Maybe through an effect, or simply changing the unit's color. Does somebody who know the editor well know if there is a way out there to effectively display this information in a "Map mode"?
0
Hey guys, I'm trying to get a unit to die after 60 seconds of being alive similar to the swarm host in regular Starcraft 2. I tried looking at how the swarm host does it but couldn't find anything. These temporary units would be spawned via trigger.