playMaker

Author Topic: "used" Trigger states?  (Read 2146 times)

KindredGamer

  • Playmaker Newbie
  • *
  • Posts: 2
"used" Trigger states?
« on: May 28, 2013, 06:51:55 AM »
Hello,

Im fairly certain this question will have been asked before but i just cant get an answer. As a previous UDK user, kismet allowed for "used" trigger states. This meant that pressing "e" in proximity to a trigger would progress the scripted sequence. It was useful for light switches and doors etc.

As far as i can tell, playmaker only uses "enter", "exit" "stay". I have played around with "get key down" events but that doesnt appear to value how far away the player is from the trigger. Is there something quite simple im missing, or does playmaker just not have this particular functionality?

Cheers!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: "used" Trigger states?
« Reply #1 on: May 28, 2013, 06:57:30 AM »
Hi,

 I think it's more a question of how Unity works,

what you likely want here is two trigger, one that is of the right volume, and one that is the "proximity" with a largest radius or size, have these collider on separate physics layer, and simply have your proximity based logic use the right one.

 else, you can also check the distance from lists of colliders, and automate the process using arrayMaker. but I would definitly look first into having pairs or colliders for a given spot. Nothing wrong with this.

bye,

 Jean

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: "used" Trigger states?
« Reply #2 on: May 28, 2013, 07:36:32 AM »
Sounds like Kismet just built in higher level function for this commonly used trigger type.

Triggers in unity are very very flexible but you have to be a little more specific with what you want as a result of that. Basically you have to use a Collider of any type, you can make it on an empty game object or you light switch if you want it doesnt matter. Once something has a collider you use a collision event action to figure how the collision is "activated", it could be when there is an exit from the proximity, an entry into the proximity, a touch of the boundary, etc..

After you define the collision scenario you can use a get key down action to allow the flipping of the light switch, after that it just depends on your FSM structure, you want to setup an ON state and an OFF state and jump between them when the player is 1)in the collision trigger zone and 2)pressed E.

Its basically just 2 actions, and using FSM structure to determine the state of things.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

KindredGamer

  • Playmaker Newbie
  • *
  • Posts: 2
Re: "used" Trigger states?
« Reply #3 on: May 28, 2013, 10:20:36 AM »
Hi,

A few hours, and a bit less hair later i have cracked it. I set a listener for trigger activation and chained it to separate "key down" states. The player doesnt have to point at the light switch but i can live with that.

Thanks guys, Much appreciated!!

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: "used" Trigger states?
« Reply #4 on: May 28, 2013, 10:30:41 AM »
You can use a Mouse Pick with a distance restriction if you want them to aim at it and use E.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D