Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Flying Entities, Pathfinding and AI Activation

Author
Message
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 8th Mar 2006 18:11
Thats a complex lot for a title I know. Complex subject....

I have a technical question which needs a confirmation before I can ascertain whether or not I have and issue that needs addressing by TGC.

I do not need try this type replies as I doubt they will help - I have tried all available options I know of to find a way around a problem and there is as far as I am aware not one. If anyone has a specific solution known to work or actually knows what will overcome the problem or provide a workaround well thats another matter as its something I have obviously not yet done.

I have been working for some time with flying entities and have exhaustively tested out FPSC possibilities.

Firstly there is some good news for users even if FPSC does not in future offer any further default support for flying entities.

There is already within limits a reasonable capability to include such entities which will provide a number of options for differing flying entities, but getting them to work or work correctly is not easy and the results are far from perfect - but they are very useful for certain scenarios nevertheless.

Now getting to the exact point of the thread,

I have a flying entity - in this case a helicopter but it could be anything. Within certain parameters it works perfectly. It is animated so the rotor blades rotate - its plays its soundfile - it flys in the air at any height required set to follow a path. It flys independantly without anything holding it in the air. In short it does eveything it should do correctly and perfectly......

Unfortuneately being an entity it is subject to limitations inbuilt so it seems within the engine - one of these resrictions it seems is what my question is about.

The perfection of its behaviour is affected and interupted by player proximity. So within a specific range dictated it seems by the engine it performs perfectly and will do so indefinately, however if the player moves outside of that specific engine determined range the helicopter ceases to animate or move along the path and effectively is forced to freeze (deactivate) by the engine. If the player moves back within range it activates again.

I am presuming that this forced deativation is one which the engine applies to all dynamic entities beyond a certain range to conserve engine processing reserves - My qusestion is that assumption correct?

If so this is another FPSC restriction which needs if not removing - then certainly given back to the user for determination by them.

I am aware of course that an entity has in its physics properties settings a one for "Always Active" and this may overide the engine deactivation of entities which if so would normally be enough in itself.

The problem with this setting in this case is that would require Physics to be set to On - which cannot be the case if you want an object to fly in the air unaided except for a path to follow and script file to keep it up there as it will just fall to the nearest ground plane if you set the entity in its properties to Physics = On and Always Activate = Yes.

A bit of a dog chasing its tail dilemma.

Whats needed is an option for Physics to be set to No and Always Active to be set to Yes - which its seems is not allowed?

Thats the dilemma and anyone has a suggestion to accomplish this it would be much appreciated if you could comment - otherwise its a call to TGC.

Given a workaround this if TGC dont impliment flying objects then it would be very helpful for users to find a fix for this.

Given this enforced deactivation range - which is just too close for comfort to make entities like helicopters objects associated with outdoor levels really flexible as they cant manouvre to many parts of the level and continually freeze when the player may well be able to see them at a distance and in such an elevated position.

If you think about the distances involved and the trajectory or angle - if an enity is say at level 15 and the player at level 5 then the direct line or distance between them even if the player is directly underneath is already 1000 FPSC units - the restriction means that the distance between the player and entity cannot exceed more than around one third of the level or the entity will freeze up. You cant have a flying entity one side of the level and the player the other.

BULLSHOCK 2
Retired Moderator
19
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 8th Mar 2006 18:20 Edited at: 8th Mar 2006 18:21
what ive done to enable my flying alien ship is placed ground segments with a transparent texture to the upper levels in my level and placed way points. although the waypoint turns are a little stiff, the entity (which i made a charecter) follows the path perfectly and indefinatly.

They have never freezed on me. do you have a range that the entity seems to deactivate?

anyway, if the player doesnt have to come in contact with it, then i recomend this method, because it works quite well.

uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 8th Mar 2006 19:35 Edited at: 8th Mar 2006 19:47
I understand that set-up. I could certainly have gone for that option but if possible want a better one which is nearer to true flying objects with greater flexibility - which I have.

Your method described is not a flying object as such but one which effectively walks over a surface albeit invisible. Mine does not - it has nothing underneath it to hold it up in the air and I dont want or need anything there to hold it up or fly around correctly which it does as said - but it is range dependant for some reason.

I presume that adding anything even invisible objects below a flying object adds extra polys which are not needed in FPSC levels and restricts the movement vertically up and down. I dont have those problems.

My entity deativates at around one third distance of the 40 x 40 world size so you can work it out for yourself. Though I dont have an exact distance which is difficult to access given the objects in the relative distance and high in the air.

I have no range settings in the entity script - setting any in relation to the player in any case makes no difference as the enity ignores them and still deactivates beyond an unspecified range.

And by the way yes entities tend to not turn the curves on path points smoothly as theres no smoothing, easing or interpolation support for paths and path points internallly inside the engine - apparently?

As a matter of interest can your player be at one side extremeity of the map and the flying entity be at the very opposite extremeity so that you can see it and still have it activate with you?

If so maybe my problem may be related to the fact that theres no ground directly underneath it or some other unknown reason - though I have tried every combination of physical and script set up I can think of. It may also be model related as having some relation to how its constructed - its size or complexity and where its centre axis point is located in model editor and so on - with FPSC who knows?

I have already spent weeks working on it and still not quite given up yet - theres always the floor option I know as a last resort.

Thanks for your help.

uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 13th Mar 2006 02:08
Just a quick update to this :

Lee has confirmed that by default entities should deactivate themselves when the player is beyond a specified distance from them - effectively this should be able to be overiden by the user by setting an entities Always Active flag to Yes in the entities properties dialogue box in editor.

In practice I am not sure any of this works as it should or effectively at all.

It does not with me so its going in the bug reports section and in the features request.

Login to post a reply

Server time is: 2024-11-22 03:05:19
Your offset time is: 2024-11-22 03:05:19