ravage 9 Posted September 18, 2015 i added these scripts just for testing: in scriptevents.xml <EventList Name="GDIPredatorFunctions" Inherit="BaseScriptFunctions"> <EventHandler EventName="OnCreated" ScriptFunctionName="OnGDIPredatorCreated" DebugSingleStep="false"/><EventHandler EventName="DamageIncoming" ScriptFunctionName="GDIPredatorUsingDefensePower" DebugSingleStep="false"/> </EventList> in scripts.lua function GDIPredatorUsingDefensePower(self, other, delay, amount) if tonumber(amount) >= 1 then ExecuteAction("NAMED_KILL", self); testing only LOL endend but when my Predators and the AI's attacking each other, nothing happens. are these scripts still working? Share this post Link to post
Egozi44 28 Posted September 19, 2015 I'm not expert in thsee matter but from my tests with other BFME stuff, they usually didn't worked because they were removed You better wait for expert reply though just to be sure Share this post Link to post
Lauren 78 Posted September 19, 2015 If you load a game for testing where the predator is already built before creating the script it will not fire. Only newly created units use all scripts. Share this post Link to post
ravage 9 Posted September 19, 2015 If you load a game for testing where the predator is already built before creating the script it will not fire. Only newly created units use all scripts. of course i'm testing it in Skirmish games with newly built units. other scripts like ModelConditionEvent working for my predators. Share this post Link to post
Egozi44 28 Posted September 22, 2015 Btw I curious, what that script suppose to do? You may be able to make similar stuff with other means Share this post Link to post
Stygs 25 Posted September 22, 2015 Judging by the name, it would detect if the unit is about to be hit and trigger an effect if the amount is over an certain threshold. Share this post Link to post
Ravendark 46 Posted September 22, 2015 (edited) it was used in bfme by gandalf to do a shield iirc: function GandalfConsiderUsingDefensePower(self, other, delay, amount) -- Put up the shield if a big attack is coming and we have time to block it if tonumber(delay) > 0.5 then if tonumber(amount) >= 220 then ObjectDoSpecialPower(self, "SpecialPowerShieldBubble_SEE") return end end -- if tonumber(ObjectCountNearbyEnemies(self, 50)) >= 10 then -- ObjectDoSpecialPower(self, "SpecialAbilityWizardBlast") -- return -- end -- -- Or, if we are being hit and there are alot of guys arround, do our cool pushback power -- if tonumber(ObjectCountNearbyEnemies(self, 50)) >= 4 then -- ObjectDoSpecialPower(self, "SpecialPowerTelekeneticPush") -- return -- end end <EventList Name="GandalfFunctions" Inherit="BaseScriptFunctions"> <EventHandler EventName="DamageIncoming" ScriptFunctionName="GandalfConsiderUsingDefensePower" DebugSingleStep="false"/> <EventHandler EventName="UsingSpecialOne" ScriptFunctionName="GandalfTriggerWizardBlast" DebugSingleStep="false"/> </EventList> <EventList Name="GandalfFunctions_SEE" Inherit="BaseHeroFunctions"> <EventHandler EventName="DamageIncoming" ScriptFunctionName="GandalfConsiderUsingDefensePower" DebugSingleStep="false"/> <EventHandler EventName="UsingSpecialOne" ScriptFunctionName="GandalfTriggerWizardBlast" DebugSingleStep="false"/> <!-- <EventHandler EventName="ReallyDamaged" ScriptFunctionName="GandalfTriggerDefensePower_SEE" DebugSingleStep="false"/> --> </EventList> A while a go i came across this bfme section aswell and thought on how to use this as a auto ability for tanks/apc to deploy smoke. I never did anything with it tho....would be nice to know if this actually still works else ObjectCountNearbyEnemies might be a go to instead of the damage monitoring. Edited September 22, 2015 by Ravendark Share this post Link to post
Egozi44 28 Posted September 22, 2015 Umm seem interesting Wonder if someone will be able to make out something similar that work with KW and TW Thanks for the info Share this post Link to post
ravage 9 Posted September 22, 2015 it was used in bfme by gandalf to do a shield iirc: function GandalfConsiderUsingDefensePower(self, other, delay, amount) -- Put up the shield if a big attack is coming and we have time to block it if tonumber(delay) > 0.5 then if tonumber(amount) >= 220 then ObjectDoSpecialPower(self, "SpecialPowerShieldBubble_SEE") return end end -- if tonumber(ObjectCountNearbyEnemies(self, 50)) >= 10 then -- ObjectDoSpecialPower(self, "SpecialAbilityWizardBlast") -- return -- end -- -- Or, if we are being hit and there are alot of guys arround, do our cool pushback power -- if tonumber(ObjectCountNearbyEnemies(self, 50)) >= 4 then -- ObjectDoSpecialPower(self, "SpecialPowerTelekeneticPush") -- return -- end end <EventList Name="GandalfFunctions" Inherit="BaseScriptFunctions"> <EventHandler EventName="DamageIncoming" ScriptFunctionName="GandalfConsiderUsingDefensePower" DebugSingleStep="false"/> <EventHandler EventName="UsingSpecialOne" ScriptFunctionName="GandalfTriggerWizardBlast" DebugSingleStep="false"/> </EventList> <EventList Name="GandalfFunctions_SEE" Inherit="BaseHeroFunctions"> <EventHandler EventName="DamageIncoming" ScriptFunctionName="GandalfConsiderUsingDefensePower" DebugSingleStep="false"/> <EventHandler EventName="UsingSpecialOne" ScriptFunctionName="GandalfTriggerWizardBlast" DebugSingleStep="false"/> <!-- <EventHandler EventName="ReallyDamaged" ScriptFunctionName="GandalfTriggerDefensePower_SEE" DebugSingleStep="false"/> --> </EventList> A while a go i came across this bfme section aswell and thought on how to use this as a auto ability for tanks/apc to deploy smoke. I never did anything with it tho....would be nice to know if this actually still works else ObjectCountNearbyEnemies might be a go to instead of the damage monitoring. the good news: ObjectCountNearbyEnemies still working, while with ModelConditionEvent and ObjectStatusEvent. the bad news? it count Structures so your tanks may auto deploy smoke grenades near a harmless powerplant... Share this post Link to post
Egozi44 28 Posted September 23, 2015 Well that bad, we need to inform the "Don't harm the power plants" association and hope they will do something about these beasts Just joking Share this post Link to post
Ravendark 46 Posted September 23, 2015 the good news: ObjectCountNearbyEnemies still working, while with ModelConditionEvent and ObjectStatusEvent. the bad news? it count Structures so your tanks may auto deploy smoke grenades near a harmless powerplant... You haven't seen my powerplants, full of railguns, PD lasers, homing cluster missiles and scrin shields, they can hover, fly,drive and swim at the same time, bring dead units to life and female troopers get insta pregnant with commando lvl babies. I might nerf their ability to generate power tho for balance reasons. Back on topic tho...have you tried your script with anything else then the kill self function? Could be that is the problem. I've had issues with kill self in the past (altho that might've been unrelated and part of my crappy lua coding itself) Share this post Link to post
ravage 9 Posted September 23, 2015 You haven't seen my powerplants, full of railguns, PD lasers, homing cluster missiles and scrin shields, they can hover, fly,drive and swim at the same time, bring dead units to life and female troopers get insta pregnant with commando lvl babies. I might nerf their ability to generate power tho for balance reasons. Back on topic tho...have you tried your script with anything else then the kill self function? Could be that is the problem. I've had issues with kill self in the past (altho that might've been unrelated and part of my crappy lua coding itself) of course i tried other actions. so far looks like it's just DamageIncoming not working. Share this post Link to post
Egozi44 28 Posted September 24, 2015 Wonder if there's any way to take it from BFME and add it to TW... Btw speaking of power plant did any of you happend to peek in this mobile reactor for that funny generals mod? http://www.moddb.com/mods/cc-crazy-mod-revived/images/portable#imagebox xD Share this post Link to post
Ravendark 46 Posted September 24, 2015 I might need some confirmation on this but: IIRC the scripts.lua file gets read from top to botom, if at the top there is a broken script the rest of the following scripts wont get read aswell. So you can either check if you added your new predator script to the top, if not try that, there could be some earlier trialanderror stuff that is preventing it from running. Also you could try to add the predatr script to the top and see if it breaks/interupts the existing scripts. Share this post Link to post