Page 1 of 1

Overwriting a state function

Posted: Sat Nov 25, 2023 12:19 pm
by Barbie
How can I overwrite a state function? If I use state MyState Expands OriginalState it looks like that if I declare a function with the same name as in parent class the function of parent's class is called.
If I use an separate, unique state I will lose all other functions of the OriginalState. :noidea

Re: Overwriting a state function

Posted: Sat Nov 25, 2023 4:53 pm
by Alien3674
By simply redefining a function with a state.

Code: Select all

state PlayerWaiting
{
	function ProcessMove(float DeltaTime, vector NewAccel, eDodgeDir DodgeMove, rotator DeltaRot)
	{
		//The function has been redefined, yuor code here
	}
}

Re: Overwriting a state function

Posted: Mon Nov 27, 2023 4:51 pm
by Barbie
Argl, so simpleā€¦ I expected losing all other function in parent state by "overwriting" a state with the same name. Thanks. :tu: