Product Chat / Player visibility

Author
Message
Gtox
3D Media Maker
10
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 9th Aug 2015 19:51
Is there a way to set view cone angle and view range in the fpe file or script?
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 9th Aug 2015 20:37
Do you want the enemy to detect you further away or closer ?
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Gtox
3D Media Maker
10
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 9th Aug 2015 21:44
@Synchromesh - it's for a custom model/script, and with the view cone & range set to 0 by default (according to the properties box), the g_Entity[e]['plrvisible'] function doesn't work correctly. Essentially I want the model to detect the player when you're in front of it, but not when you're behind it. It's not critical if it can't be done - I'll just assume that my monster has great hearing and can detect you even when you're directly behind it
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 10th Aug 2015 00:37
The view range is set in the script but you can alter it via properties if the range is less ....
I usually use this as my tester and adjust to how I need it

place character ....select his properties.... set "View Range" to 300 and "View Cone Angle " to 1000

The Character should view in all directions and allow you to get really close for instance before you are detected.....
From this you may be able to tweak it for your need also using the debug slider will help set your view cone angle ...

Don't know if this info will help but its worth playing with ..


The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Gtox
3D Media Maker
10
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 10th Aug 2015 06:57
@Synchromesh - I was hoping that there was a way to do it in the FPE or script, so that the end user doesn't have to fiddle with anything, but it's not the end of the world.
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 10th Aug 2015 10:51
@Synchromesh
Would you know..

Quote: "place character ....select his properties.... set "View Range" to 300 and "View Cone Angle " to 1000 "


What is the range for the above two items?

I assumed / thought it was...

View Cone Angle - 1 to 360? in degrees, So what does zero do, and is it in degrees?
View Range - 0 to xxx?

While I am asking, what is the range for...
I have been meaning to ask these questions for ages...
I assume there is a min/max value range.
I cannot find any details about this in the forums.

View Range
View Cone Angle
Strength
Speed
Anim Speed
Physics weight
Physics friction
Explode damage

Cheers



I may be old, but at least my memory still ....hmmm

DT:Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 CPUs), ~3.6GHz, Windows 8.1 64-bit, 16 GB Ram, NVIDIA GeForce GTX 750 Ti, Display Memory: 4018 MB. Resolution 1360x768, Passmark 3528, AutoCAD, 3DsMax, Paint.Net, Solidworks.
SoUlFaThEr
9
Years of Service
User Offline
Joined: 20th Jul 2015
Location:
Posted: 10th Aug 2015 18:21
For the view distance, have a look through this thread

https://forum.game-guru.com/thread/212715

as for view cone......that's an interesting question how to number that.......
The only stupid questions are those that were never asked.
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 10th Aug 2015 18:59 Edited at: 10th Aug 2015 19:00
Entering 180 gives you a 360 Cone View angle...

I used 1000 when playing around but never altered it .....
So you can work out your preferences by the 180 figure
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 10th Aug 2015 19:42
yes it's in degrees and counts for either side of the '0' point, so 5 is actually 10 degrees (5 either side of straight ahead)
as far as i can tell you can't adjust the view range directly from the script (the actual visibility check i mean, not the "GetPlayerDistance")
you would need to combine both the visible check and a player distance check to compensate like;
if g_Entity[e]['plrvisible'] == 1 and GetPlayerDistance(e) < AIGetEntityViewRange(g_Entity[e]['obj']) / 3 then
^ replacing the / 3 with the value you wanted to achieve or simply putting a value instead of the viewrange entirely.
^^ cant remember if it needs 'e' or the full 'g_Entity[e]['obj']' off the top of my head*

you can probably prompt the AIGetEntityViewRange(g_Entity[e]['obj']) value though so you can easily check the default range

but how would you set the cone in the fpe or script? is there not a setting for this?
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
SoUlFaThEr
9
Years of Service
User Offline
Joined: 20th Jul 2015
Location:
Posted: 10th Aug 2015 20:23
the view cone is an entity property

I've seen nothing of it in the scripts nor in the fpe and somehow i dont think it even has a function yet. It would require some testing.
The only stupid questions are those that were never asked.
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 10th Aug 2015 21:08
Quote: "the view cone is an entity property"


That's because its coded in the script at a default level .....
Adjusting the properties less than the scripts default settings allows you to alter them
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM

Login to post a reply

Server time is: 2024-11-25 09:58:15
Your offset time is: 2024-11-25 09:58:15