#New_State
Computational Science is so apt, I know that behaviour changes with state. (new_state = transition(current_state, better_inputs)), but I am a dubious machine, how to account for that?
September 29, 2026 at 6:03 AM
finally fulfilling my lifelong dream of asking a coding agent to write elixir code for me
April 17, 2026 at 1:18 PM
New State Capital Partners Completes Acquisition of Vast Coworking Group to Expand Flexible Workspace Portfolio#USA#New_Rochelle#New_State#Diverse_Workspaces#Vast_Coworking
New State Capital Partners Completes Acquisition of Vast Coworking Group to Expand Flexible Workspace Portfolio
New State Capital Partners has acquired Vast Coworking Group, enhancing its investment portfolio in flexible workspaces and franchising.
third-news.com
March 3, 2026 at 12:13 PM
Part 17:
OOP in Godot... Am I uh... doin it right?

#godot #indie #gamedev
December 13, 2025 at 11:58 PM
How to synchronize rpc call with client-authority
### Godot Version v4.4.1 ### Question I am working on a multiplayer game that uses client-authority. For each client I have a `StateMachine` which manages different `States` based on Player input. Each State is entered on signal callback and set in this fashion (note: the code is simplified to give an idea of how I handle the logic): func set_current_state(new_state: State) -> void: if current_state and new_state != current_state: current_state.exit() current_state = new_state current_state.enter() This code is run through the signal callback which checks for authority like so (to my understanding that’s how you make it client-authoritative): func on_state_transition(_state: State, _wanted_state: String) -> void: if not is_multiplayer_authority(): return # rest of the logic In each `State`’s `enter()` an `rpc` method is called in an `AnimationComponent` class, responsible for traveling to the correct `Playback` node, like so: func enter() -> void: # some logic play_idle() @rpc("any_peer", "call_local") func play_idle() -> void: playback.travel("idle") Again, to my understanding, calling the `rpc` as `any_peer` and `call_local` should run it on EVERY peer in the game, however I can’t get my `play_idle` logic to run on any peer other than the sender. I tried to log the call and I get something along the lines of: Peer [0] sent anim data to [1244740599] # when called on the client Peer [0] sent anim data to [1] # when called on the host I am completely lost at this point and going through the RPC documentation does not help at all. Any help anyone?
forum.godotengine.org
June 3, 2025 at 5:38 PM
Attack State does not change the current state
### Godot Version Godot 4.3 ### Question I am creating a behavior tree for a base enemy scene. It’s organized by one state machine with a few child state nodes under it. So for the Patrol and Aggressive states, they transition to other states well. But, I am finding that the Attack state is having trouble with it. I am not making much progress on it, so I need help finding why the state doesn’t change. The state machine has a function, change_state(new_state), that calls upon the exit function of the previous state and the enter function of the new state. class_name State_Machine extends Node signal transitioned(state) @export var starting_state: State var current_state: State func init(parent: Node3D) -> void: for child in get_children(): child.parent = parent change_state(starting_state) func change_state(new_state: State) -> void: if current_state: current_state.exit() current_state = new_state current_state.enter() transitioned.emit(current_state) The attack state inherits an abstract state class with empty functions to be filled by custom logic extends State signal attack(data: Attack_Stats) @export var attack_data: Attack_Stats @export var next_attack: State @export var return_state: State @onready var state_machine = get_parent() func enter() -> void: print_debug("attacking player"); change_anim.emit(attack_data.animation_name) play_audio.emit(attack_data.SFX) attack.emit(attack_data) func _on_animation_player_animation_finished(anim_name: StringName) -> void: if anim_name == attack_data.animation_name: # Grab the new player position var player_position = parent.player_target.global_position # if close enough try another attack if parent.check_target_reached(player_position): state_machine.change_state(next_attack) # if not close enough then change state else: state_machine.change_state(return_state) And in testing, once the attack animation is over, it should transition to itself or transition to the aggressive state in the tree. I could call the enter function, but I want to leave room to create child states that handle other attacks that could come next in a combo. So is there anything people can notice about the code that may cause a failure in changing states?
forum.godotengine.org
April 13, 2025 at 2:01 AM
If you make state a resource and the animation name a property of state, you can refactor that code into a single line, and make it adaptable for new states without changing the code each time:

func change_state(new_state):
set_animation(new_state.animation_name)
February 2, 2025 at 4:22 AM
Looks a bit overdesigned IMO. I'd personally do something like this. You're not needlessly allocating a bunch of memory creating dictionaries for each state, and you're also able to reuse and guarantee the existence of your class variables. You can also statically type your variables this way.
January 17, 2025 at 7:51 PM