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 / Platforms - experienced scripters like a challenge of importance to FPSC?

Author
Message
uman
Retired Moderator
19
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 30th Mar 2006 14:06 Edited at: 30th Mar 2006 14:07
Well perhaps not so much of a challege for someone who knows what they are doing.

Help is needed with this from knowledgeable experienced scripters with a good understanding of the FPSC scripting language and how it works.

As I my lifts are rendered unusable due to the serious lagg issue I have been looking at the platform entity to see what can be done with that as a method of transporting the player.

I set up a platform entity to follow a path. The platform follows an upwards gradient path though that should not matter. I want precise control of this as follows - it is still when the player encounters it. A switch is needed to activate it. (switch3.fpi)

Player hits switch and the platform waits at still until player gets on it then it moves to its destination at which time it stops at the destination if the player gets off and waits for the player to get back on and then the lift goes back to the start and so on.

So far so good I have that.

Additionally - think about it the platform needs to be further controllable so that if say the player falls of - or jumps off - the switch/platform needs to reset itself so that it can be recalled to one of its path points - otherwsie the player could have no way of getting back on it - it being stopped at one side of the path. He could get stranded not able to get to the destination and thus become stuck in game progression.

Whats needed is a two way switch/avtivation so the platform can be called, stopped or started from any switch loacation at either end.

I have that too.

So whats the problem you may ask?

Well my platform works perfectly in my test level - something I have referred too before - test levels you cant trust the assessment. Its not a real scenario.

Works perfectly in test level - now move to my actual level and the problem shows.

The platform is subject to the same problem as my lifts and is affected by the serious lagg issue cutting fps by half. This is what happens in FPSC when levels are large and complex.

However there is with this path platform as opposed to lift platforms an indication as to the reason the platform entities are affected in this way.

The lagg only appears after the player activates it, stands on it and it moves to the destination and the player gets off - its at that point that the lagg appears. Thereafter the lagg exists permanently. This is the opposite to the lift platforms where the lagg only appears when the player is standing on it.

Fortunately there are some pointers here as to what causes the lagg as additionally in the case of my path platform if I go back to the switch and throw the switch again - the lagg immediately dissapears. If I change the path platform entities script file so that it no longer stops at a destination point after the player has used it once so that it then continues to move back and forth along the path permanently - again the lagg dissapears.

The platform can therefore be stopped until activation but thereafter not or the lagg shows up.

Now dont laugh - you all know I stink at scripting but have attached the path platform script file here.

An experienced scripter may easily be able to see in this script what errors if any might be reason for cause of the serious lagg issue attached to platform entities and correct it. If so then that may also isolate the same problem (opposite player relationship as said) with normal lift scripts if the fault is in the scripts.

I know my script is rubbish but it works. If anyone can spot the reason for the lagg and recon they can fix it - please post it back so that I can test out and confirm the solution.

By the way anyone who can find a use for this script can have it - I give it to the community - but as with true lifts its not going to be of much use if flawed with the serious lagg issue.

Hopefully someone can find within this script and from the info above a permanent fix to the platform entity lagg issue for the benefit of all.

More importantly there are some pointers here and possibly a way of understanding the reason for the whole serious lagg issue inside FPSC. That may help anyone working with the source or even TGC to fix the serious lagg issue inside FPSC and that would be something to seriously make finding a solution to this worthwhile.

Thank you.

Attachments

Login to view attachments
brummel
18
Years of Service
User Offline
Joined: 26th Nov 2005
Location: Sweden
Posted: 30th Mar 2006 16:09 Edited at: 30th Mar 2006 16:26
I saw that you put the ',' where you should put ':'.

It should be like this:


I think that is whats causing the lag but im not sure.

Also I see that norotate=x isnt listed in the manual either...come on TCG, list all commands!
someonerules
18
Years of Service
User Offline
Joined: 12th Oct 2005
Location: In your closet.
Posted: 31st Mar 2006 05:26
Wow...nice essay lol

I hate sigs
brummel
18
Years of Service
User Offline
Joined: 26th Nov 2005
Location: Sweden
Posted: 31st Mar 2006 12:25
Well I think that is whats causing the lag, Conjured told me something about that.
uman
Retired Moderator
19
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 31st Mar 2006 15:10
Changing the script that way makes no difference to the lagg issue.

I can remove the lagg issue myslef by amending the script so that when the player steps off the platform for the first time the waypoint stop command is deactivated - thats just means the platform will continue to move forward and resverse along the path continually - which is OK as it provides the player with a necessary means of transport from A to B - but its not what I want. Whats need ideally as said is to have the platform stop at each end of the path - to be activated again if either the player steps on it - or if he calls the platform via the switch activation - this because thats the way it should be for best and realistic gameplay.

