playMaker

Author Topic: Set Enemy/npc (or player) Fov 3d or 2d  (Read 27311 times)

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Set Enemy/npc (or player) Fov 3d or 2d
« Reply #30 on: January 03, 2016, 02:50:49 PM »
mmm I am not using 1.8 (waiting for beta to finish) so hard to help. Try this:

Line 336: public override void OnDrawGizmos() => void OnDrawGizmos()

let me know..

Player

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Set Enemy/npc (or player) Fov 3d or 2d
« Reply #31 on: January 03, 2016, 03:20:42 PM »
This works fine, thank you.
If you do not mind can explain how to get a list of names to copy a list of <RaycastHit> hit in FSMArray? it is difficult for me.

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Set Enemy/npc (or player) Fov 3d or 2d
« Reply #32 on: January 04, 2016, 09:28:00 AM »
I don't know.. I have not used 1.8 yet.

try something like this:
line 38
public FsmArray test;

Line 315 +327
hits.CopyTo(test.Value);

Player

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Set Enemy/npc (or player) Fov 3d or 2d
« Reply #33 on: January 06, 2016, 03:20:26 AM »
Thanks for your help.
This code is not running. Probably something I'm doing wrong

« Last Edit: January 06, 2016, 03:33:51 AM by Player »

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Set Enemy/npc (or player) Fov 3d or 2d
« Reply #34 on: January 06, 2016, 11:27:23 AM »
i don't then.. i have not tried 1.8. you need to find array fsm. type Fsm in the code and see what options you have or open an PM1.8 array action and look at the code - https://hutonggames.fogbugz.com/default.asp?W1204 and copy it's logic/setup.
« Last Edit: January 06, 2016, 11:55:37 AM by dudebxl »

Player

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Set Enemy/npc (or player) Fov 3d or 2d
« Reply #35 on: January 08, 2016, 04:01:15 PM »
can not copy the object name. in any case it fails. (PM1.7.8.4 PM 1.8.)
 only one name. :(
« Last Edit: January 08, 2016, 04:05:27 PM by Player »

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Set Enemy/npc (or player) Fov 3d or 2d
« Reply #36 on: January 08, 2016, 11:29:31 PM »
Cant help then until i move to PM 1.8

if someone else knows please let us know....

adrian

  • Junior Playmaker
  • **
  • Posts: 52
Re: Set Enemy/npc (or player) Fov 3d or 2d
« Reply #37 on: April 19, 2016, 01:13:45 PM »
I'm really interested in using this for line of sight in multiplayer, has anyone managed to use this action to generate a list of "visable" objects? Great action btw, thank you!

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Set Enemy/npc (or player) Fov 3d or 2d
« Reply #38 on: April 27, 2016, 09:26:24 PM »
@adrian

Inside the action in an array you have that information. All you need to do is extract it.. I don't have time to do it but give it a try.. just look the array or arraylist actions as a reference and make a loop..

LordHorusNL

  • Beta Group
  • Full Member
  • *
  • Posts: 226
Re: Set Enemy/npc (or player) Fov 3d or 2d
« Reply #39 on: June 24, 2017, 08:39:03 AM »
I know this is an old thread, but could these actions possibly be updated so that you can extract the gameobject inside the FOV?

The instructions in this thread no longer work and i don't have the coding skill to add it myself.

Update:

I got the action to output a single GameObject and it works fine, except that when another object with the same tag enters the NPC's field of view, it only registers if the new object is to the right of the old one.

So close to being usable, could somebody take a quick look to see if they can figure out why objects are not being tracked in the whole FOV?

This is what i mean.

Does not register



Does register

« Last Edit: June 25, 2017, 12:08:14 PM by LordHorusNL »

LordHorusNL

  • Beta Group
  • Full Member
  • *
  • Posts: 226
Re: Set Enemy/npc (or player) Fov 3d or 2d
« Reply #40 on: July 08, 2017, 11:09:56 AM »
Nobody has any interest in updating these actions then?

A shame, i've been trying to figure out a good way to track visibility on multiple targets within a field of view simultaneously.

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: Set Enemy/npc (or player) Fov 3d or 2d
« Reply #41 on: July 08, 2017, 11:25:24 AM »
I have worked a bit with the author of this asset. In its most recent update, it should be able to return a playmaker array of all the objects within FOV. It actually has a bunch of different tools for doing so. It does not include a visualizer however.

https://www.assetstore.unity3d.com/en/#!/content/88036

I can take a look at the the action linked in this thread, but not sure if I can get it working.

I actually own this GPU line of site tool as well, which has HDR options, the ability for FOV lines to go up walls, etc. https://www.assetstore.unity3d.com/en/#!/content/19764

LordHorusNL

  • Beta Group
  • Full Member
  • *
  • Posts: 226
Re: Set Enemy/npc (or player) Fov 3d or 2d
« Reply #42 on: July 08, 2017, 11:59:53 AM »
I don't really need the visual element of these actions, just the ability to detect when objects enter/leave the FOV.

But having any action updated would be nice offcourse and if you see a quick fix then please do.

I'll move to Playmaker Help for now.
« Last Edit: July 08, 2017, 12:13:46 PM by LordHorusNL »

kanbibadboy77

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Set Enemy/npc (or player) Fov 3d or 2d
« Reply #43 on: October 26, 2017, 04:48:40 PM »
Thanks so much!, you're awesome!

Padenlee

  • Junior Playmaker
  • **
  • Posts: 63
  • You can't hit what you don't shoot for!
Re: Set Enemy/npc (or player) Fov 3d or 2d
« Reply #44 on: June 21, 2019, 12:27:00 PM »
For anyone in the future struggling to get the mesh to appear in-game, switch the action to Late Update (/◕ヮ◕)/
-Paden Pierry
@padenpierry
Apple inc.'s first TV show, EP 1.
Game Dev since 2007
Coolest client: Bridgestone