Jump to content


darkatra

Member Since 10 Dec 2015
Offline Last Active Mar 13 2024 02:13 AM

Topics I've Started

One Ring Pickup Mechanic

02 October 2023 - 07:29 PM

Hello,

 

i'm currently trying to alter the ring hero system a bit. I want to allow certain heroes to pickup the ring on their own, e.g. granting them new special powers when they pickup the TheDroppedRing entity.

So far i managed to successfully grant upgrades whenever a hero picks up the one ring (via lua).

 

scriptevents.xml:

<ObjectStatusEvent Name="OnPickupRing">
    <Conditions>+HOLDING_THE_RING</Conditions>
</ObjectStatusEvent>

...

<EventList Name="MyFancyFunctions" Inherit="BaseScriptFunctions">
    <EventHandler EventName="OnPickupRing" ScriptFunctionName="OnRingPickup" DebugSingleStep="false"/>
</EventList>

scripts.lua:

function OnRingPickup(self)
    ObjectGrantUpgrade(self, "Upgrade_MyFancyUpgrade")
end

The only issue with this approach is that the one ring FX, as seen in the screenshot below, is not removed.

bfme-ringhero-pickup-mechanic.jpg

 

The question is: is it possible to somehow destory (or maybe just hide) the attached TheDroppedRing entity?