Feature Creep / Automatic Billboarded Objects

Author
Message
tomjscott
User Banned
Posted: 2nd Jun 2014 18:33
A way to make an object a true billboard so that it always faces the camera no matter where you look. This would be great for stuff like Henry's billboard trees and other similar things.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.007
tommy8
GameGuru TGC Backer
16
Years of Service
User Offline
Joined: 24th Dec 2007
Location: Northern Ireland
Posted: 2nd Jun 2014 21:59
I'm not sure what you mean, but what we do need is for animated .gif or .wav files to be supported as textures so we could have working TV and video screens.
PM
The Tall Man
10
Years of Service
User Offline
Joined: 24th May 2014
Location: Earth
Posted: 2nd Jun 2014 22:04 Edited at: 2nd Jun 2014 22:05
There is the LUA command:

Quote: "RotateToPlayer(entity index) - rotate the specified entity to face the player"




...from the list in May's newsletter here:

http://fpscreator.thegamecreators.com/newsletter/22-05-2014/
PM
tomjscott
User Banned
Posted: 2nd Jun 2014 22:18
Quote: "There is the LUA command:
Quote: "RotateToPlayer(entity index) - rotate the specified entity to face the player"

...from the list in May's newsletter here:
http://fpscreator.thegamecreators.com/newsletter/22-05-2014/"


Yep, that would be a hackish alternative if it worked, but currently that command doesn't work on ordinary entities. It only works on enemy characters at the moment. They know about it and will get it fixed. Still, a true billboard would be better because you wouldn't have to add a script to every object that needed it. You'd simply check off a flag in the object's properties or set a variable in the fpe file.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.007
The Tall Man
10
Years of Service
User Offline
Joined: 24th May 2014
Location: Earth
Posted: 2nd Jun 2014 23:20
Along the same lines from a slightly different topic (coming from smallg's occlusion script), it would be nice to be able to set an entity ID in its properties, and then you could call it by ID in the LUA. If multiple objects had the same ID, they would be treated as a group.

Although I'm not using the system here. I'm just basing this on what I've read others saying.
PM
tomjscott
User Banned
Posted: 3rd Jun 2014 00:42 Edited at: 3rd Jun 2014 00:43
Quote: "it would be nice to be able to set an entity ID in its properties, and then you could call it by ID in the LUA."




Yes, this would be nice. You can achieve this now through scripting if you want. It's hackish like the SetRotateToPlayer solution for billboards (once that works), but you can access entities by their id using custom scripts. Simply add their id to a global variable or global array when they get initialized. You can group them any way you want and then access them from anywhere.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.007
The Tall Man
10
Years of Service
User Offline
Joined: 24th May 2014
Location: Earth
Posted: 3rd Jun 2014 01:19 Edited at: 3rd Jun 2014 01:28
Ah good! Smallg and others might find that useful for their occlusion scripts. I'll post a link there to what you said.



Here's his occlusion script. He would have done it for specific entities, but didn't know how to specify them. So he did a proximity calculation instead. Morphtactic quadrupled his frame rate with it.

http://fpscrforum.thegamecreators.com/?m=forum_view&t=207801&b=2&msg=2488592#m2488592
PM
tomjscott
User Banned
Posted: 3rd Jun 2014 01:33
Yeah, there is actually a little known function called init that you can use that is called once when the level loads and the entity is created. So, in addition to the main function, you can have the init function and use that to store your entity id in some global place.



I was planning to use this myself for creating special features for a group of entities of a certain type. I won't say how exactly since that would be spoilers for my contest entry.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.007

Login to post a reply

Server time is: 2024-11-21 13:45:41
Your offset time is: 2024-11-21 13:45:41