playMaker

Author Topic: Pressing keys to turn on objects doesn't work. Help  (Read 9984 times)

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Pressing keys to turn on objects doesn't work. Help
« Reply #15 on: January 17, 2014, 09:08:25 AM »
 You don't need to get key and get button, they're totally different actions.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Pressing keys to turn on objects doesn't work. Help
« Reply #16 on: January 17, 2014, 08:42:49 PM »
You don't need to get key and get button, they're totally different actions.

What should I do then? Because if I can't use those actions to turn on a light then I don't know what to do.
« Last Edit: January 17, 2014, 08:46:46 PM by coffeeANDsoda »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Pressing keys to turn on objects doesn't work. Help
« Reply #17 on: January 17, 2014, 08:44:55 PM »
Just use Get Button Down, send an event from it, go to the next state and use Get Button Up, fire an event back from there. Make a circle. If its down, then its in this state, if its up then its in the other state.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Pressing keys to turn on objects doesn't work. Help
« Reply #18 on: January 17, 2014, 09:41:06 PM »
Just use Get Button Down, send an event from it, go to the next state and use Get Button Up, fire an event back from there. Make a circle. If its down, then its in this state, if its up then its in the other state.

When I press play, the first state with the arrow pointed down lights up green. The second state named "On" (where the Get Button Up action is located) is grey. So it still doesn't light up.

redikann

  • Full Member
  • ***
  • Posts: 174
Re: Pressing keys to turn on objects doesn't work. Help
« Reply #19 on: January 17, 2014, 10:25:34 PM »
I wouldn't use Horizontal because it has a positive and negative key (a, d). Just use key up and key down. Do you really need 'turn on' to be a global event. Seems to me that current set up might confuse Playmaker.
Your telling Playmaker that on the 'turn on' event you want to loop back into your start state.
« Last Edit: January 17, 2014, 10:29:24 PM by redikann »

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Pressing keys to turn on objects doesn't work. Help
« Reply #20 on: January 17, 2014, 10:39:16 PM »
I wouldn't use Horizontal because it has a positive and negative key (a, d). Just use key up and key down. Do you really need 'turn on' to be a global event. Seems to me that current set up might confuse Playmaker.
Your telling Playmaker that on the 'turn on' event you want to loop back into your start state.

How about applying that to three objects? Because what I want to do is have a set up like Up, Down, left or right. Or D for the lowest object, A for left and D for right.

redikann

  • Full Member
  • ***
  • Posts: 174
Re: Pressing keys to turn on objects doesn't work. Help
« Reply #21 on: January 17, 2014, 10:42:22 PM »
Each object can have it's own FSM listening for it's own key input. You could use the axis event action but it might be cleaner to do it by object.

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Pressing keys to turn on objects doesn't work. Help
« Reply #22 on: January 17, 2014, 10:50:45 PM »
Each object can have it's own FSM listening for it's own key input. You could use the axis event action but it might be cleaner to do it by object.

So for each button(three in this case) all 6 states would have Axis Event? Or would all three objects just have it with the first. Given the face the first is "Off" so each Off state would have Axis and Set Light Intensity. Like the one one highlighted in blue?

https://db.tt/tZdRa2SS



Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Pressing keys to turn on objects doesn't work. Help
« Reply #23 on: January 17, 2014, 11:12:23 PM »
Dude, Get Button uses the inputs defined in the Input Manager. They are axi. There is positive and negative for all of them. You call them by their name with Get Button. Get Key uses buttons on the keyboard defined in that action - totally different. You can use either here.

So unless you have an input you created called "off light" then that action isn't going to do anything.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Pressing keys to turn on objects doesn't work. Help
« Reply #24 on: January 17, 2014, 11:51:52 PM »
So unless you have an input you created called "off light" then that action isn't going to do anything.

Then why doesn't the action act like it's connected? Plus, are you sure I don't have to add a FSM to PlaymakerGUI?

https://db.tt/PuvIMJx0


« Last Edit: January 18, 2014, 12:50:16 AM by coffeeANDsoda »

redikann

  • Full Member
  • ***
  • Posts: 174
Re: Pressing keys to turn on objects doesn't work. Help
« Reply #25 on: January 17, 2014, 11:58:14 PM »
I am taking a guess but look under the "Start" event you will see 'turn on'. Try deleting that.

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Pressing keys to turn on objects doesn't work. Help
« Reply #26 on: January 18, 2014, 12:36:19 AM »
I am taking a guess but look under the "Start" event you will see 'turn on'. Try deleting that.


The start FSM? How would that effect it though?
« Last Edit: January 18, 2014, 12:50:45 AM by coffeeANDsoda »