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 / Strange entity behaviour. Entities disappearing before they should.

Author
Message
Sinister Spoon
15
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 9th Mar 2015 15:04
Ok so Imagine this.

Theres 8 balloons in a row before you, your aim is to shoot the strings, once severed the free balloon floats upwards never to be seen again.

At least thats the theory but fpsc seems intent on depriving me of this relatively simple mechanic.

So heres what happens, you hit the string. The Dynamic immobile balloon destroys itself using this script



This activates the hidden dynamic balloon at its location which is set to move upwards at a smooth defined pace with not collision and despawn itself about the ceiling out of player sight using the following script



This works perfectly for the first balloon, string is severed it floats up smoothly and disappears. Perfect.

So I pick up the entity, place it 7 more times, incrementing the name (ball1, ball2, ball3 etc) with the corresponding set up to the initial balloon. IE immobile balloon 1, spawns floaty balloon 1, immobile balloon 2, spawns floaty balloon two.

It all works perfectly except for the fact that every balloon after the first one, spawns in correctly, floats up a few inches then instantly disappears.

At first I thought maybe since they were all using the same script maybe the script was getting set at the destroy state after the first balloon then the following ones were instantly being spawned in at that state and just immediatley disappearing. But it cant be as the script is clearly going through the actions in prior states as evidenced by the small amount of movement up but they are just despawning way to quickly.

I've played around with with culling and cull modes but these seem to have very little effect on it, it disappears long before reaching the cull range at which it should disappear. Legacy or Dynamic.

Its really frustrating me now as the first one played perfectly and so did the last one till I started altering the scripts slightly.

Now only the first one plays correctly the rest just vanish almost instantly.

Any and all help would be greatly appreciated as I dont mind the instant disappear to much but the issue is it shows the player what SHOULD happen on the first one, so its clear on continuing through the other 8 balloons, to the player, that something isnt right.

NCMako Im looking at you here buddy! If I aint got an answer you usually do!

smoke em if you got em
Sinister Spoon
15
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 9th Mar 2015 15:42
Just a quick addition.

Out of curiosity I added an emit flash command to the line governing the upward motion of the entity, the flash plays for the correct about of time but the entity just disappears from view once a few inches up, or around half a second or so in real time.

So the script is functioning correctly just the entity is refusing to show properly.

What I dont understand is why it works on the FIRST one but not the subsequent ones

smoke em if you got em
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 9th Mar 2015 18:11
Sinister Spoon
I did something like this with tables and chairs. Since I don't know how you setup your variables I dropped them for this. Works
perfect for me using V1.20_1.14. Quick map and script files attached.(all stock) I didn't have a "ballon" so I used the scifi
"alien globe" (looks like a ballon..lol) Did not have to rename
each entity or script, just the dynamic ballon that float off.
(ballon1,ballon2,ballon3...ect) Look over my settings, main thing was to keep each ballon that float "always active"!

Adjust timing in script to your needs. Test this then add your
variables and "emit flash" command and take it from there.
best

My games never have bugs. They just develop random features..
Lots and lots of random features...

Attachments

Login to view attachments
Sinister Spoon
15
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 9th Mar 2015 18:28 Edited at: 9th Mar 2015 18:30
EPIC! I just KNEW somehow that YOU would have the answer!



Not yet tested it but it looks like exactly what I need!!! ^_^

One edit im gonna add is that mine worked perfectly when I was testing it like yours, in a large room (mine was a prefab large hangar) but in my actualy game the ceiling is one segment high, not 2 or more like in the test environments we seem to have both used so Im hopeful your test fpm will work as in the video but Im unsure what will happen when its built into the level. hmmmmm I shall investigate!

*runs away squealing like a happy Homer Simpson*

Edit: I've experimented with a lot of the stock media when learning about fpe's and textures, xfiles, meshes, etc and as a result only the floor and the X beams rendered in and the rest was missing however the scripts remain intact and thats what i need!!

smoke em if you got em
Sinister Spoon
15
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 9th Mar 2015 18:41 Edited at: 9th Mar 2015 19:05
OK Mako, same thing happens when I use your scripts

Im using v.120.18

The first one goes up slow and smooth and the others start to then just flash out of existence, I put a beep in the destroy line and sure enough they are floating up and beeping at the right moment so the entity isnt destroying itself prematurely, the script is working fine and I know theres nothing wrong with the entity as its the same entity with identical properties ( you know when you place an entity down in fpsc, then adjust the properties and pick it back up again, you place clones of the held entity whereever you click? then just right clicking and changing there names so that the right balloon is triggered cos I dont want to shoot balloon 1 and the 3rd one starts floating off instead)

