Bumbleson on 1/5/2005 at 19:37
The loot glint is an emitter (FX -> Emitter -> LootGlimmer) attached to the Loot parent archetype (WorldObj -> InventoryObject -> Loot) with a RigidAttachment link and thus inherited by all of its children. The emitter can be controlled with the property Global -> EmitterSpawnState. To switch it on and off based on player proximity, do the following:
1) Add Global/EmitterSpawnState to FX/Emitter/LootGlimmer and set it to EDS_NoNewParticles (no loot glint by default)
2) Add these two scripts to the LootGlimmer archetype:
Inline Image:
http://img91.echo.cx/img91/6622/lootglintscript3bx.jpg 100 unreal units is a bit less than the normal frobbing distance (128 units). Adjust this to your liking. One flaw of these scripts is that all the "query" conditions don't fire by themselves, but only in conjunction with another condition, so I had to insert "fire every 2 game seconds", which might slow down gameplay considerably in a complex map with many loot items. I hope somebody will find a more suitable condition we can use as a continuously recurring trigger event here.
New Horizon on 1/5/2005 at 19:40
Quote Posted by Bumbleson
The loot glint is an emitter (FX -> Emitter -> LootGlimmer) attached to the Loot parent archetype (WorldObj -> InventoryObject -> Loot) with a RigidAttachment link and thus inherited by all of its children. The emitter can be controlled with the property Global -> EmitterSpawnState. To switch it on and off based on player proximity, do the following:
1) Add Global/EmitterSpawnState to FX/Emitter/LootGlimmer and set it to EDS_NoNewParticles
2) Add these two scripts to the LootGlimmer archetype:
(
http://img91.echo.cx/img91/6622/lootglintscript3bx.jpg)
100 unreal units is a bit less than the normal frobbing distance (128 units). Adjust this to your liking. One flaw of these scripts is that all the "query" conditions don't fire by themselves, but only in conjunction with another condition, so I had to insert "fire every 2 game seconds", which might slow down gameplay considerably in a complex map with many loot items. I hope somebody will find a more suitable condition we can use as a continuously recurring trigger event here.
Bumbleson, you are a scripting genious. I would NEVER have figured that out on my own. :)
Thanks.
Bumbleson on 1/5/2005 at 19:46
To be honest, I wouldn't have found this property myself, but there are two scripts in the "Test" section which use it to enable and disable emitters on player frobs.
P.S.: I simply LOVE to solve problems with scripting. ;) If only the scripting system wouldn't be so limited. :erg:
New Horizon on 1/5/2005 at 19:48
Quote Posted by Bumbleson
To be honest, I wouldn't have found this property myself, but there are two scripts in the "Test" section which use it to enable and disable emitters on player frobs.
Ahhh, interesting. I had looked through that section for something else but hadn't taken notice of that at the time. Great find. :)
Works like a charm by the way. :) I'll be giving you full credit in my little Minimalist update.
SneaksieDave on 1/5/2005 at 23:58
That's.. interesting. :erg:
New Horizon on 2/5/2005 at 00:43
Quote Posted by SneaksieDave
That's.. interesting. :erg:
He deserves credit for working out the script Sneaksie. :) It's achieved a bit differently than how you proposed but you'll be listed for the concept.
SneaksieDave on 2/5/2005 at 02:17
I never said otherwise. I'm glad it works, and am interested to see if there's any performance issue.
New Horizon on 2/5/2005 at 12:08
Quote Posted by SneaksieDave
I never said otherwise. I'm glad it works, and am interested to see if there's any performance issue.
You're smiley looked perturbed. ;)
SubJeff on 2/5/2005 at 12:19
We really should have a thread that just lists these types of tweaks with % complete and links to the info.
A commone theme is returning the gameplay to the T1 and 2 style/function what with minimising loot glint, adding water and rope arrows etc.
New Horizon on 2/5/2005 at 12:25
Quote Posted by Subjective Effect
We really should have a thread that just lists these types of tweaks with % complete and links to the info.
A commone theme is returning the gameplay to the T1 and 2 style/function what with minimising loot glint, adding water and rope arrows etc.
Tweaking it up a little bit on this end as well. I had to increase the distance to equal the frob distance since some items were placed beyond the range to trigger the loot glimmer. It's a shame this wasn't implimented in the actual game.