IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
OverlordContain on Buildings
Darky
post 18 Sep 2014, 9:22
Post #1



Group Icon

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?
Go to the top of the page
 
+Quote Post
Zeke
post 19 Sep 2014, 13:53
Post #2


The X General
Group Icon

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


--------------------
Go to the top of the page
 
+Quote Post
Darky
post 19 Sep 2014, 14:40
Post #3



Group Icon

Group: Members
Posts: 791
Joined: 15 January 2013
Member No.: 9643



QUOTE (Zeke @ 19 Sep 2014, 14:53) *
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
Go to the top of the page
 
+Quote Post
Admiral*Alex
post 20 Sep 2014, 1:26
Post #4



Group Icon

Group: Members
Posts: 381
Joined: 24 March 2013
From: Wyoming, Michigan, USA
Member No.: 9872
'Ex'-American Tanker figthing for the ECA



QUOTE (DarkyPwnz @ 19 Sep 2014, 9:40) *
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
Go to the top of the page
 
+Quote Post
Darky
post 20 Sep 2014, 12:42
Post #5



Group Icon

Group: Members
Posts: 791
Joined: 15 January 2013
Member No.: 9643



QUOTE (Admiral*Alex @ 20 Sep 2014, 2:26) *
Best place to look is the drone logic on US Vehicles/US Drones.


Obviously, but either I am missing something or I couldnt find the proper module
Go to the top of the page
 
+Quote Post
Darky
post 22 Sep 2014, 15:02
Post #6



Group Icon

Group: Members
Posts: 791
Joined: 15 January 2013
Member No.: 9643



Bump
Go to the top of the page
 
+Quote Post
n5p29
post 22 Sep 2014, 15:58
Post #7


Enlima Studios
Group Icon

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.


--------------------
Go to the top of the page
 
+Quote Post
Zeke
post 23 Sep 2014, 1:58
Post #8


The X General
Group Icon

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?


--------------------
Go to the top of the page
 
+Quote Post
Darky
post 23 Sep 2014, 10:09
Post #9



Group Icon

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
Go to the top of the page
 
+Quote Post
Zeke
post 23 Sep 2014, 10:18
Post #10


The X General
Group Icon

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


--------------------
Go to the top of the page
 
+Quote Post
Darky
post 23 Sep 2014, 11:22
Post #11



Group Icon

Group: Members
Posts: 791
Joined: 15 January 2013
Member No.: 9643



QUOTE (Zeke @ 23 Sep 2014, 10:18) *
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.
Go to the top of the page
 
+Quote Post
Zeke
post 23 Sep 2014, 12:34
Post #12


The X General
Group Icon

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.


--------------------
Go to the top of the page
 
+Quote Post
Darky
post 23 Sep 2014, 18:22
Post #13



Group Icon

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.
Go to the top of the page
 
+Quote Post
Darky
post 23 Sep 2014, 18:22
Post #14



Group Icon

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.
Go to the top of the page
 
+Quote Post
Zeke
post 24 Sep 2014, 0:35
Post #15


The X General
Group Icon

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


--------------------
Go to the top of the page
 
+Quote Post
Darky
post 24 Sep 2014, 7:46
Post #16



Group Icon

Group: Members
Posts: 791
Joined: 15 January 2013
Member No.: 9643



QUOTE (Zeke @ 24 Sep 2014, 0:35) *
EDIT: Try adding back the AI update module


The AI update module had just that bit and a Turret, I only deleted the turret. The game insisted that I didn't have an AI update and was trying to name a locomotor in spite of that, so I commented them out.
Go to the top of the page
 
+Quote Post
Darky
post 24 Sep 2014, 7:46
Post #17



Group Icon

Group: Members
Posts: 791
Joined: 15 January 2013
Member No.: 9643



QUOTE (Zeke @ 24 Sep 2014, 0:35) *
EDIT: Try adding back the AI update module


The AI update module had just that bit and a Turret, I only deleted the turret. The game insisted that I didn't have an AI update and was trying to name a locomotor in spite of that, so I commented them out.
Go to the top of the page
 
+Quote Post
Zeke
post 24 Sep 2014, 8:50
Post #18


The X General
Group Icon

Group: Project Leader
Posts: 2166
Joined: 7 June 2009
From: Philippines
Member No.: 73
Uniqueness is Overrated



Does your OCL have "RequiresLivePlayer = Yes"?


--------------------
Go to the top of the page
 
+Quote Post
Anubis
post 24 Sep 2014, 8:50
Post #19



Group Icon

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.
Go to the top of the page
 
+Quote Post
Darky
post 24 Sep 2014, 10:13
Post #20



Group Icon

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
Go to the top of the page
 
+Quote Post
n5p29
post 24 Sep 2014, 16:17
Post #21


Enlima Studios
Group Icon

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


--------------------
Go to the top of the page
 
+Quote Post
Darky
post 24 Sep 2014, 18:43
Post #22



Group Icon

Group: Members
Posts: 791
Joined: 15 January 2013
Member No.: 9643



QUOTE (n5p29 @ 24 Sep 2014, 16:17) *
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.
Go to the top of the page
 
+Quote Post
Zeke
post 25 Sep 2014, 1:54
Post #23


The X General
Group Icon

Group: Project Leader
Posts: 2166
Joined: 7 June 2009
From: Philippines
Member No.: 73
Uniqueness is Overrated



QUOTE (DarkyPwnz @ 25 Sep 2014, 1:43) *
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.


--------------------
Go to the top of the page
 
+Quote Post
Darky
post 25 Sep 2014, 10:43
Post #24



Group Icon

Group: Members
Posts: 791
Joined: 15 January 2013
Member No.: 9643



QUOTE (Zeke @ 25 Sep 2014, 2:54) *
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.
Go to the top of the page
 
+Quote Post
n5p29
post 25 Sep 2014, 11:15
Post #25


Enlima Studios
Group Icon

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.


--------------------
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 26 April 2024 - 9:11