|
 |
| Author |
Message |
|
brandon007
|
Posted: 23 Sep, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
Mithy wrote: You're running TEnergyCreationUnit.OnCreate in OnStopBeingBuilt. That's the problem. Change that to TEnergyCreationUnit.OnStopBeingBuilt.
You also don't need any of the state stuff, because the states aren't doing anything. Alright! That seemed to fix it, thanks Mithy.
|
|
| Top |
|
 |
|
brandon007
|
Posted: 11 Oct, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
Ello again, thought I would revive this thread XD Anyways, I was trying to make a Missile that flies up to a height of 30, and there it would split into 25 smaller missiles, which rain down onto the battlefield, harming only enemies. now my problem is, the missiles fly too high, and they harm everything in their path... Any idea why they fly up so high? Projectile BP: http://pastebin.com/HyK0d00Xprojectile Script: http://pastebin.com/tDLSamcy
|
|
| Top |
|
 |
|
brandon007
|
Posted: 16 Oct, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
|
Anyone know how add a new Tier to FA non-destructivly?
I wanted it to go T1 -> T2 -> T3 -> Exp -> New Tier
Its for a New feature I am attempting to add to FA.
|
|
| Top |
|
 |
|
Domino
|
Posted: 17 Oct, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
Hi, brandon007 wrote: Anyone know how add a new Tier to FA non-destructivly?
I wanted it to go T1 -> T2 -> T3 -> Exp -> New Tier
Its for a New feature I am attempting to add to FA. 100% possible, however quite difficult, i fear its beyond your ability pal.. to do correctly.. however, if your just wanting to put a button in a percific place on the ui, this would be much simpler.. i think you could achive this  have a look on the forum for my Game Over mod... i do exactly that in the mod.. i just add a button to the ui that makes something happen when clicked.. 
_________________ Domino. ______________
|
|
| Top |
|
 |
|
brandon007
|
Posted: 17 Oct, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
Domino wrote: Hi, brandon007 wrote: Anyone know how add a new Tier to FA non-destructivly?
I wanted it to go T1 -> T2 -> T3 -> Exp -> New Tier
Its for a New feature I am attempting to add to FA. 100% possible, however quite difficult, i fear its beyond your ability pal.. to do correctly.. however, if your just wanting to put a button in a percific place on the ui, this would be much simpler.. i think you could achive this  have a look on the forum for my Game Over mod... i do exactly that in the mod.. i just add a button to the ui that makes something happen when clicked..  If its beyond my ability to do, I might as well learn right? Where do I need to start?
|
|
| Top |
|
 |
|
Domino
|
Posted: 17 Oct, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
|
might as well learn to make a box unit with a weapon and texture it aye?
_________________ Domino. ______________
|
|
| Top |
|
 |
|
brandon007
|
Posted: 17 Oct, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
Domino wrote: might as well learn to make a box unit with a weapon and texture it aye? Funny >.> I need to get a working button in the UI for the new Tech level. How hard is it really? PS: I cant find your Game Over mod =o
|
|
| Top |
|
 |
|
brandon007
|
Posted: 17 Oct, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
Code: local AWalkingLandUnit = import('/lua/aeonunits.lua').AWalkingLandUnit
local UAL0001OLD = UAL0001
UAL0001 = Class(UAL0001OLD) {
OnExtraToggleClear = function(self, ToggleName) UAL0001OLD.OnExtraToggleClear(self, ToggleName) if ToggleName == 'RULEETC_TechToggle' then self:AddBuildRestriction( categories.AEON * (categories.SupCom2Tech) ) self:RemoveBuildRestriction( categories.AEON * (categories.PRODUCTFA + categories.PRODUCTSC1) ) self:RequestRefreshUI()
end end,
OnExtraToggleSet = function(self, ToggleName) UAL0001OLD.OnExtraToggleSet(self, ToggleName) if ToggleName == 'RULEETC_TechToggle' then self:RemoveBuildRestriction( categories.AEON * (categories.SupCom2Tech) ) self:AddBuildRestriction( categories.AEON * (categories.PRODUCTFA + categories.PRODUCTSC1) ) self:RequestRefreshUI()
end end,
}
TypeClass = UAL0001 With Dominos Help, got the Toggle on, and somewhat working. Though I have hit a snag. The toggle works to view the new Units, However, If I toggle back to the Normal Units (On say, a ACU with only T1) The Unit will be able to build everything Tech3 and up. Any idea how to fix this?
|
|
| Top |
|
 |
