Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: unearthly on November 27, 2018, 08:55:32 PM

Title: Changing float subtract in one FSM from another
Post by: unearthly on November 27, 2018, 08:55:32 PM
Hi guys,

What I want to do is to increase damage on an enemy (for just one level at a time). I have an FSM to display game objects which would be needed. From those game objects I want to trigger a small increase in a Float Subtract which is in another FSM. Three increases depending on how many of these game objects the player acquires.

How can I access and modify that Float Subtract Action on the Damage Enemy State in my Damage Manager FSM, from the FSM used to display those game objects (or perhaps from another working between both)? Hope the attached image helps.

Regards Charles.
Title: Re: Changing float subtract in one FSM from another
Post by: Athin on November 27, 2018, 09:14:43 PM
Rather then having that flat number, turn it into a variable (to the right on the action, the button will make it a variable.)  Then you can simply use the action Get FSM Int, do your math and then Set FSM Int to return the final value.
Title: Re: Changing float subtract in one FSM from another
Post by: unearthly on November 28, 2018, 12:38:22 AM
Hi Athin,

I should have added that the FSM to trigger the Float Subtract modification is in another scene from the one the enemy is in.

Regards Charles