Jump to content
We see you're using an ad blocker of some kind. And hey, that's okay! Some of us do, too! We just want you to know
that we don't use conventional spammy ads at CNCNZ.com. We only link to our own internal projects, or other sites
within the Command & Conquer community! Who knows, you might see a mod or download you like! Thanks!

Madin

Members
  • Content count

    294
  • Joined

  • Last visited

Community Reputation

5 Neutral

1 Follower

About Madin

  • Rank
    First Sergeant

Contact Methods

  • Skype
    madin_charles

Recent Profile Visitors

3,970 profile views
  1. Simple I would like for the AI to be able to automatically charge up a Tesla coil if they are within a certain range. While I can achieve this in LUA code, my issue is that I do not have the knowledge to restrict the code so that only a single squad of Tesla Troopers would charge a Tesla Coil (my simple LUA broadcast method would allow for multiple squads to receive and answer the broadcast from a single coil). Any ideas? Complex The same as above, but also for human players (in RA games where Tesla Coil charging was available, the Tesla trooper would automatically charge a Coil if it was close enough). Ideally there would be a bit of code that meant that if the Tesla Trooper was selected by the player (as in model condition 'SELECTED'), or was attacking a target (model condition 'ATTACKING'), it would ignore any broadcast request. Thanks for any input!
  2. Sounds like you are taking a soft approach, to a hard problem! Back up the parts of your Mod SDK folder (and App data folder), that you do not want to lose, and then wipe out everything. Start with a truly clean Tiberium wars install. Update to 1.9 if necessary, and then install the mod SDK, and try to compile a simple mod (without mod studio), if it works, progress from there in terms of adding additional items.
  3. This is still not working fully (although now there are no errors). IronCurtain = {} IronCurtain["Targets"] = {} IronCurtain["BuildingRef"] = {} IronCurtain["Ready"] = {} function OnIronCurtainBuildingCreated(self) IronCurtain["BuildingRef"][ObjectTeamName(self)] = self if IronCurtain["Targets"][ObjectTeamName(self)] == nil then IronCurtain["Targets"][ObjectTeamName(self)] = {} end IronCurtain["Ready"][ObjectTeamName(self)] = false ExecuteAction("SHOW_MILITARY_CAPTION", "IRONCURTAIN_BUILT", 5) end function OnIronCurtainBuildingDestroyed(self) IronCurtain["BuildingRef"][ObjectTeamName(self)] = nil IronCurtain["Ready"][ObjectTeamName(self)] = false end function OnIronCurtainReady(self) IronCurtain["Ready"][ObjectTeamName(self)] = true ExecuteAction("SHOW_MILITARY_CAPTION", "IRONCURTAIN_READY", 5) if IronCurtain["Targets"][ObjectTeamName(self)] == nil then IronCurtain["Targets"][ObjectTeamName(self)] = {} end ExecuteAction("SHOW_MILITARY_CAPTION", "IRONCURTAIN_NOT_FIRED", 5) if IronCurtain["Targets"][ObjectTeamName(self)] and getn(IronCurtain["Targets"][ObjectTeamName(self)]) > 0 and not ObjectTestModelCondition(self,"UNDERPOWERED") then -- ObjectCreateAndFireTempWeapon(IronCurtain["Targets"][1],"RA1IronCurtainInfantryDeathWeapon") ExecuteAction("NAMED_FIRE_SPECIAL_POWER_AT_NAMED",GetObj.String(self),"SpecialPowerIronCurtainRA1_Start",GetObj.String(IronCurtain["Targets"][ObjectTeamName(self)][1])) ExecuteAction("SHOW_MILITARY_CAPTION", "IRONCURTAIN_FIRED", 5) IronCurtain["Ready"][ObjectTeamName(self)] = false ExecuteAction("SHOW_MILITARY_CAPTION", "IRONCURTAIN_FINISHED", 5) end end function OnHarvesterHealth25Percent(self) if IronCurtain["Targets"][ObjectTeamName(self)] == nil then IronCurtain["Targets"][ObjectTeamName(self)] = {} end ExecuteAction("SHOW_MILITARY_CAPTION", "HARVESTER_FIRST", 5) tinsert(IronCurtain["Targets"][ObjectTeamName(self)],self) ExecuteAction("SHOW_MILITARY_CAPTION", "HARVESTER_IN_TABLE", 5) if IronCurtain["BuildingRef"][ObjectTeamName(self)] and IronCurtain["Ready"][ObjectTeamName(self)] and not ObjectTestModelCondition(IronCurtain["BuildingRef"][ObjectTeamName(self)],"UNDERPOWERED") then -- ObjectCreateAndFireTempWeapon(GetObj.String(self),"RA1IronCurtainInfantryDeathWeapon") ExecuteAction("NAMED_FIRE_SPECIAL_POWER_AT_NAMED",GetObj.String(IronCurtain["BuildingRef"][ObjectTeamName(self)]),"SpecialPowerIronCurtainRA1_Start",GetObj.String(self)) ExecuteAction("SHOW_MILITARY_CAPTION", "IRONCURTAIN_HARVESTER", 5) IronCurtain["Ready"][ObjectTeamName(self)] = false ExecuteAction("SHOW_MILITARY_CAPTION", "HARVESTER_CODE_FINISHED", 5) end end function OnHarvesterHealth25PercentNOT_OR_OnHarvesterDead(self) local Index = GetIndexOfTableElement(IronCurtain["Targets"][ObjectTeamName(self)],self) if Index then tremove(IronCurtain["Targets"][ObjectTeamName(self)], Index) end ExecuteAction("SHOW_MILITARY_CAPTION", "HARVESTER_NOT_IN_TABLE", 5) end function GetIndexOfTableElement(table,element) if not table then return nil end for i=1,getn(table),1 do if table[i]==element then return i end end end The parts of the code that are supposed to fire either a 'Special Power' or weapon, do not work. The test messages before that point do play. The Harvester gets to the "HARVESTER_IN_TABLE" message when its gets to 25% health or lower, and gets the "HARVESTER_NOT_IN_TABLE" message when it goes above 25% health (they have self heal). When the Iron Curtain comes to ready, it will correctly get to the "IRONCURTAIN_NOT_FIRED" message (I have not tried having the Harvesters damaged before the Iron Curtain special power is ready).
  4. Thanks for your reply! I am getting an error message once the Special power used to trigger the Iron Curtain LUA is ready: Since I moved to Windows 7, I am no longer getting 'ErrorLog' text files. IronCurtain = {} IronCurtain["Targets"] = {} IronCurtain["BuildingRef"] = {} IronCurtain["Ready"] = {} function OnIronCurtainBuildingCreated(self) IronCurtain["BuildingRef"][ObjectTeamName(self)] = self IronCurtain["Targets"][ObjectTeamName(self)] = {} IronCurtain["Ready"][ObjectTeamName(self)] = false end function OnIronCurtainBuildingDestroyed(self) IronCurtain["BuildingRef"][ObjectTeamName(self)] = nil IronCurtain["Ready"][ObjectTeamName(self)] = false end function OnIronCurtainReady(self) IronCurtain["Ready"][ObjectTeamName(self)] = true if getn(IronCurtain["Targets"][ObjectTeamName(self)]) > 0 and ObjectTestModelCondition(IronCurtain["BuildingRef"][ObjectTeamName(self)],"UNDERPOWERED") then --ObjectCreateAndFireTempWeapon(IronCurtain["Targets"][1],"IronCurtainWeapon") ExecuteAction("NAMED_FIRE_SPECIAL_POWER_AT_NAMED",GetObj.String(self),"SpecialPower_IronCurtain",GetObj.String(IronCurtain["Targets"][ObjectTeamName(self)][1])) IronCurtain["Ready"][ObjectTeamName(self)] = false end end function OnHarvesterHealth25Percent(self) tinsert(IronCurtain["Targets"][ObjectTeamName(self)],self) if IronCurtain["BuildingRef"][ObjectTeamName(self)] and IronCurtain["Ready"][ObjectTeamName(self)] and not ObjectTestModelCondition(IronCurtain["BuildingRef"][ObjectTeamName(self)],"UNDERPOWERED") then --ObjectCreateAndFireTempWeapon(self,"IronCurtainWeapon") ExecuteAction("NAMED_FIRE_SPECIAL_POWER_AT_NAMED",GetObj.String(IronCurtain["BuildingRef"][ObjectTeamName(self)]),"SpecialPower_IronCurtain",GetObj.String(self)) IronCurtain["Ready"][ObjectTeamName(self)] = false end end function OnHarvesterHealth25PercentNOT_OR_OnHarvesterDead(self) local Index = GetIndexOfTableElement(IronCurtain["Targets"][ObjectTeamName(self)],self) if Index then tremove(IronCurtain["Targets"][ObjectTeamName(self)], Index) end end function GetIndexOfTableElement(table,element) for i=1,getn(table),1 do if table[i]==element then return i end end end
  5. Would need to know more of what you need in terms of models.
  6. Thanks again! This ended up working with the old favourite "ExecuteAction("NAMED_EXIT_ALL",GetObj.String(self))". I should have known...
  7. Thanks for your input! I do wonder about the 'fireweaponupdate' and 'fireonobject' nugget, as I have found them unreliable in the past.
  8. <EventList Name="SovietHalfTrackFunctions" Inherit="BaseScriptFunctions"> <EventHandler EventName="OnCreated" ScriptFunctionName="OnSovietHalfTrackCreated" DebugSingleStep="false"/> <EventHandler EventName="TransportEmpty" ScriptFunctionName="OnSovietHalfTrackEmpty" DebugSingleStep="false"/> <EventHandler EventName="ReallyDamaged" ScriptFunctionName="OnSovietHalfTrackReallyDamaged" DebugSingleStep="false"/> </EventList> function OnSovietHalfTrackReallyDamaged(self) --add the lua event to scriptevents.xml too if PassengerTable[tostring(self)] == nil then return end for i=1,getn(PassengerTable[tostring(self)]),1 do ExecuteAction("NAMED_EXIT_ALL",PassengerTable[tostring(self)][i]) ExecuteAction("UNIT_AI_TRANSFER",PassengerTable[tostring(self)][i],1) --enable ai in case it was disabled end PassengerTable[tostring(self)]=nil end The squad being ejected on 'REALLY_DAMAGED' does not work (the squad entering the transport works though!).
  9. I am looking to add a passive support ability to the Iron Curtain structure, and I was wondering what the best way to go about it would be. The ability would basically fire an RA1 style Iron Curtain (ie a single vehicle only version), at a Harvester on the same team whose health had gone below 25%. This passive ability would be ready every 30 seconds, and the Iron Curtain effect would last 30 seconds (ie it could only protect one Harvester at a time). The ability would be completely passive, the player would have no control over it at all. Obviously if the Iron Curtain structure was on low power, or had been manually powered down, the ability would not work. Any ideas how I could best implement this?
  10. OK it is time to stress test this! Changing: local MaximumSupportDistance = 13000 to: local MaximumSupportDistance = 375 Means that only towers within a radius of 375 will fire a support beam at the attacking tower (so there is no chain of support beams). Keeping it at a high number like 13000, means that the 'lone tower' force fire bug will happen (a tower that is not with range of other towers will still get attribute modifier boost from all towers within "MaximumSupportDistance" radius number without any visible support beam being drawn, this would be a major exploit). An even bigger issue is that once a tower has either fired on a target, or fired a support beam, it can no longer fire a support beam at any other tower. The net result of this is that eventually most towers will not use their support beams, as they get their own targets, or other towers request support and are ignored (because they were not the first tower that had its request answered).
  11. I am looking to slightly improve the skirmish AI's chances when it comes to its usage of aircraft that require reloading at an airfield (i.e. GDI Orca and Firehawk). There are 3 behaviours that the skirmish AI has that I believe could be improved if I could somehow force them to return to base. An AI controlled aircraft will use all of its ammo in an attack, but instead of returning to reload, will continue moving forward (sometimes to the back of an opponents base!), this frequently causes the aircraft to get destroyed. The AI controlled aircraft while having no ammunition, will constantly move to attack an enemy unit that is near its base. Sometimes it will go towards its airfield as if it is going to land, and then go back to the enemy unit. It can repeat this behaviour until either it or the enemy unit (or units) are destroyed. To make things worse, this can happen to groups of AI controlled aircraft. The AI controlled aircraft will load a single round of ammunition, take off and fire that single round, then and load another round, then repeat the behaviour. This means that the skirmish AI can be very wasteful when it comes to using aircraft with limited ammo. And obviously GDI are the AI that is effected the most. I would like a way of forcing the AI aircraft to land when they are out of ammo. And once they have landed I want them to at least stay on the airfield for a few seconds (to limit behaviour #3). Because of behaviour #2, I think that having a command (i.e. LUA), that only is played once when the aircraft's ammo first runs out will not do. Any ideas would be most welcome, thanks!
  12. Interesting information, thanks!
  13. This is far as I can get installing Tiberium wars on windows 7 64bit. I am using a DVD install, and I have tried disabling the firewall and antivirus, and running the setup as administrator. Obviously others have got TW working fine on windows 7, so what am I missing? The 'Updating component registration' hang, seems to be a known issue, that even occurs on other game installs, although none of the suggested solutions that I tried worked.
×