|
Domino
|
Posted: 17 Oct, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
Hi, Well typically for commanders buildable cats are enabled via enhancements... so you going to have to figure out how to get which enhancements are enabled for the commander which relate to what it can build.. and enable disable restrictions on what is returned.. your also going to need some filter code for engineers and facs to filter the techlvl and enable disable restrictions on what is returned by these units... its tricky.. and not without its own complications  however for now concentrate on the commander filter and getting which enhancements are enable that relate to what it can build.. 
_________________ Domino. ______________
|
|
| Top |
|
 |
|
brandon007
|
Posted: 17 Oct, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
Domino wrote: Hi, Well typically for commanders buildable cats are enabled via enhancements... so you going to have to figure out how to get which enhancements are enabled for the commander which relate to what it can build.. and enable disable restrictions on what is returned.. your also going to need some filter code for engineers and facs to filter the techlvl and enable disable restrictions on what is returned by these units... its tricky.. and not without its own complications  however for now concentrate on the commander filter and getting which enhancements are enable that relate to what it can build..  If I knew how to do this, I wouldnt be asking for help XD
|
|
| Top |
|
 |
|
Domino
|
Posted: 17 Oct, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
brandon007 wrote: If I knew how to do this, I wouldnt be asking for help XD you keep saying this pal, your not getting it though... when WE say YOU need to do this or YOU need to do that, were telling YOU how to do it... WE are not here pal to write all your code for you... your not directly asking.. YOU just keep referring to brandon007 wrote: If I knew how to do this, I wouldnt be asking for help XD which in essence is an indirect "do it for me" im to lazy to look through the lua or atleast try to write the first part of the function.. EVERYONE else on this forum understands that when WE say do this or do that YOU have to start looking through the LUA to find out how to do it, if you dont already know how to do it.. WE can all say brandon007 wrote: If I knew how to do this, I wouldnt be asking for help XD however the thing we are trying to do DOES NOT get done if you dont look for the answer... come on pal get with the program.. break down what i said and start looking for the parts you need to figure out... i have my own things to do here i cant keep reffing code for you.. i can direct you in what you need to do... and i can supply small code parts but im not about to start spending 30 mins to an hour of my own time writing your functions for you... This is how WE work on this forum, you really need to start looking harder and pasting some code so that we can direct you properly on how to fix your problems.. so that you "may" learn some lua...
_________________ Domino. ______________
|
|
| Top |
|
 |
|
brandon007
|
Posted: 17 Oct, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
|
I know that Im asking for help too much, and that I need to learn how to do Lua myself. I am looking through some of the lua files that do enhancments, and seeing if theres something in there to check wether or not a Unit has an Enhancment.
Not having alot of luck.
|
|
| Top |
|
 |
|
Domino
|
Posted: 17 Oct, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
fine here is the "code" you could not find on how to populate a table with the enhancements a unit has... Code: local enh = {} local bp = self:GetBlueprint() local posblEnh = bp.Enhancements if posblEnh then for k,v in posblEnh do if self:HasEnhancement( k ) then table.insert( enh, k ) end end end what are you going to do with this code? you really need to start trying this stuff brandon... next i want to see your code which uses the above code... so think about what you want to do and what all the commanders have in common that can help you achieve your goal.
_________________ Domino. ______________
|
|
| Top |
|
 |
|
Lt_hawkeye
|
Posted: 17 Oct, 2011
|
|
Joined: 26 Mar, 2007 Posts: 5080 Location: California, United States
|
|
a simple Control Flag is enough to check if a unit has an enhancement. while it is a little rough, simple logic will give you what you need. if you don't know the basics of programming logic then that is where you need to start.
edit: Domino does that code just populate a table based on what is entered into the enhancments section of the BP? and no if the unit in question has the enh enabled or am i misreading it.
either way, Domino is right brandon
_________________ {◕ ◡ ◕}
|
|
| Top |
|
 |