Its interesting though that the lagg can be removed and that it seems the second waypoint stop command following the player getting off the platform for the first time is what causes it.

I have spent many days trying to break this problem - in a script which seems to be be relatively simple - but obviously not so. I have tried every permutation of the script I can think of to no avail.

Les Horribres
18
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 1st Apr 2006 02:43
:waypointstate=3:waypointnext
:waypointstate=5,activated=1:waypointreverse

:state=0:waypointstop,state=1
:state=1,activated=1,plrdistwithin=40:activateifused=1,norotate=1,waypointstart,state=2
:state=2,activated=1,plrdistfurther=40:waypointstop,state=1,activate=0

yes, I killed what you wanted, but I don't quite understand what you want.

First off, your "lift" is constantly moving, I don't know why, but it is. That is what
:waypointstate=0:animate=2,waypointstart
does.

:waypointstate=5:animate=2,waypointreverse
means that when it reachs the end of the line, it will reverse and keep moving yet again.... real good.

But strangest of all to me is that you are activating an unknown object... at strange points... I don't know what is going on in THAT script, so I cut it out the duplicate.

you also have an infinite loop going on between state=2 and state=3. I eliminated that loop, and also stoped the lift.

Mosillivo: Fires Rage, Earth Rumble, Evil Reigns, Cities Tumble
Join the NJL: The War Has Begun, Which Side Are You On?
Nunticaelitusphobic (Scared of Internet)
uman
Retired Moderator
19
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 1st Apr 2006 05:19
Mosillivo,

Thanks for that I will test out wthat script and see what it does.

First off its not a lift but a platform.

Now what I want is

1. A platform that follows a two point path.

2. Is at stop when player encounters it.

3. Is activated via a switch (OR ONE EACH END OF PATH) so the player can call it to whichever side of the path he is located.

4. If the player gets on the lift it moves to the opposite end of the path (either direction) and stops moving when he gets off.

Simply put - Cant see I can say it any simpler than this :

I want a platform that at game run is at a stop(deactivated) to be able to move along a path from A to B thereafter under two conditions only :.

When the player stands on it or If called to the player path point position whichever end of the path he is at - so that he can stand on it

At all other times the platform must be at stop.

Thanks for your assistance.
uman
Retired Moderator
19
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 1st Apr 2006 05:57
Mosillivo,

Checked out your script straight away.

Its almost there but does not quite work as needed.

The platform cannot be called to the player path point position, so if a player jumps off or falls off the platform when its travelling along its path then it freezes in mid air and the player has no way of getting back on.

Basically it activates itself only once and I need to have the platform re-set itself each time so that it can be recalled to a path end point so that the player can get back on again.

My script does that and stops at each end if the player gets off and moves again when he gets back on but as said in the posts above it seems to be erronous as it causes lagg and cuts the fps to half so I have to amend it to let the platform move constantly once the initial switch activation takes place and the player gets off the first time. That fixes the lagg but then the platform wont stop at each end.

I will try amending your script.

Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 1st Apr 2006 07:34 Edited at: 1st Apr 2006 10:20
Forget about the waypoints if they cause the lag.

This should work if they jump off of it in time.
It doesn't use any triggers.




Don't forget to visit Conjured Entertainment
uman
Retired Moderator
19
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 1st Apr 2006 20:17 Edited at: 1st Apr 2006 20:34
Conjured Entertainment,

Thanks for that.

If you read all my my posts above as I was trying to achieve a completely flexible and controllable system for a platform and in this particular instance in game have the platform move not only from A to B but additionally over a gradient - How would your script accomodate such situations where a platform has to move upwards or downwards through various FPSC height levels on its journey from A to B?

It cant as it has no marker poinrt to aim for.

In all things in FPSC giving any single entity a wide variety of options for its behaviour is very difficult isnt it.

Its not waypoints that cause the lagg but trying to get an entity script to have the entity do something inside a game that requires code for a function that FPSC engine does not support correctly by default.

Basically a script that is erronous in some way,contradictory or commands an entity to do two things at once which are at odds with each other technically - it cant do that and so causes the engine to go into a spiral in which it tries to do math endlessly - a bit like a constant loop it cant get out of. Thats my opinion anyway.

Its this erronous behaviour which is inherent in any case by default and which causes the serious lagg issue inside FPSC as known to and described by Lee - errors in the FPSC engine code itself which he could not isolate or fully understand.

The Physics engine, AI think time code - who knows where there are internal errors. If Lee dont I am sure I dont but I know its effects.

Platform entities suffer from it badly so one has to find a solution or if you have complex levels you can add both lift and standard platforms to items lost or unavailable to the game designer.

Login to post a reply

Server time is: 2024-03-29 12:45:52
Your offset time is: 2024-03-29 12:45:52