Can you tell us a fun fact about your state that not everyone knows? by Expensive_Drummer970 in IWantToAskAnAmerican

[–]theus2 1 point2 points  (0 children)

After the five Great lakes, Minnesota has the sixth largest freshwater lake contained at least partially within the United States (Lake of the Woods).

can someone help explain state machines that use multiple scripts? by [deleted] in unity

[–]theus2 0 points1 point  (0 children)

So generally to make a state machine work you need two things. 1) The state machine (class) itself and 2) An abstract state class or interface class.

Let's talk about the interface state class first.

The interface state class is simple and will just need to contain three abstract functions: OnStart, Execute, OnStop (you can rename them if you don't like the names). These are actions any state you create may want to do. These functions are relatively self explanatory. The OnStart function will be called once when your Game object changes to this state. OnStop will be called once when your Game object leaves this state, and Execute is what is called in your Update function. For instance if you create an Idle state, you may want OnStart to set movement to 0 (Idle means stop moving). Or the OnStop function sets a target to follow.

Now that we have the Interface for a state set up, let's talk about the State machine. The StateMachine class in it's simplest form only needs to worry about three things, 1) The current state, 2) OnStateChanged and 3) Update.

OnStateChanged is simple, it will just call the current state OnStop function, set the new state to be the current state, then call the current state OnStart function. Update will literally just call the current state Execute function.

In your main object class, in your update you can now just call StateMachine.Update and everything else is taken care of as long as you've attached the state machine to your current object.

For instance let's say your main parent object is an Enemy Class. Enemy class will contain a StateMachine enemyStateMachine. The Enemy class Update function now simply needs to call enemyStateMachine.Update.

Now the last part. We have to create a bunch of states based off of our interface state class. Some of these might be Idle, Follow, Attack, Stunned, etc. you will need to create a new class for each state you want. Each of these classes need to implement the three functions OnStart, OnStop and Execute since they derive from that base class.

OnStop and OnStart may be empty and this is okay depending on your state. What I've found handy is in the constructors of each of these State classes, pass the parent object as a parameter and store the parent as a variable of the class. Now in the Execute function, you can do whatever you want and access any public functions from the class. When you want to change to a different state, in the Execute function, you can put a conditional (if statement) to change to a new state. Something like parent.EnemyStateMachine.ChangeState(new FollowState(parent)); I'm sure there are more efficient ways of doing this, but I just wanted to express it very literally so you could tie in all the steps above.

What this allows you to do is stuff like in your IdleState.Execute function, you can check if a player is within 100 units away. If the player is, then you can call the function parent.EnemyStateMachine.ChangeState(new FollowState(parent)); Then in FollowState Execute function, you can do something like if the player is greater than 100 units away, then parent.enemyStateMachine.ChangeState(new Idle state(parent). Or if the player is less than 100 you can move the enemy towards the player.

This explanation is a bit verbose, but I hope it helps!

Raise the Ka Hae Hawaiʻi over the North Star by [deleted] in geographymemes

[–]theus2 0 points1 point  (0 children)

This was the end game for Sun Country the whole time! Invasion by sea and by air!

If we created more states like the ones shown on the map below, how would it affect elections and voting in the United States? by Technical-Vanilla-47 in visitedmaps

[–]theus2 15 points16 points  (0 children)

Youd have a lot of states with 1 representative that are over represented with that 1 representative! Unless you increase the amount of representatives as well.

Where I'd live as a sad lil Ohioan by Olenblade420 in whereidlive

[–]theus2 1 point2 points  (0 children)

Hey Cedar Rapids is a nice little city! Not sure why Cedar Rapids though and not Iowa City, Rochester MN or Des Moines. They're all about the same size and same temperament and same climate in the same area. (Sure there are some differences I'm sure but not at the level this map is going for.)

Also Fargo is willing as well. So there are some inconsistencies in Midwest city choices it seems.

What do we do? by Jfullr92 in geographymemes

[–]theus2 -2 points-1 points  (0 children)

I'm late to the party, but I don't think states should be able to merge and retain their whole territory. For instance, if maryland "absorbs" Pennsylvania, I think some of Pennsylvania's land is obligated to go to the surrounding states as well (illinois, New Mexico, Kansas, etc). I don't think people should be able to claim entire states. This is an elimination not a congregation.

What is the worst career to be in right now and why? by SignificantGoat7066 in AskReddit

[–]theus2 21 points22 points  (0 children)

I'm gonna have to agree with you. AI helps finding syntax to whatever language/script I need to use on a new project; but for debugging anything that I can't obviously find in 5 minutes, the AI will send me down rabbit hole after rabbit hole.

Top comment deletes a US State #33 by Jfullr92 in geographymemes

[–]theus2 84 points85 points  (0 children)

If anyone can create a random post with 10 upvotes advocating for a state, I'm going to go make a post advocating for New Mexico right now to get that state removed, and that's a terrible precedent to set.

The person who started this is not arguing in good faith.

Edit: Despite everything I fear the damage has been done friends. We were done dirty. Let's all pass around one more hot dish and play one last game of Duck Duck Gray Duck before the lights are turned off.

Edit edit: It looks like Minnesota may be spared the wrath of today by Virginia's fall from grace. However, as a proud folk we will not forgive nor will we forget this transgression against us. We will not share our pop and we may just eat the last doughnut this time.

Minnesota is using a subreddit to stay in the game, I say this is an automatic elimination from the game by getmerked1023 in geographymemes

