Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Vanyfraise on November 13, 2017, 05:45:48 AM
-
Hi guys,
I want to make this danmaku shooting system :
- if player press fire then create bullet1,
- if player held button x seconds then create bullet2 all long player held down fire button (alternate fire).
For now, i'm trying this :
- Idle is waiting for "Get Button Down", it stores the result in the bool fireIsPressed.
- IsFiringOnce, take position of owner, create the bullet,
- FireBoolTest is waiting for x secondes and is testing the bool :
- if true (means player's still pressing "fire1" button), it goes to HOLDFIRE event.
- if false (means player's not pressing anymore "fire1" button), it return to Idle Start state.
Of course, it's not working, i don't know why but the bool does not set to false when the fire button is release.
I try to make a "shootmanager" in another gameobject in the scene, it set correctly the bool but no result when i test the condition (it do not send to the STOPFIRE event, even if the bool is false).
Do i try with the wrong "get..." action or something else ?
-
After some investigations,
it seems that my bool test, can't accept the bool to be true.
-
Hi,
Try a different setup :
State 1 : have a 'mouse down' action. on mouse down go to state 2
State 2 : have a mouse up action and a wait. Connect the mouse up transition to State 3 and wait to State 4.
State 3 : Do single shot
State 4 : Do HoldFire and have a mouse up action when you need to know if released, to go back to State 1.
-
I'll try this, thank you.
And thank you for your coin magnet video that i just use to make mine :D
-
Hi,
Try a different setup :
State 1 : have a 'mouse down' action. on mouse down go to state 2
State 2 : have a mouse up action and a wait. Connect the mouse up transition to State 3 and wait to State 4.
State 3 : Do single shot
State 4 : Do HoldFire and have a mouse up action when you need to know if released, to go back to State 1.
It works but i need to repeat the alternate fire as long the button is pressed !
[EDIT] Ok it works ! I put another state making a loop aside . Thank you very much !