|
brandon007
|
Posted: 17 Oct, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
|
I know hes right. Thats why Im trying to work in the code he gave me, with some of my own research.
Its going... Slowly XD
|
|
| Top |
|
 |
|
Domino
|
Posted: 17 Oct, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
Hi Lt_hawkeye wrote: edit: Domino does that code just populate a table based on what is entered into the enhancments section of the BP? and no if the unit in question has the enh enabled or am i misreading it.
it populates the table with the enhancments the unit has... as in if it has 3 enhancements in the lch slot and the unit has the second enhancement this enhancement will be entered into the table but the other 2 (1 and 3) will not.. it basicly returns only the enhancements the unit has "bought" as is equipped with..
_________________ Domino. ______________
|
|
| Top |
|
 |
|
brandon007
|
Posted: 29 Oct, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
Ello peoples, I dunno if there are any good coders left, but Im having a projectile problem with FA. Theres always a smokey trail after the projectile, and Id like to know how to be rid of it. 
|
|
| Top |
|
 |
|
brandon007
|
Posted: 03 Feb, 2012
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
Code: WARNING: Failed to assaign unit wel0409 a slot in the formation AttackFormation (units=15, formation slots=14) Just curious. Anyone know how to fix this? It only happens with one of my units, when I try to make it move with others...
|
|
| Top |
|
 |
|
Sprouto
|
Posted: 04 Feb, 2012
|
|
Joined: 26 Feb, 2007 Posts: 339 Location: Toronto
|
|
I've been seeing that same error - but in my case it's with the unit XEL0306. Not to imply anything, but it goes away when I turn off Black Ops Unleashed. I don't know why. I've looked at the formation code - put in traps to test the conditions - and there's nothing wrong. In fact, it works perfectly much of the time, with no error - and then it doesn't.
I'd love to find the code that reports the error - just so I could fix the bad spelling of 'assign'.
|
|
| Top |
|
 |
|
Domino
|
Posted: 04 Feb, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
|
Hi,
i think its in formation.lua...
i also think the error arises when a unit has a category it shouldnt have.. not 100% sure though... ill take a look into this...
_________________ Domino. ______________
|
|
| Top |
|
 |
|
Sprouto
|
Posted: 04 Feb, 2012
|
|
Joined: 26 Feb, 2007 Posts: 339 Location: Toronto
|
|
I thought the same thing but XEL0306 is a standard unit - nothing odd about it. I couldn't find any hooks that would affect formations.lua and like I say, the problem disappeared when I disabled BO:U - and I can't see any reason why.
|
|
| Top |
|
 |
|
brandon007
|
Posted: 06 Feb, 2012
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
Seeing as no ones helping, Lets see if someone can solve this problem. Im trying to add an enhancement to an ACU for a TML. Its all working fine and everything, except for 1 thing. The Ammo button on the ACU Says 0/0 Instead of 0/1. Anyone know why? This is the Missiles part of the BP - http://pastebin.com/ZxefCe5z
|
|
| Top |
|
 |
|
BulletMagnet
|
Posted: 07 Feb, 2012
|
|
Joined: 05 Oct, 2007 Posts: 16448 Location: camping near the biggest power-up
|
|
Do the UEF and Sephy ACU scripts shave anything special in them for TMLs? The weapon class you're using might need to adjusting.
_________________
Nephylim wrote: But, an FA army in an FA environment just looks... right. Does anyone know how to use air transports? I cant get them to pick up troops.
|
|
| Top |
|
 |
|
brandon007
|
Posted: 07 Feb, 2012
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
BulletMagnet wrote: Do the UEF and Sephy ACU scripts shave anything special in them for TMLs? The weapon class you're using might need to adjusting. Most of the Information was directly Copy/pasted from the UEF ACU.
|
|
| Top |
|
 |
|
BulletMagnet
|
Posted: 07 Feb, 2012
|
|
Joined: 05 Oct, 2007 Posts: 16448 Location: camping near the biggest power-up
|
|
Post up the weapon script you used.
Also, double check that weapon labels are correct. I remember that this would clobber scripts if not done properly.
_________________
Nephylim wrote: But, an FA army in an FA environment just looks... right. Does anyone know how to use air transports? I cant get them to pick up troops.
|
|
| Top |
|
 |
 |
 |
|