rey
  • rey
  • 52.5% (Neutral)
  • Major Topic Starter
7 years ago
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?
Sponsor
rey
  • rey
  • 52.5% (Neutral)
  • Major Topic Starter
7 years ago

This post might give you a clue :)
http://www.cnclabs.com/forums/cnc_postst14897_Change-unit-locomotor-with-bike-logic.aspx 

Originally Posted by: renaissance 

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.

renaissance
7 years ago
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
UserPostedImage
Unknown Editor
7 years ago
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 .
Asking is Not a Problem , Problem is Not to Know Something .
Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
rey
  • rey
  • 52.5% (Neutral)
  • Major Topic Starter
7 years ago

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 .

Originally Posted by: Unknown Editor 


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??

renaissance
7 years ago
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.
UserPostedImage
Unknown Editor
7 years ago
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 .


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

WORKS : FALSE
STATUS : UNDER_CONSTRUCTION

Please give me information about what unit is it so , I can continue .
Asking is Not a Problem , Problem is Not to Know Something .
Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
rey
  • rey
  • 52.5% (Neutral)
  • Major Topic Starter
7 years ago

Please give me information about what unit is it so , I can continue .

Originally Posted by: Unknown Editor 


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.

Unknown Editor
7 years ago
Hey guys , I've got you good news : GAME ENGINE does not meet the minimium requirements 😁

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 :   Speed_Test.zip (10kb) downloaded 11 time(s).
Asking is Not a Problem , Problem is Not to Know Something .
Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
rey
  • rey
  • 52.5% (Neutral)
  • Major Topic Starter
7 years ago
@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.
Unknown Editor
7 years ago
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)
Asking is Not a Problem , Problem is Not to Know Something .
Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
rey
  • rey
  • 52.5% (Neutral)
  • Major Topic Starter
7 years ago

And nothing will stop this one , not even the Game engine (as it actually blocked the last one for NO REASON)

Originally Posted by: Unknown Editor 

that's most irritating when it crashes with no explanation other then "serious error" or some memory address link.

Unknown Editor
7 years ago
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
Asking is Not a Problem , Problem is Not to Know Something .
Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
Users browsing this topic