Jump to content
Sign in to follow this  
ravage

is DamageIncoming script still working in c&c3?

Recommended Posts

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
end
end

 

but when my Predators and the AI's attacking each other, nothing happens. are these scripts still working?

Share this post


Link to post

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

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

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

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

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

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 by Ravendark

Share this post


Link to post

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

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

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

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. :o

 

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

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. :o

 

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×