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 / HUD appear script assigned to static object?

Author
Message
PixelF
11
Years of Service
User Offline
Joined: 30th Oct 2012
Location: United States
Posted: 29th Aug 2013 02:26
Hi,

I have this script


It works great! But what I want to do is have it assign to static entities instead of dynamic. I say this because dynamic entities tend to fall through floors, fly across rooms, and just flat out disappear.

I have no idea on how to make it work on static objects. I was hoping someone can help me?

www.pixeleater.me
Register now to become a reasonably intelligent human being!
Burger
11
Years of Service
User Offline
Joined: 22nd Jun 2012
Location: New Zealand
Posted: 29th Aug 2013 02:51
Here's a trick I often used. Have the static object you want in the place you want it. Now duplicate the object (or anything really). Make this duplicate dynamic, set its collision and bullet collision to off, make it immobile and add that script. This gives the appearance a static object can be interacted with, where as you're actually interacting with an invisible dynamic entity on that exact spot.

- An Instinctive Fear IndieDB page, download the demo today!
Corno_1
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 29th Aug 2013 12:53
here is a very simple trick:

make the entity dynamic and set it immobile to yes. Thats how I do it and it works! No immobile dynamic entity fall through the floor!!

Hope this helps.

Burgers solution works but waste ressources

Make this forum to something a little bit better and release more stuff. So we can push the Request/NoobHelp threads aside.
PixelF
11
Years of Service
User Offline
Joined: 30th Oct 2012
Location: United States
Posted: 30th Aug 2013 02:02
It works great, thanks for the tips Burger and Corno_1

www.pixeleater.me
Register now to become a reasonably intelligent human being!
Burger
11
Years of Service
User Offline
Joined: 22nd Jun 2012
Location: New Zealand
Posted: 31st Aug 2013 01:10
My solution doesn't waste resources, I think its resources well spent. This is mainly because static objects look better from lightmapping (for me at least). And adding a dynamic entity with a script with a 1x1 invisible texture isn't a particularly demanding use of resources. However, this is just how I do it in order to try and keep and more visually consistent world.

Hope this helps

- An Instinctive Fear IndieDB page, download the demo today!
Corno_1
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 31st Aug 2013 13:42 Edited at: 31st Aug 2013 13:43
@burger I explain what I mean:

If you have 10 dynamic entities and then 10 static enties. You should understand that this are double polies as if you just have the immobile dynamic entities. Also the problem of falling thorugh the floor is then not solved.

This is no offence.

Make this forum to something a little bit better and release more stuff. So we can push the Request/NoobHelp threads aside.
Disturbing 13
19
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 2nd Sep 2013 04:54
Here is a better way if you want the nice look of a static entity but the function of a non moving dynamic one- Make a 1 poly model for the dynamic entity and place it within the static one. This way both Corno_1 and Burger's solution works without wasting resources. You can have 10 static nice looking objects and 10 dynamic 1 poly objects that are set to immobile inside of the static objects and it will still run your scripts. All 10 of the dynamic objects would only add 10 polys to the map.

Model pack 66-99 high quality items...cheap!!
"Who loves ya baby!"
BlackFox
FPSC Master
15
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 5th Sep 2013 01:23
Quote: "It works great! But what I want to do is have it assign to static entities instead of dynamic. I say this because dynamic entities tend to fall through floors, fly across rooms, and just flat out disappear.

I have no idea on how to make it work on static objects. I was hoping someone can help me? "


Regardless of the solutions people use, there is one thing that gets missed a lot. You cannot assign scripts to "do something" to a static object. The object that will control and run said script must be dynamic or nothing will happen. I've used methods such as what D13 has described- it can be real small (small enough to hide, but large enough to see and move in editor. The nice thing with his approach is it can be tucked into walls, floors, light switches, etc. And adding an invisible (black) texture to it so at least you can see it in editor but not in game.


There's no problem that can't be solved without applying a little scripting.
PixelF
11
Years of Service
User Offline
Joined: 30th Oct 2012
Location: United States
Posted: 8th Sep 2013 23:06
I have set the entity to dynamic and immobile. It works perfectly in test game but when I build a game out of it, the entity has vanished.

www.pixeleater.me
Register now to become a reasonably intelligent human being!

Login to post a reply

Server time is: 2024-04-20 01:20:00
Your offset time is: 2024-04-20 01:20:00