OverlordContain on Buildings |
OverlordContain on Buildings |
18 Sep 2014, 9:22
Post
#1
|
|
Group: Members Posts: 791 Joined: 15 January 2013 Member No.: 9643 |
Hey so, I used OvelordContain module to give every WF a building called Any War Factory so that any WF would unlock any T2 structure when crossteching, but the problem is, it unlocks the buildings BEFORE construction is complete.
So how can I make it so that the module becomes active only after construction is complete? Or, if that can happen, how can I make it trigger after a set amount of time? |
|
|
19 Sep 2014, 13:53
Post
#2
|
|
The X General Group: Project Leader Posts: 2166 Joined: 7 June 2009 From: Philippines Member No.: 73 Uniqueness is Overrated |
CODE Behavior = ObjectCreationUpgrade ModuleTag_TechRequirement
UpgradeObject = OCL_TechRequirmentDummyDroneThingy TriggeredBy = Upgrade_SomeUpgrade End Behavior = GrantUpgradeCreate ModuleTag_TechRequirement2 UpgradeToGrant = Upgrade_SomeUpgrade ExemptStatus = UNDER_CONSTRUCTION End This post has been edited by Zeke: 19 Sep 2014, 13:53 -------------------- |
|
|
19 Sep 2014, 14:40
Post
#3
|
|
Group: Members Posts: 791 Joined: 15 January 2013 Member No.: 9643 |
CODE Behavior = ObjectCreationUpgrade ModuleTag_TechRequirement UpgradeObject = OCL_TechRequirmentDummyDroneThingy TriggeredBy = Upgrade_SomeUpgrade End Behavior = GrantUpgradeCreate ModuleTag_TechRequirement2 UpgradeToGrant = Upgrade_SomeUpgrade ExemptStatus = UNDER_CONSTRUCTION End Never mind, stupid question. Thanks! But how do I make the invisible drone die (just adding a Slaved Update didn't work) once the building is sold or destroyed? This post has been edited by DarkyPwnz: 19 Sep 2014, 19:11 |
|
|
20 Sep 2014, 1:26
Post
#4
|
|
Group: Members Posts: 381 Joined: 24 March 2013 From: Wyoming, Michigan, USA Member No.: 9872 'Ex'-American Tanker figthing for the ECA |
Never mind, stupid question. Thanks! But how do I make the invisible drone die (just adding a Slaved Update didn't work) once the building is sold or destroyed? Best place to look is the drone logic on US Vehicles/US Drones. -------------------- The Devil Brigade Commander/Commander of NATO Forces
|
|
|
20 Sep 2014, 12:42
Post
#5
|
|
Group: Members Posts: 791 Joined: 15 January 2013 Member No.: 9643 |
|
|
|
22 Sep 2014, 15:02
Post
#6
|
|
Group: Members Posts: 791 Joined: 15 January 2013 Member No.: 9643 |
Bump
|
|
|
22 Sep 2014, 15:58
Post
#7
|
|
Enlima Studios Group: Project Leader Posts: 757 Joined: 11 October 2009 From: Jakarta, Indonesia Member No.: 482 |
why don't you just use the battle drone code as the base? then you can strip anything you didn't need there.
-------------------- |
|
|
23 Sep 2014, 1:58
Post
#8
|
|
The X General Group: Project Leader Posts: 2166 Joined: 7 June 2009 From: Philippines Member No.: 73 Uniqueness is Overrated |
And maybe you could, you know, show your codes, so we can see what you're missing?
-------------------- |
|
|
23 Sep 2014, 10:09
Post
#9
|
|
Group: Members Posts: 791 Joined: 15 January 2013 Member No.: 9643 |
You're right, I do go full retard sometimes.
CODE Object AnyWarFactory
Side = AmericaLaserGeneral EditorSorting = SYSTEM TransportSlotCount = 1 DisplayName = OBJECT:AnyWarFactory ArmorSet Conditions = None Armor = InvulnerableAllArmor End VisionRange = 200 ; *** ENGINEERING Parameters *** KindOf = PRELOAD PORTABLE_STRUCTURE CAN_ATTACK CLICK_THROUGH IGNORED_IN_GUI Body = StructureBody ModuleTag_01 MaxHealth = 100.0 InitialHealth = 100.0 End Behavior = DestroyDie ModuleTag_02 ;nothing End Geometry = BOX GeometryMajorRadius = 8.0 GeometryMinorRadius = 8.0 GeometryHeight = 9.0 GeometryIsSmall = No Shadow = SHADOW_VOLUME ShadowSizeX = 89 ; minimum elevation angle above horizon. Used to limit shadow length End Object AnySupplyCenter Side = AmericaLaserGeneral EditorSorting = SYSTEM TransportSlotCount = 1 DisplayName = OBJECT:AnySupplyCenter ArmorSet Conditions = None Armor = InvulnerableAllArmor End VisionRange = 200 ; *** ENGINEERING Parameters *** KindOf = PRELOAD PORTABLE_STRUCTURE CAN_ATTACK CLICK_THROUGH IGNORED_IN_GUI Body = StructureBody ModuleTag_01 MaxHealth = 100.0 InitialHealth = 100.0 End Behavior = DestroyDie ModuleTag_02 ;nothing End Geometry = BOX GeometryMajorRadius = 8.0 GeometryMinorRadius = 8.0 GeometryHeight = 9.0 GeometryIsSmall = No Shadow = SHADOW_VOLUME ShadowSizeX = 89 ; minimum elevation angle above horizon. Used to limit shadow length End |
|
|
23 Sep 2014, 10:18
Post
#10
|
|
The X General Group: Project Leader Posts: 2166 Joined: 7 June 2009 From: Philippines Member No.: 73 Uniqueness is Overrated |
I don't see any slaved update or anything related to drones for that matter...
-------------------- |
|
|
23 Sep 2014, 11:22
Post
#11
|
|
Group: Members Posts: 791 Joined: 15 January 2013 Member No.: 9643 |
I don't see any slaved update or anything related to drones for that matter... I added one later, copied it from something else and it didn't do it on its own (that's after I just went back to my earlier build hence no slave update) What do you mean anything related to drones? That I could use. |
|
|
23 Sep 2014, 12:34
Post
#12
|
|
The X General Group: Project Leader Posts: 2166 Joined: 7 June 2009 From: Philippines Member No.: 73 Uniqueness is Overrated |
I suggest you take N5's advice and just copy/edit the battledrone's code.
-------------------- |
|
|
23 Sep 2014, 18:22
Post
#13
|
|
Group: Members Posts: 791 Joined: 15 January 2013 Member No.: 9643 |
I did, and cut some parts out.
CODE Object AnyWarFactory ; ***DESIGN parameters *** DisplayName = OBJECT:AnyWarFactory Side = America EditorSorting = VEHICLE TransportSlotCount = 0 ;how many "slots" we take in a transport (0 == not transportable) ArmorSet Conditions = None Armor = InvulnerableArmorForFlamingAndToxinIfnantry;AmericanVehicleDroneArmor DamageFX = SmallTankDamageFX End BuildCost = 200 BuildTime = 5.0 ;in seconds VisionRange = 150 ShroudClearingRange = 150 ; *** AUDIO Parameters *** VoiceSelect = NoSound VoiceMove = NoSound VoiceAttack = NoSound SoundMoveStart = NoSound UnitSpecificSounds ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs TurretMoveStart = NoSound TurretMoveLoop = TurretMoveLoop End ; *** ENGINEERING Parameters *** RadarPriority = UNIT KindOf = PRELOAD CAN_CAST_REFLECTIONS VEHICLE SELECTABLE CAN_ATTACK DRONE NO_SELECT UNATTACKABLE Body = ActiveBody ModuleTag_03 MaxHealth = 100.0 InitialHealth = 100.0 End ; Locomotor = SET_NORMAL BattleDroneLocomotor Behavior = PhysicsBehavior ModuleTag_05 Mass = 50.0 KillWhenRestingOnGround = Yes AllowBouncing = No End ;Behavior = AIUpdateInterface ModuleTag_04 ; AutoAcquireEnemiesWhenIdle = Yes ;End Behavior = SlavedUpdate ModuleTag_07 GuardMaxRange = 1 ;How far away from master I'm allowed when master is idle (doesn't wander) GuardWanderRange = 1 ;How far away I'm allowed to wander from master while guarding. AttackRange = 1 ;How far away from master I'm allowed when master is attacking a target. AttackWanderRange = 1 ;How far I'm allowed to wander from target. ScoutRange = 1 ;How far away from master I'm allowed when master is moving. ScoutWanderRange = 1 ;How far I'm allowed to wander from scout point. StayOnSameLayerAsMaster = Yes End Behavior = DestroyDie ModuleTag_08 DeathTypes = ALL End Behavior = UpgradeDie ModuleTag_12 ;This frees the object based upgrade for the producer object. DeathTypes = ALL UpgradeToRemove = Upgrade_ChinaOverlordBattleBunker ModuleTag_13 End Behavior = FlammableUpdate ModuleTag_21 AflameDuration = 5000 ; If I catch fire, I'll burn for this long... AflameDamageAmount = 3 ; taking this much damage... AflameDamageDelay = 500 ; this often. End Geometry = CYLINDER GeometryMajorRadius = 5 GeometryMinorRadius = 5 GeometryHeight = 10.0 GeometryIsSmall = Yes Shadow = SHADOW_VOLUME ShadowSizeX = 89 ; minimum elevation angle above horizon. Used to limit shadow length End The exact same thing happens (can't rebuild on the spot and unlocks persist after destruction) I don't mind the latter much, I even kinda like it, but the first is a bit of a problem. |
|
|
23 Sep 2014, 18:22
Post
#14
|
|
Group: Members Posts: 791 Joined: 15 January 2013 Member No.: 9643 |
I did, and cut some parts out.
CODE Object AnyWarFactory ; ***DESIGN parameters *** DisplayName = OBJECT:AnyWarFactory Side = America EditorSorting = VEHICLE TransportSlotCount = 0 ;how many "slots" we take in a transport (0 == not transportable) ArmorSet Conditions = None Armor = InvulnerableArmorForFlamingAndToxinIfnantry;AmericanVehicleDroneArmor DamageFX = SmallTankDamageFX End BuildCost = 200 BuildTime = 5.0 ;in seconds VisionRange = 150 ShroudClearingRange = 150 ; *** AUDIO Parameters *** VoiceSelect = NoSound VoiceMove = NoSound VoiceAttack = NoSound SoundMoveStart = NoSound UnitSpecificSounds ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs TurretMoveStart = NoSound TurretMoveLoop = TurretMoveLoop End ; *** ENGINEERING Parameters *** RadarPriority = UNIT KindOf = PRELOAD CAN_CAST_REFLECTIONS VEHICLE SELECTABLE CAN_ATTACK DRONE NO_SELECT UNATTACKABLE Body = ActiveBody ModuleTag_03 MaxHealth = 100.0 InitialHealth = 100.0 End ; Locomotor = SET_NORMAL BattleDroneLocomotor Behavior = PhysicsBehavior ModuleTag_05 Mass = 50.0 KillWhenRestingOnGround = Yes AllowBouncing = No End ;Behavior = AIUpdateInterface ModuleTag_04 ; AutoAcquireEnemiesWhenIdle = Yes ;End Behavior = SlavedUpdate ModuleTag_07 GuardMaxRange = 1 ;How far away from master I'm allowed when master is idle (doesn't wander) GuardWanderRange = 1 ;How far away I'm allowed to wander from master while guarding. AttackRange = 1 ;How far away from master I'm allowed when master is attacking a target. AttackWanderRange = 1 ;How far I'm allowed to wander from target. ScoutRange = 1 ;How far away from master I'm allowed when master is moving. ScoutWanderRange = 1 ;How far I'm allowed to wander from scout point. StayOnSameLayerAsMaster = Yes End Behavior = DestroyDie ModuleTag_08 DeathTypes = ALL End Behavior = UpgradeDie ModuleTag_12 ;This frees the object based upgrade for the producer object. DeathTypes = ALL UpgradeToRemove = Upgrade_ChinaOverlordBattleBunker ModuleTag_13 End Behavior = FlammableUpdate ModuleTag_21 AflameDuration = 5000 ; If I catch fire, I'll burn for this long... AflameDamageAmount = 3 ; taking this much damage... AflameDamageDelay = 500 ; this often. End Geometry = CYLINDER GeometryMajorRadius = 5 GeometryMinorRadius = 5 GeometryHeight = 10.0 GeometryIsSmall = Yes Shadow = SHADOW_VOLUME ShadowSizeX = 89 ; minimum elevation angle above horizon. Used to limit shadow length End The exact same thing happens (can't rebuild on the spot and unlocks persist after destruction) I don't mind the latter much, I even kinda like it, but the first is a bit of a problem. |
|
|
24 Sep 2014, 0:35
Post
#15
|
|
The X General Group: Project Leader Posts: 2166 Joined: 7 June 2009 From: Philippines Member No.: 73 Uniqueness is Overrated |
EDIT: Try adding back the AI update module
This post has been edited by Zeke: 24 Sep 2014, 0:37 -------------------- |
|
|
24 Sep 2014, 7:46
Post
#16
|
|
Group: Members Posts: 791 Joined: 15 January 2013 Member No.: 9643 |
|
|
|
24 Sep 2014, 7:46
Post
#17
|
|
Group: Members Posts: 791 Joined: 15 January 2013 Member No.: 9643 |
|
|
|
24 Sep 2014, 8:50
Post
#18
|
|
The X General Group: Project Leader Posts: 2166 Joined: 7 June 2009 From: Philippines Member No.: 73 Uniqueness is Overrated |
Does your OCL have "RequiresLivePlayer = Yes"?
-------------------- |
|
|
24 Sep 2014, 8:50
Post
#19
|
|
Group: Project Leader Posts: 892 Joined: 8 June 2009 From: Cynopolies Member No.: 97 |
The reason it's not working as you want is due to your OCL not your drone code. In fact in this code you don't even need the upgradedie behavior.
In the OCL that deployes this drone you need the following line: RequiresLivePlayer = Yes Add it in the createobject part. That should fix your problem. |
|
|
24 Sep 2014, 10:13
Post
#20
|
|
Group: Members Posts: 791 Joined: 15 January 2013 Member No.: 9643 |
CODE ObjectCreationList OCL_AnyWarFactory CreateObject Offset = X:0 Y:0 Z:10 ObjectNames = AnyWarFactory IgnorePrimaryObstacle = Yes Disposition = LIKE_EXISTING Count = 1 RequiresLivePlayer = Yes End End Well that's not it, but maybe I am missing something else? Here is the Battle Drone code for reference: CODE ObjectCreationList OCL_AmericanBattleDrone
CreateObject Offset = X:0 Y:0 Z:10 ObjectNames = AmericaVehicleBattleDrone IgnorePrimaryObstacle = Yes Disposition = LIKE_EXISTING Count = 1 RequiresLivePlayer = Yes End End |
|
|
24 Sep 2014, 16:17
Post
#21
|
|
Enlima Studios Group: Project Leader Posts: 757 Joined: 11 October 2009 From: Jakarta, Indonesia Member No.: 482 |
put back the AI module and locomotor plox?
(also funny that the topic is about OverlordContain but ended up in battle drone logic) This post has been edited by n5p29: 24 Sep 2014, 16:17 -------------------- |
|
|
24 Sep 2014, 18:43
Post
#22
|
|
Group: Members Posts: 791 Joined: 15 January 2013 Member No.: 9643 |
put back the AI module and locomotor plox? (also funny that the topic is about OverlordContain but ended up in battle drone logic) As I explained above, it doesn't work; the game accuses me of trying to give a locomotor when I don't have an AI update (even if I add in that exact same thing there back). Well that's because Zeke pointed a way that does exactly what I wanted, so I had to re-do all the code in a different way. New problems arose, so now I would like to fix them. |
|
|
25 Sep 2014, 1:54
Post
#23
|
|
The X General Group: Project Leader Posts: 2166 Joined: 7 June 2009 From: Philippines Member No.: 73 Uniqueness is Overrated |
As I explained above, it doesn't work; the game accuses me of trying to give a locomotor when I don't have an AI update (even if I add in that exact same thing there back). I've been reading this sentence over and over for the past five minutes, and I still don't understand what your saying. Did you, or did you not, uncomment the AI module AND the locomotor? If you did, did it work? If you didn't, stop acting like some kind of pro and just fukken do it. Otherwise, you can stop expecting help from anyone. -------------------- |
|
|
25 Sep 2014, 10:43
Post
#24
|
|
Group: Members Posts: 791 Joined: 15 January 2013 Member No.: 9643 |
I've been reading this sentence over and over for the past five minutes, and I still don't understand what your saying. Did you, or did you not, uncomment the AI module AND the locomotor? If you did, did it work? If you didn't, stop acting like some kind of pro and just fukken do it. Otherwise, you can stop expecting help from anyone. I did and it didn't work, and Worldbuilder whined about how I tried to add a Locomotor without an AI update and gave a runtime error. That's what I said. |
|
|
25 Sep 2014, 11:15
Post
#25
|
|
Enlima Studios Group: Project Leader Posts: 757 Joined: 11 October 2009 From: Jakarta, Indonesia Member No.: 482 |
just checked your posted code.
it seems you placed the locomotor ABOVE the AIUpdate module. you should place it BELOW to make it works. -------------------- |
|
|
Lo-Fi Version | Time is now: 26 April 2024 - 9:11 |