Login  Register
 



Post new topicReply to topic Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 10  Next
 
Author Message
 PostPosted: 20 Jul, 2011 
 

Joined: 05 Oct, 2007
Posts: 16425
Location: camping near the biggest power-up
Offline
Code:
attempt to use as number a nil value


There's some code that does maths, but at least one of the variables it uses doesn't exist.

_________________
Nephylim wrote:
But, an FA army in an FA environment just looks... right.
help wrote:
Does anyone know how to use air transports? I cant get them to pick up troops.


Top
 Profile  
 PostPosted: 20 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
BulletMagnet wrote:
Code:
attempt to use as number a nil value


There's some code that does maths, but at least one of the variables it uses doesn't exist.

And its located in the Projectiles BP? I didnt think that was a problem?


Top
 Profile  
 PostPosted: 20 Jul, 2011 
 

Joined: 05 Oct, 2007
Posts: 16425
Location: camping near the biggest power-up
Offline
It's a script error. The error itself is in the script. The variable that is missing might be in the blueprint; that's for you to work out.

_________________
Nephylim wrote:
But, an FA army in an FA environment just looks... right.
help wrote:
Does anyone know how to use air transports? I cant get them to pick up troops.


Top
 Profile  
 PostPosted: 20 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
I looked at the script. I made it into this:

Code:
   FxTrail = '/effects/emitters/w_c_rkt01_p_02_glow_emit.bp',
    FxTrailOffset = 0,

        PolyTrails = {
      '/effects/emitters/w_c_rkt01_p_01_polytrail_emit.bp',
      '/effects/emitters/w_c_rkt01_p_07_polytrail_emit.bp',
      '/effects/emitters/w_c_rkt01_p_08_polytrail_emit.bp',
      '/effects/emitters/w_c_rkt01_p_09_polytrail_emit.bp',
        },
    PolyTrailOffset = {0},


And there are still problems.


Top
 Profile  
 PostPosted: 21 Jul, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
Look at the loop at the line number that the error message points to. What does it do with OffsetEmitter? What does it try to pass to it as the last parameter, in both cases?


Top
 Profile  
 PostPosted: 21 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Mithy wrote:
Look at the loop at the line number that the error message points to. What does it do with OffsetEmitter? What does it try to pass to it as the last parameter, in both cases?


The variables are undefined... It seems that when I made

Code:
    PolyTrailOffset = {0},

into
Code:
    PolyTrailOffset = {0,0,0,0},

The Error doesnt seem to appear anymore.


Top
 Profile  
 PostPosted: 22 Jul, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
Right, that's because it looks for self.PolyTrailOffset[i], where i is the index of the emitter in self.PolyTrails. So you just need as many offsets as trails.


Top
 Profile  
 PostPosted: 22 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Thats what I thought when I had a closer look at DefaultProjectiles.lua.

Have you tried out my Beta yet? =p


Top
 Profile  
 PostPosted: 25 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
So ya, I am trying to make a Missile Projectile that has a special effect...

On Impact, I wanted the targeted unit to change sides to that of the attacking unit for 3 minutes. It shouldnt effect Experimentals, or Commanders/SCUs.

I looked up in LUADOC, and the closest thing I can find is ChangeUnitArmy, yet I have no idea how to do it...

Anyone up for this challenge?


Top
 Profile  
 PostPosted: 30 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Im having a problem with a T4 Mobile arty unit... It doesnt seem to deploy on its own, and when I tell it to fire, It Deploys, yet the Barrel sounds like somethings caught in the gears, not allowing it to target units....

However, When I tell it to attack again, it sometimes works, and sometimes doesnt X-x

Any idea why?


Top
 Profile  
 PostPosted: 30 Jul, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
Not without at least pastebinning the script and bp, and the log if there are errors.

Which unit's script/bp did you use as a base, and what type of changes did you make to the bp re: animations / reload times / etc?


Top
 Profile  
 PostPosted: 30 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Unit BP: http://pastebin.com/9Ka9jbtv
Unit Script: http://pastebin.com/vtsKcCFS

I used the Cybran Mobile Arty as the base. (URL0304)

Nothing shows up in the log. Only things I changed were the weapons Range, Damage, Bone stuff, Projectile and added camera stuff.

Also, I changed the Faction stuff, so it would only be built by the ordos. Had to add in a few things so it was an experimental and so it was built by the T3 Engineers and ACU


Top
 Profile  
 PostPosted: 30 Jul, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
I don't see anything extremely glaring, but there are a few potential issues:

The TargetCheckInterval is too high - keep it to <= 1, as this could cause target acquisition issues, forcing the weapon to start repacking too quickly.

Likewise, the WeaponRepackTimeout should probably be longer than the TargetCheckInterval. I don't really know why all the T3 mobile arty have a WeaponRepackTimeout of 0, but they have a pretty quick unpack/repack animation, so it's not the end of the world if they get interrupted in the middle of their animation, unlike a T4 artillery that likely takes a long time to pack/unpack.

I see you're using the same bone for pitch and yaw. If the mesh is rigged correctly, that can work, but if not, that can cause aiming/animation problems. Likewise, depending on which bones the animation manipulates, it might be causing a fight between the weapon's aim manipulator and the unpack animator. If you look at the Scathis blueprint, it has a WeaponUnpackAnimatorPrecedence of 0 (the default, actually), which I assume allows the aim manipulator to rotate the yaw bone while the weapon is unpacking. If you can't solve the issue any other way, play around with this value, both higher and lower than the aim manipulator precedence (which defaults to 10 if AimControlPrecedence isn't set in the bp).


Top
 Profile  
 PostPosted: 30 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
I actually got it to work =o I dunno what was wrong...