The static ones arent renamed, just the name of the target entity.

So when the second balloon is shot, it spawns balloon2 which is placed where the actual static balloon 2 was (not static as in D/S just stationary)

Works fine when testing in a large open area, doesnt work properly when built into the level.

Im tempted to build a fake layer above the level and use a dynamic 'roof' set to nocollide. But that seems a lot of effort to fix a problem that really shouldnt be occuring.

One weird note is that if I give the moveup= a negative value, the entity goes smoothly and slowly downwards, it only seems to occur when moving upwards. Very strange indeed!

For now downards weirdly works for me, its basically the spirit leaving a deceased entity, so downwards is as good as upwards!

I would prefer upwards but for some reason probably due to legacy culling being active? it still hides itself from view after rising a certain distance, even the first entity is doing it now, leading me to believe its not a scripting,model, mesh or texture issue, but has something to do with fpsc itself.

Another note was that I added a step by step timer, decreasing the alpha fade as it went, weird thing was it would move up nice and smoothe, clearly going through the states fine, but ignored all of the decalphafade= commands, tried this using the set up from the disappear 2 fpi, and also by manually using setalphafade=100,90 etcat the respective states and none seemed to have any effect, the entity would disappear a few inches up but wouldnt destroy itself until the designated time. Almost as if the 'hide' command was being applied to it despite it not being present in the script, needless to say this doesnt happen in reverse. I merely put a - in front of the 1 of moveup=1, making it moveup=-1, and it worked PERFECTLY, albeit going downwards.

Clearly something is happening internally in the fpsc code that just doesnt like moving entities upwards smoothely or theres a culling issue or something I dont know.

But if it works fine going down I see no reason why there should be a problem going UP.

Its baffling.

smoke em if you got em
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 9th Mar 2015 19:55
Sinister Spoon
Quote: "(not static as in D/S just stationary)"

Yep, I know what you mean. Did you test with the map I gave you?
What your telling me does sound funny (moves smooth with neg. values) Did you lay out your room with "full" segments then removed
those not needed in the middle. I have had problems with "floating" objects (collision) hitting a ceiling that I removed, but seemed like it was still there? The map I gave you I made with a room segment and I laid out just the floor, walls then the ceiling individually. Being careful not to add full segments in the middle of the room. I will test both ways with build and get back with you.
best

My games never have bugs. They just develop random features..
Lots and lots of random features...
Sinister Spoon
15
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 9th Mar 2015 21:49
Well I think thats the Issue really.

Essentially they are my own segments, I converted the existing floor and wall .x files from ww2 into dae's, imported into sketchup, retextured, exported and used fpsc segment kit to create room segments so I could build the interior using premade segments as exporting entire levels as static entities proved troublesome.

Now heres the bit where it might be relevant, when I placed the walls and floor meshes into seg kit, it never calculated their visibility properly, this might be the culprit.

They built fine and work well enough for the game but dont work like properly visibility calculated segments do and with your mention of the ceiling removal issue I think we may have encountered the issue/fix for this problem.

So my initial assertion of building a two storey high room and adding an artificial ceiling via a dynamic entity would seem to be the obvious solution.

However on testing the built exe I like the smoothe floor sink sooooo much Im gonna go with that for the time being cos its really growing on me (instantly made the enemy deaths looks so much better!) But please if you find a fix tell me, Im going to run some similar tests and get back to you

sadly your map wont load properly as 90% of the stock assets used in it have been cannibalised over the course of my learning process, I was always that kid who took things apart to see how they ticked then sometimes failed to put them back together properly. That was one of the main factors in creating my own media, now the only thing I use from anywhere else is music

And the odd script tip

smoke em if you got em
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 10th Mar 2015 18:06
Sinister Spoon
Ok, I tried it with the "Chateau" prefab. Placed my "ballons",
added the scripts I used before, tested, worked perfectly.
Did a build, runs perfectly. Every "ballon" I shoot rises up
smoothly. Are your prefabs still intact? If so try one and see?

No collision from segments.

My games never have bugs. They just develop random features..
Lots and lots of random features...
Sinister Spoon
15
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 11th Mar 2015 13:11 Edited at: 11th Mar 2015 13:46
Yeah my prefabs are all still there, Thats how I always test, drop a large hanger, single light, player start, and the entites.

Works like a charm in there, works perfectly whenever there is at least 2 segments upwards unobstructed

If you have the celing only one layer high however, instead of the two in the prefab, the problem occurs.

