Forged Alliance Forever Forged Alliance Forever Forums 2015-04-01T23:59:03+02:00 /feed.php?f=41&t=9662 2015-04-01T23:59:03+02:00 2015-04-01T23:59:03+02:00 /viewtopic.php?t=9662&p=97477#p97477 <![CDATA[Re: Water modifier]]>
i make crazy number of mistake in code. that was reason why it was not working. but already it is done, i hope everything work fine, and in vault its last version of hover_rework v10 mode

Statistics: Posted by Ithilis_Quo — 01 Apr 2015, 23:59


]]>
2015-03-30T18:41:19+02:00 2015-03-30T18:41:19+02:00 /viewtopic.php?t=9662&p=97340#p97340 <![CDATA[Re: Water modifier]]>
Here is a quick mod using the script Krapougnak posted. I do not know if you have a format issue Ithilis, so compare what I have to what you have. The mod works for both the Aurora and Blaze. You can replicate it to all the other hover units accordingly.

A note on testing this mod using the cheat unit spawn menu; make sure you spawn your hover units on land. If you spawn your hover units on water they will move the same speed as if on land. Why? Because there was not a layer change. The function is only called when there is a layer change (land moving onto water). So if you have a mod that allows the Tempest to build all hover units *cough*like I made*cough* then the hover units will move at land speed when they are built in water. Transporting hover units from land onto water works fine.

Also this is a bug with the Megalith as well. If you build a Megalith in water it will not get its water speed bonus until it moves onto land and back into water. Try racing a Megalith built (or spawn) on land and one built (or spawned) under water. Move the land built Megalith under water and race the two and you will see that it wins. To fix that we just need to add some lines from OnLayerChange to OnStopBeingBuilt in the Megaliths script.

Also, in the mod I had posted you will see a file mod_units.lua. In your second bit of code you had added the WaterSpeedMultiplier to the blueprint file. Now in Krapougnak’s posted code you will see that is not needed because it is set directly in the function. You can use a blueprint merge as I have created so that you only add what you need to the blueprint file. It plays nice with other mods and cuts down on the number of files (and possible mistakes). You will need to edit Krapougnak’s posted code to get that data from the blueprint. The Megalith’s script has a good example to follow.

Statistics: Posted by The Mak — 30 Mar 2015, 18:41


]]>
2015-03-29T15:48:36+02:00 2015-03-29T15:48:36+02:00 /viewtopic.php?t=9662&p=97283#p97283 <![CDATA[Re: Water modifier]]>
Code:
#****************************************************************************
#**
#**  File     :  /data/units/XAL0203/XAL0203_script.lua
#**  Author(s):  Jessica St. Croix
#**
#**  Summary  :  Aeon Assault Tank Script
#**
#**  Copyright © 2007 Gas Powered Games, Inc.  All rights reserved.
#****************************************************************************
local AHoverLandUnit = import('/lua/aeonunits.lua').AHoverLandUnit
local ADFQuantumAutogunWeapon = import('/lua/aeonweapons.lua').ADFQuantumAutogunWeapon

XAL0203 = Class(AHoverLandUnit) {
    Weapons = {
        MainGun = Class(ADFQuantumAutogunWeapon) {}
    },
   OnLayerChange = function(self, new, old)
        AHoverLandUnit.OnLayerChange(self, new, old)
        if( old != 'None' ) then
            if( new == 'Land' ) then
              self:SetSpeedMult(1)
            elseif( new == 'Water' ) then
                self:SetSpeedMult(.5)
            end
        end
    end,
}
TypeClass = XAL0203


set up number 0.5 for be easy visible if it work, Also on blue print of blaze i take
Code:
Physics = {
        BankingSlope = 0,
        BuildOnLayerCaps = {
            LAYER_Air = false,
            LAYER_Land = true,
            LAYER_Orbit = false,
            LAYER_Seabed = false,
            LAYER_Sub = false,
            LAYER_Water = false,
        },
        DragCoefficient = 0.2,
        Elevation = 0.15,
        MaxAcceleration = 4,
        MaxBrake = 4,
        MaxSpeed = 4,
        MaxSpeedReverse = 0,
        MaxSteerForce = 20,
        MeshExtentsX = 1,
        MeshExtentsY = 0.5,
        MeshExtentsZ = 1,
        MinSpeedPercent = 0,
        MotionType = 'RULEUMT_Hover',
        RotateBodyWhileMoving = true,
        RotateOnSpot = false,
        TurnFacingRate = 120,
        TurnRadius = 0,
        TurnRate = 90,
   WaterSpeedMultiplier = 0.5


waterspeedmultilier (that i copypast from megalith).

co i copypast all file from blaze folder, change this think and it doenst work :( speed is same on land as on water.

Statistics: Posted by Ithilis_Quo — 29 Mar 2015, 15:48


]]>
2015-03-29T08:53:21+02:00 2015-03-29T08:53:21+02:00 /viewtopic.php?t=9662&p=97270#p97270 <![CDATA[Re: Water modifier]]>
Code:
UAL0201 = Class(AHoverLandUnit) {
    Weapons = {
        MainGun = Class(ADFDisruptorCannonWeapon) {}
    },
   
   OnLayerChange = function(self, new, old)
        AHoverLandUnit.OnLayerChange(self, new, old)
        if( old != 'None' ) then
            if( new == 'Land' ) then
              self:SetSpeedMult(1)
            elseif( new == 'Water' ) then
                self:SetSpeedMult(.7)
            end
        end
    end,
TypeClass = UAL0201
}

Statistics: Posted by Krapougnak — 29 Mar 2015, 08:53


]]>
2015-03-28T15:10:44+02:00 2015-03-28T15:10:44+02:00 /viewtopic.php?t=9662&p=97236#p97236 <![CDATA[Water modifier]]>
have make this mod -> viewtopic.php?f=42&t=9629 "Hover_rework" that change hover units, but dont know how to add watterSpeedModifier for let units be slower on water as are on land. But not generaly all hover units, but only T2 hover/amphibious units, for different numbers (blaze/yenze speed 4->3 on water, wagner 3,7->4 ripdite 3,4->3 on water).

Can someone take my advice where i can change it, and how add this stuff ?

Statistics: Posted by Ithilis_Quo — 28 Mar 2015, 15:10


]]>