Forged Alliance Forever Forged Alliance Forever Forums 2013-05-26T19:30:41+02:00 /feed.php?f=2&t=4015 2013-05-26T19:30:41+02:00 2013-05-26T19:30:41+02:00 /viewtopic.php?t=4015&p=43456#p43456 <![CDATA[Re: Updating Unit Blueprints during a game]]>
Code:
disableVeterancy = function(unit)
   unit.CheckVeteranLevel = function(self) end
   unit.onKilledUnit = function(self,unitKilled) end
   unit.SetVeteranLevel = function(self, level) end
   unit.CreateVeterancyBuff = function(self, levelName, levelValue, buffType) end
end

Statistics: Posted by johnie102 — 26 May 2013, 19:30


]]>
2013-05-24T12:44:52+02:00 2013-05-24T12:44:52+02:00 /viewtopic.php?t=4015&p=43223#p43223 <![CDATA[Re: Updating Unit Blueprints during a game]]>
FunkOff wrote:
johnie102 wrote:I have recently released an 8 player version of Zone Control and when you get a certain amount of kills hero units (experimentals) spawn. I would like to disable veterancy effects for them because I think it makes them slightly too powerfull.
Would it be possible to just check the amount of kills and simply hardcode to drop the hp by a certain amount when the veterancy levels are hit?


Dude. Dude. Do you get how crazy you are? You want ONE unit, one SINGLE unit to not get buffs, and you on asking for the ENTIRE CONCEPT OF VETERANCY to die. Talk about using a nuke to kill a fly.

All you have to do is put this code in the script that spawns your special super unit:

local SuperUnit = [the code that spawns your super unit]
SuperUnit.AddKills = function(self, numKills)
return
end

That will make it so your super unit cannot acquire kills and cannot get veterancy.


Ok, that was what I needed then ;) Thanks.
Btw, while being slightly on this topic: Is it possible to edit where buildings are buildable in a map script? So that I can make buildings buildable underwater without using a mod.

Statistics: Posted by johnie102 — 24 May 2013, 12:44


]]>
2013-05-23T22:26:44+02:00 2013-05-23T22:26:44+02:00 /viewtopic.php?t=4015&p=43176#p43176 <![CDATA[Re: Updating Unit Blueprints during a game]]>
:)

Statistics: Posted by Mr-Smith — 23 May 2013, 22:26


]]>
2013-05-23T21:36:18+02:00 2013-05-23T21:36:18+02:00 /viewtopic.php?t=4015&p=43168#p43168 <![CDATA[Re: Updating Unit Blueprints during a game]]>
johnie102 wrote:
I have recently released an 8 player version of Zone Control and when you get a certain amount of kills hero units (experimentals) spawn. I would like to disable veterancy effects for them because I think it makes them slightly too powerfull.
Would it be possible to just check the amount of kills and simply hardcode to drop the hp by a certain amount when the veterancy levels are hit?


Dude. Dude. Do you get how crazy you are? You want ONE unit, one SINGLE unit to not get buffs, and you on asking for the ENTIRE CONCEPT OF VETERANCY to die. Talk about using a nuke to kill a fly.

All you have to do is put this code in the script that spawns your special super unit:

local SuperUnit = [the code that spawns your super unit]
SuperUnit.AddKills = function(self, numKills)
return
end

That will make it so your super unit cannot acquire kills and cannot get veterancy.

Statistics: Posted by FunkOff — 23 May 2013, 21:36


]]>
2013-05-23T20:41:46+02:00 2013-05-23T20:41:46+02:00 /viewtopic.php?t=4015&p=43158#p43158 <![CDATA[Re: Updating Unit Blueprints during a game]]> Would it be possible to just check the amount of kills and simply hardcode to drop the hp by a certain amount when the veterancy levels are hit?

Statistics: Posted by johnie102 — 23 May 2013, 20:41


]]>
2013-05-22T17:09:47+02:00 2013-05-22T17:09:47+02:00 /viewtopic.php?t=4015&p=43022#p43022 <![CDATA[Re: Updating Unit Blueprints during a game]]> Statistics: Posted by FunkOff — 22 May 2013, 17:09


]]>
2013-05-22T13:43:32+02:00 2013-05-22T13:43:32+02:00 /viewtopic.php?t=4015&p=43004#p43004 <![CDATA[Re: Updating Unit Blueprints during a game]]> I really wouldn't know how to do that though.

Statistics: Posted by johnie102 — 22 May 2013, 13:43


]]>
2013-05-21T18:24:00+02:00 2013-05-21T18:24:00+02:00 /viewtopic.php?t=4015&p=42905#p42905 <![CDATA[Re: Updating Unit Blueprints during a game]]> Statistics: Posted by FunkOff — 21 May 2013, 18:24


]]>
2013-05-21T18:16:33+02:00 2013-05-21T18:16:33+02:00 /viewtopic.php?t=4015&p=42898#p42898 <![CDATA[Re: Updating Unit Blueprints during a game]]> else you could also try changing the function veterany refers to as they actually just add Hp so if you set the amount to 0 veterancy wont have any effect to

Statistics: Posted by Mr-Smith — 21 May 2013, 18:16


]]>
2013-05-21T18:11:08+02:00 2013-05-21T18:11:08+02:00 /viewtopic.php?t=4015&p=42895#p42895 <![CDATA[Re: Updating Unit Blueprints during a game]]> Penultimate Vet

What it basically does is replace the veterancy table with an empty table for all units. Maybe this can help you.

Statistics: Posted by The Mak — 21 May 2013, 18:11


]]>
2013-05-21T11:57:08+02:00 2013-05-21T11:57:08+02:00 /viewtopic.php?t=4015&p=42842#p42842 <![CDATA[Updating Unit Blueprints during a game]]> I thought i could do this by calling unit:GetBlueprint().Veterancy.Level1 = 10000 and so on for the other levels, but this doesn't work because the unit apparantly doesn't check this stat after it has been created. So is there somekind of updateBlueprint function? Is there maybe another method that I don't know about?
Could I just get the blueprint, edit it and then re-register it as a new unit so that I simply create that new unit?

Btw, why is there no general modding forum?

Statistics: Posted by johnie102 — 21 May 2013, 11:57


]]>