Its got to be a culling or engine problem as the scripts etc work perfectly in the prefabs.

Another weird issue is that I have a section where the player picks up stuff using the right click after a specific item has been randomly selected by a master script.

The issue is that even though the entites are set to spawn at start=No. they are spawning at the start. the script is activating them when it should as theres a hud displayed when you pickobject which only displays once the item has been activated by the main scripts ifused field.

It was working perfectly till I moved the objects around a little, just picked them up and moved them, absolutely no changes to the scripts etc

I tried with stock media, same problem, took out the master script and had a stock triggerzone, stock playerwithin zone fpi and stock item, same problem, item spawns in at the start and just sits there with no physics till its triggered by the zone then it sits there, you cant immediately pick it up, you have to kick it around and sort of trigger the physics.

its set up correctly, was working minutes before, immobile=no, alwaysactive=yes, physics on=yes, spawn at start= no, default.fpi, stock ww2 radio, stock triggerzone, stock script, same problem.

Interesting part?

Loaded up a level that comes prior to this one where EVERYTHING is set through timed spawn triggers for at least 20-30 items. Works PERFECTLY.

Can fpm's become corrupt and cause issues?

Just incase I rebuilt the level, reworked all the scripts, checked and DOUBLE checked each and every entities property and STILL the problem occurs.

Its really disheartening as my game was SOOOOO close to being ready to post here and now it feels like Ive been dragged back to step 1 just cos FPSC decided it suddenly didnt want to work right.

Gonna uninstall, reinstall, update back to v.120.18 and see if that makes ANY difference

Edit:

On first glace It would appear I was right about fpm being corrupted, sure enough following reinstalling and moving all the assets back into the new install and applying the update, 3 of the four levels in the game so far load up just fine, the one giving me problem? Instant 'Fpm Corrupted'message and loads a blank level.

smoke em if you got em
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 11th Mar 2015 14:19
Sinister Spoon
Sounds like your narrowing down the causes with your last
statement.
Quote: "update back to v.120.18 "

Do remember, when you start a new project don't switch versions as the levels tend to become corrupt. Stick with same version till
your done.
best

My games never have bugs. They just develop random features..
Lots and lots of random features...
Sinister Spoon
15
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 16th Mar 2015 19:10
I got it sorted by reupdating and setting the physics of the entities to on, still havent fixed the float up properties with a single segment high but I altered my way of thinking and came up with a different approach which is very much more player intensive.

I been digging around in your old posts, any chance of getting that toon shader/post effect you were working on a while back?

Building the shading into the entities is working well but the lighting effects can make the plain colours look grubby, Im using the surreal.fx post effect at the moment to blur everything out a little better but that toon shader I saw mentioned is something I could really use, it seemed like you got the static issues fixed but I could never find a download for.

Obviously a huge amount of credit and thanks would be awarded in response along with a credit on the opening splash kinda like the 'powered by fpsc' thing I have on there.

smoke em if you got em
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 16th Mar 2015 19:48
Sinister Spoon
Quote: "I got it sorted "

Great! As for the old cartoon shaders I'll dig around and see what I still have. But I do remember (I think it was Section812) released some shaders, one was a very good full screen "toon" shader. I may be mistaken though?
best

My games never have bugs. They just develop random features..
Lots and lots of random features...
Sinister Spoon
15
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 16th Mar 2015 20:12 Edited at: 16th Mar 2015 20:16
Thanks bro. I found the original zip you posted in the older thread and gonna give em a whirl.

What I really want is a modified post effect, the surreal one does a really good job, All i really need is someone with some .fx know how to tweak the surreal post effect to make the colours pop more, my texture maps are all bright blocky colours, and my models have the thick black edges textured in, so simply making those pop, maybe giving them a greater blur radius than the rest of the fx and I think it be probably good to go.

I been digging around of the forum for around 2 hours now and my gf is getting annoyed that this is taking up my life, she just doesnt understand!!!

lol anyway thanks , on a side not would you be ok testing a small build of a portion of my game at some point? I dont want to post the files publicly as if it got out in its current format It would do the game more harm than good but I think I might have a good game here at least my friends keep telling me.

Thanks for your help though u been awesome

smoke em if you got em
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 17th Mar 2015 16:59
Sinister Spoon
Yes, I'd be happy to test and give feed-back
best

My games never have bugs. They just develop random features..
Lots and lots of random features...

Login to post a reply

Server time is: 2024-03-29 14:12:55
Your offset time is: 2024-03-29 14:12:55