is it possible at all to give unit say for 5 seconds faster speed and then back to normal?
i can't find any mechanically close unit as example, so can imagine only "create obj inside > status weapon > unit reacts on status weapon with change of locomotor to fast > internal obj die-status-weapon > unit reacts with change back to normal" and even this i can't manage to work.../
any ideas, hints, other variants?
Posted by: renaissance - Sunday, May 13, 2018 11:36:10 AM
This post might give you a clue :)
[url]http://www.cnclabs.com/forums/cnc_postst14897_Change-unit-locomotor-with-bike-logic.aspx[/url]
Posted by: rey - Sunday, May 13, 2018 4:18:49 PM
[quote=renaissance;147572]This post might give you a clue :)
[url]http://www.cnclabs.com/forums/cnc_postst14897_Change-unit-locomotor-with-bike-logic.aspx[/url][/quote]actually the unit i want to modify for start is exactly using bike-logic, but i can't understand how to switch drivers automatically with timed delay.
for example i'd wish to make Red Guard run faster for 5 seconds when switched to bayonet. why not simply faster locomotor for whole bayonet-driver?= that would be free fast travel for Red Guards masses, basically cheating, while i wish for timed rush ability to fast shorten the distance on attack.
i was thinking about creating internal object to grant upgrade on drivers switch and same delete upgrade on obj auto-destroy, but apparently there is no way to transfer granted per-unit upgrade to parent unit, only if that upgrade is global.
Posted by: renaissance - Sunday, May 13, 2018 10:13:42 PM
Bear with me, it's been a loooong time since I've touched this game, but this is how I think you can do it.
- have your upgrade simultaneously update the locomotor to fast and spawn a dummy weapon with a time delay
- at the end of the timer the weapon/projectile dies
- have that weapon's death (I forget the term) reset the locomotor
Well , as a matter of the fact I've also been looking to switch a unit's speed between Fast , Normal & Slow .
In my opinion the logic we need is to change the unit , replace it with another which will die in 5 seconds and when dead the OCL will replace it with the original one again .
I'll try to figure an exact solution out for this but until then this is how it works I guess .
EDIT :
I think the way "renaissance" means is similar to American Drons .
They will be spawned by the Upgrade and when die , They'll take out the Upgrade with themselves .
This is actually much more efficient than my way .
Posted by: rey - Monday, May 14, 2018 1:20:06 PM
[quote=Unknown Editor;147576]They will be spawned by the Upgrade and when die , They'll take out the Upgrade with themselves .
This is actually much more efficient than my way .[/quote]
but how this "additional" unit/obj must be created to grant/remove per-unit upgrade? that is issue i can't find an answer. to create internal obj or invisible drone that will grant upgrade for parent-unit and remove it or grant new on delayed death would be great - but How??
Posted by: renaissance - Tuesday, May 15, 2018 9:27:06 PM
To say I'm rusty is an understatement. I haven't touched the INIs in over a decade. I wish I could help but I can't remember.
First we'll need a Command Button with the appropriate image , then set the properties of command button :
If you ask me , you'll need to use a special power instead to give it a cool down .
But with this , You should then use a new unit with everything same to the main unit but the Locomotor .
I will try to find a way to skip requiring a new unit but if I can't then we'll need one .
[code=plain]
ObjectCreationList OCL_SpeedBoost
CreateObject
ObjectNames = SpeedBoost
Disposition = LIKE_EXISTING
Count = 1
IgnorePrimaryObstacle = Yes
RequiresLivePlayer = Yes
End
End
SpecialPower SpecialPowerCommunicationsDownload
Enum = SPECIAL_COMMUNICATIONS_DOWNLOAD
ReloadTime = 25000 ; 25 Seconds
PublicTimer = No
InitiateSound = NoSound
End
CommandButton GC_Slth_Command_UpgradeGLAQuadCannonSnipeGun
Command = OBJECT_UPGRADE ;SPECIAL_POWER
;SpecialPower = SpecialPowerCommunicationsDownload
Upgrade = GC_Slth_Upgrade_GLAQuadCannonSnipe
Options = OK_FOR_MULTI_SELECT
TextLabel = CONTROLBAR:SpeedBoost
DescriptLabel = CONTROLBAR:ToolTipSpeedBoost
ButtonImage = SUSnipBull
ButtonBorderType = ACTION
End
Upgrade GC_Slth_Upgrade_GLAQuadCannonSnipe
DisplayName = UPGRADE:SpeedBoost
BuildTime = 0.0
BuildCost = 0
ButtonImage = SUSnipBull
End
MappedImage SUSnipBull ; Rank_Private_USA
Texture = SCShellUserInterface512_006.tga
TextureWidth = 512
TextureHeight = 512
Coords = Left:237 Top:163 Right:397 Bottom:323
Status = NONE
End
CommandSet GenericRunCommandSet ; at list untill we add other commands
1 = GC_Slth_Command_UpgradeGLAQuadCannonSnipeGun
End
Object AmericaInfantryRanger ; Take Ranger as the Test Object
AddModule
;Behavior = OCLSpecialPower ModuleTag_SpeedBoost
; SpecialPowerTemplate = SpecialPowerCommunicationsDownload
; OCL = OCL_SpeedBoost
;End
Behavior = ObjectCreationUpgrade ModuleTag_SpeedBoost
TriggeredBy = GC_Slth_Upgrade_GLAQuadCannonSnipe
UpgradeObject = OCL_SpeedBoost
End
Behavior = LocomotorSetUpgrade ModuleTag_BoostTriggger
TriggeredBy = GC_Slth_Upgrade_GLAQuadCannonSnipe
End
Behavior = ProductionUpdate ModuleTag_Productive
;No Data
End
End
CommandSet = GenericRunCommandSet
UpgradeCameo5 = GC_Slth_Upgrade_GLAQuadCannonSnipe
Locomotor = SET_NORMAL BasicHumanLocomotor
Locomotor = SET_NORMAL_UPGRADED ColonelBurtonGroundLocomotor
End
Object SpeedBoost
AddModule
Body = HighlanderBody ModuleTag_BODY
MaxHealth = 1.0
InitialHealth = 1.0
End
Behavior = UpgradeDie ModuleTag_UpgradeUndo
DeathTypes = ALL
UpgradeToRemove = GC_Slth_Upgrade_GLAQuadCannonSnipe
End
Behavior = SlavedUpdate ModuleTag_Slave
StayOnSameLayerAsMaster = Yes
End
Behavior = LifetimeUpdate ModuleTag_DeathTime
MinLifetime = 5000
MaxLifetime = 5000
End
Behavior = DestroyDie ModuleTag_Death
;No Data
End
End
KindOf = PRELOAD
End
[/code]
WORKS : FALSE
STATUS : UNDER_CONSTRUCTION
Please give me information about what unit is it so , I can continue .
Posted by: rey - Friday, May 18, 2018 4:25:14 PM
[quote=Unknown Editor;147592]Please give me information about what unit is it so , I can continue .[/quote]
my starting goal was to give Red Guard charge ability when switched to bayonet - so after weapon switch for few seconds unit runs faster. that's why to give simply second locomotor is not good as that would be a fast-travel-cheat. and to create new unit may be tricky as that can create more bugs with transferring units conditions, plus unit stops on creation canceling "charge" itself.
Posted by: Unknown Editor - Saturday, May 19, 2018 2:20:35 AM
Hey guys , I've got you good news : GAME ENGINE does not meet the minimium requirements [grin]
Sorry , But there seems to be only 1 way to set the locomotor back and that's only with scripts .
I've taken 5 tries and all failed where we should have gotten the speed back to normal .
All due to the Engine's lack of Support .
Here is all I've done and failed ; I'll try other ways if possible but these may help you guys find other solutions for this speed issues .
HOPE THIS CAN ACTUALLY HELP : [ATTACH]2148[/Attach]
Posted by: rey - Saturday, May 19, 2018 8:20:13 AM
@Unknown Editor thanks for trying. well no way is an answer too, at least i'll know that it's not possible, though logical variant with internal sub-obj granting 2 upgrades on creation and death seems so close to real.
Posted by: Unknown Editor - Monday, May 21, 2018 1:50:48 AM
Well , I'm actually heading for new ways ; If I have learned sth from this world , It's there is always a way in .
Of course there should be a way for this too ; I'll just need to find a working methode .
And nothing will stop this one , not even the Game engine (as it actually blocked the last one for NO REASON)
Posted by: rey - Monday, May 21, 2018 6:57:20 PM
[quote=Unknown Editor;147607]And nothing will stop this one , not even the Game engine (as it actually blocked the last one for NO REASON)[/quote]that's most irritating when it crashes with no explanation other then "serious error" or some memory address link.
Well , I actually know how to handle this crashes , All I can't see is why won't some coded units just work as coded ; for example : some won't die , some won't make any difference , some will play as NOT_COLLIDE while they are tottally COLLIDE