playMaker

Author Topic: Flashlight interaction with models  (Read 2444 times)

bassman2112

  • Playmaker Newbie
  • *
  • Posts: 5
Flashlight interaction with models
« on: February 10, 2014, 05:04:51 PM »
Hey all!

I have a quick question. In my game, I'm using light as a major mechanic. It's a rift game in which your flashlight is head-mounted, so where you look is where it points.

I have two things I want to do with light:

1) There are characters that will only appear when your light is off (so their models will be transitioned off/on with the state change of the player turning the flashlight off/on)

2) There are enemy characters that will chase you, and disappear when your light is shined on them

I'm curious how I could accomplish this with Playmaker. Any ideas would be greatly appreciated!! (As a side note, I have had a bit of experience of playmaker - am using about 5 instances of it for other bits of the project and have had a fair amount of success)

Thanks a lot =)
-Alex

EDIT: I've actually mostly figured the first one out! It's simply looking for the "Get Key Down" of "F" for both states, and setting the property of the model to off and on depending on that state.

Still having trouble with the second one, though =) Thanks again
« Last Edit: February 10, 2014, 05:22:02 PM by bassman2112 »

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Flashlight interaction with models
« Reply #1 on: February 10, 2014, 05:36:13 PM »
Check out the AI tutorials -
The light will have a line of sight, cone angle and range finder. All of which you can use to determine if the characters are in the light or not.

bassman2112

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Flashlight interaction with models
« Reply #2 on: February 10, 2014, 06:03:00 PM »
Check out the AI tutorials -
The light will have a line of sight, cone angle and range finder. All of which you can use to determine if the characters are in the light or not.

Thank you! I will watch those, and hopefully that will be everything I need =)

Thanks again

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Flashlight interaction with models
« Reply #3 on: February 10, 2014, 07:01:38 PM »
A spherecast would probably accomplish what you need here.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Flashlight interaction with models
« Reply #4 on: February 10, 2014, 10:40:09 PM »
Can you scale the sphere over time to get the cone shape of the light?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Flashlight interaction with models
« Reply #5 on: February 11, 2014, 06:42:59 AM »
I dont think you can scale a spherecast, you'd have to do something custom to make a cone shaped zone. Maybe one of the Fog Of War assets or Line Of Sight enemy AI assets from the store would help here.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D