Now, Last problem for that unit... Is there any command for the script to make it immobile when its deployed? Cause when its deployed, The unit still spins around when its told to force fire. It doesnt do this when its not deployed...

This is the part of the script I need to tweak:

Code:
   OnScriptBitSet = function(self, bit)
        CLandUnit.OnScriptBitSet(self, bit)
        if bit == 1 then
      self:SetSpeedMult(0.01)

         if not self.AnimationManipulator then
            self.AnimationManipulator = CreateAnimator(self)
            self.Trash:Add(self.AnimationManipulator)
            self.AnimationManipulator:PlayAnim(self:GetBlueprint().Display.AnimationDeploy)
         end
         self.AnimationManipulator:SetRate(1)

      self:SetWeaponEnabledByLabel('MainGun', true)
      self:SetWeaponEnabledByLabel('EXTargetPainter', false)
       end
    end,
   
   
   OnScriptBitClear = function(self, bit)
        CLandUnit.OnScriptBitSet(self, bit)
        if bit == 1 then

         if self.AnimationManipulator then
            self.AnimationManipulator:SetRate(-1)
         end

      self:SetSpeedMult(1.0)
      self:SetWeaponEnabledByLabel('MainGun', false)
      self:SetWeaponEnabledByLabel('EXTargetPainter', false)
       end
    end,


I dunno the command to replace
Code:
self:SetSpeedMult(0.01)

with something that completely stops it from moving. I know that it is this that still allows the unit itself (And not teh turret only) to turn.


Top
 Profile  
 PostPosted: 30 Jul, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
Code:
self:SetImmobile(true)
..and false to make it mobile again.


Top
 Profile  
 PostPosted: 30 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Mithy wrote:
Code:
self:SetImmobile(true)
..and false to make it mobile again.

So there is a SetImmobile command =p BlackOps would of benifited from that with their old basilisk XD Thanks Mithy, Now its just a matter of Balancing my Experimental Mobile Artillery XD


Top
 Profile  
 PostPosted: 31 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Ok, Onto the AI =o I tried to do it the easiest way, Like making CustomUnit support like in most mods, with a Hooked BaseManager.lua file. It somewhat works, however, The ACU doesnt move, and I get this error:

Code:
WARNING: Error running lua script: ...r - forged alliance\gamedata\lua.scd\lua\aibrain.lua(849): attempt to loop over field `?' (a nil value)
         stack traceback:
            ...r - forged alliance\gamedata\lua.scd\lua\aibrain.lua(849): in function `EvaluateAIPlanList'
            ...r - forged alliance\gamedata\lua.scd\lua\aibrain.lua(838): in function <...r - forged alliance\gamedata\lua.scd\lua\aibrain.lua:829>


Would the problem be in my BaseManager file?


Top
 Profile  
 PostPosted: 31 Jul, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
Again, it gives you the exact line number of the error. Figure out what that line is trying to do, and trace it back until you find the table/data that it's missing.


Top
 Profile  
 PostPosted: 31 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
I got it to load successfully. No Errors. However, the darn ACU still doesnt do anything X-x


Top
 Profile  
 PostPosted: 31 Jul, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
The AI code is pretty expansive, and there are faction-specific plans, items, etc in many files. If there aren't any guides for adding AI support for a faction, you'll have to browse through all of the files in /AI and find any faction-specific data that needs to be added.


Top
 Profile  
 PostPosted: 31 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Mithy wrote:
The AI code is pretty expansive, and there are faction-specific plans, items, etc in many files. If there aren't any guides for adding AI support for a faction, you'll have to browse through all of the files in /AI and find any faction-specific data that needs to be added.

There is no guide... And I have looked for all the faction specific stuff... Theres weeks of work there that needs to be done X-x

Guess that means I need to wait for Nomads to come out, and use their AI for the Ordos. (Less incompatability issues then I think?)


Top
 Profile  
 PostPosted: 04 Aug, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
I have a small impact issue with the ordos. Im not sure how it effects Multiplayer, but it seems that whenever the SCU is spawned, and when the new BuildShader effect is used, the game 'stops' for half a second, and resumes like normal. The other factions do not cause this type of problem.

Any ideas as to what is causing it?

(Note: The Current Ordos Version has this problem only with the SCU)


Top
 Profile  
 PostPosted: 04 Aug, 2011 
 

Joined: 02 Jul, 2010
Posts: 1261
Offline
Looking at the effect you posted could be putting a strain on the engine what did u do to make the shader why didn't u just copy cybran one and change the colour?

_________________
Creator of SupCom2
Revamp Expansion Mod
Image
Image
Image


Top
 Profile  
 PostPosted: 04 Aug, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
liveordie wrote:
Looking at the effect you posted could be putting a strain on the engine what did u do to make the shader why didn't u just copy cybran one and change the colour?

Changing the Colour would require adding a new part to the mesh.fx becuase the colour of the cybran effect is determined by the shaders themselves. So Unless someone makes a new shader, Im gonna be sticking with the one I have.

If I knew how to port over the Shader effects (Build effect/Shield) from SC2 to FA, I would do it in a flash.


Top
 Profile  
 PostPosted: 04 Aug, 2011 
 

Joined: 02 Jul, 2010
Posts: 1261
Offline
Well if you find out what shader works the effect changing the color should be easy? you can replace that file cant you?

_________________
Creator of SupCom2
Revamp Expansion Mod
Image
Image
Image


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 10  Next



Quick Tools

Search for:
Jump to:  
cron

© 2002-2010 Gas Powered Games Corp. All Rights Reserved. Gas Powered Games is the exclusive trademark of Gas Powered Games Corp.
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
 
Home| Games | Company | News & Press | Support
  Terms of Use   |    Copyright Information   |    Privacy Policy