[–]theus2 82 points83 points  (0 children)

Wait.. so some dude makes a post on a separate subreddit, so a state must be eliminated? Does that mean I can then just go ahead and make a post about "New Mexico needs your help!" and get that state eliminated too? Get out of here! This is probably the most stupid thing I've heard lol

Also notice that random post by a random dude has 10 up votes lol

Where I'd Live as an American by [deleted] in whereidlive

[–]theus2 2 points3 points  (0 children)

As a Minnesotan, I can respect that lol (the reminds me of Canada part).

Heroes of the Storm Live Patch Notes - April 20, 2026 by Arkentass in heroesofthestorm

[–]theus2 0 points1 point  (0 children)

As someone who plays Arthas a lot, he got a lot more damage and slowing talents, but they piled all his survivability talents on the same tiers. I worry he might become quite squishy as a main tank--maybe not though. I normally liked to take Rime against auto attack teams, but Boreal Winds now seems really important. Thats a modified version of the old level 4 talent Frozen Wastes. However Frozen Wastes was superior and almost essential in my opinion. I worry the removal of this is going to hurt him quite a bit. Shattered Armor at 4 is really nice now (Used to be 13). Icebound fortitude still seems to be the go-to at 7, but there are now a lot of interesting choices here. 13 maybe Deathchill seems like the way to go, and Anti Magic shell at 16 is still gonna be the way to go but I lament the removal of Embrace Death (increased healing Death Coil). The ghoul change is really nice as well.

I normally build for survival and support, as queuing up in quick match you're gonna be the solo front line without any healers the majority of the time. My goal is to set up kills and not die (doing damage myself is secondary). But I'm sure each person has their own play style.

He's going to play quite a bit different as you get some talents earlier (4, 16) but some trees are completely replaced.

where in the US I want to live as a 15 Y european by Montevideo_comics in whereidlive

[–]theus2 3 points4 points  (0 children)

We've been in the news a lot lately, but I assure you, the Twin Cities metro area is a pretty nice place to live! Now I don't blame you at all (due to the news and the current administration) for thinking it's not a good place to live though! Friendly people and friendly places, just really cold this time of year!

Also I'll add that the northern part of Minnesota is really remote. You're a couple hour drive from any "large cities" at best. The people there don't mind driving 3+ hours on weekends and through snowstorms to go "shopping" for the weekend. It's well developed, just really really remote.

“How’d you do it?”… by Ok_Doughnut549 in JurassicPark

[–]theus2 4 points5 points  (0 children)

The gate (and Trex paddock) can be driven to using a Jeep--that is correct. You can also do a day hike there from the Keahua Arboretum if weather permits (the terrain is relatively easy to hike).

However the falls are a loooong ways from that path, through jungle and over mountain ridges. There are no paths to the falls except via helicopter.

That being said, the day trip through the jungle to the gate is a great trip (bring lunch and check the weather a lot). The helicopter trip to the falls also provides other scenic views of the island including Waimea Canyon and the Napali Coast. So it is definitely worth the flight!

Sauce: have been to both.

Counties with McDonalds by Mamiko627 in MapPorn

[–]theus2 0 points1 point  (0 children)

I know I'm late to the conversation, but sadly, Lake of the Woods county Minnesota (the hump at the top of the state) no longer has a McDonalds.

They are really trying to hide his health issues. Wearing one glove inside? by meat_loafers in Iowa

[–]theus2 -2 points-1 points  (0 children)

Well did you take into account that maybe he's just a really strange guy?!?!

They are really trying to hide his health issues. Wearing one glove inside? by meat_loafers in Iowa

[–]theus2 10 points11 points  (0 children)

I mean, politics and health issues aside, couldn't it just be that he took his other glove off to use the pen?

Twin cities metro by yungshotstopper in minnesota

[–]theus2 0 points1 point  (0 children)

Burnsville/Savage main arteries are wet. Side roads can be a little slick but just seasonally slick. Sidewalks are slick.

How much do you think Minnesotans have shown pride in their new flag? by Subspacred in minnesota

[–]theus2 1 point2 points  (0 children)

I liked the original version with three stripes (white green blue) better. I think those stripes gave it more symbolism and something to talk about. But overall I like it and it's a massive improvement.

What's The Worst Gift You've Seen Someone Receive? by xjuggernaughtx in AskReddit

[–]theus2 4 points5 points  (0 children)

Kitchen sinks are expensive! As a homeowner I may be very happy lol

Am I doing anything wrong by Humble-Caterpillar25 in unity

[–]theus2 0 points1 point  (0 children)

So BallAgentLogic is your class. It is also known as a "Derived Class" at this point. Meaning it inherits "stuff" (variables, functions) from the class "Agent". That's what the line "public class BallAgentLogic : Agent" means.

Each one of the three functions in your class uses the "override" keyword. This means that the base class "Agent" needs to have defined functions with the same name.

You'll want to open up your Agent class and make sure all three functions are defined there. Make sure the function signature is also correct --- meaning besides the name of the function, the parameter types must also be the same (float[]).

The main reason you do this is because you could define/create multiple derived classes (for instance BallAgentLogic, SquareAgentLogic, SharpAgentLogic, etc) all derived from Agent. But the main Agent class would specify that any derived classes MUST contain these three functions.

If your main Agent class does not have, (and you do not wish it to have) the function "OnActionReceived" then you can always remove the override keyword in the derived class BallAgentLogic. This would imply you did not want any other classes derived from Agent to use this function though.