logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,575
Total Threads: 8,656
Posts: 94,426

Administrators:
DeeZire, Redemption

There are currently 65 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements

DeeZire Online > Editing Community > Command and Conquer Editing > Generals & Zero Hour Editing » Getting a unit to fire a weapon upon construction

Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here.

Reply
 
LinkBack Thread Tools
Old 02-01-2006, 08:41 PM   #1 (permalink)
Senior Member
 
Join Date: Mar 2003
Location: Rep. of Ireland
Posts: 373
Default Getting a unit to fire a weapon upon construction

The use I have for this is complicated, so I'm cutting to the chase, I simply need to get a unit to fire a weapon upon just being built, the strange thing is, either the weapon doesn't go off or it doesn't do any damage, have a look at the code for the unit in question, Im using black lotus as a placeholder graphic....

Code:
Object SpecialSystemUnit


  VisionRange     = 0.0
  EditorSorting   = VEHICLE

  Draw = W3DModelDraw ModuleTag_01

    OkToChangeModelColor = Yes
    
    ; --- idle
    DefaultConditionState
      Model             = NIHERO_SKN
      IdleAnimation     = NIHERO_SKL.NIHERO_STA 0 17
      IdleAnimation     = NIHERO_SKL.NIHero_IDA
      IdleAnimation     = NIHERO_SKL.NIHero_IDB
      AnimationMode     = ONCE
      ;TransitionKey     = TRANS_Stand
    End
  End
  ;Draw = W3DModelDraw ModuleTag_NOTREALLYADRAW

  ;  DefaultConditionState
  ;    Model = None
      ;ParticleSysBone = None
  ;  End
  ;End

  Behavior = AIUpdateInterface ModuleTag_04
     AutoAcquireEnemiesWhenIdle = No
  End

  Locomotor = SET_NORMAL BasicHumanLocomotor

  TransportSlotCount  = 1
  MaxSimultaneousOfType = 1
  BuildCost             = 1
  BuildTime             = 1.0
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY SCORE PARACHUTABLE;NO_COLLIDE UNATTACKABLE INERT

  UnitSpecificSounds
    VoiceCreate     = RedGuardVoiceCreate
  End

  ArmorSet
    Conditions           = None
    Armor                = PrimaryBuildingArmor
    DamageFX             = TankDamageFX
  End

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY SpecialSystemWeapon
  End

  Body = ActiveBody ModuleTag_01
    MaxHealth = 10    
    InitialHealth = 10
  End

  Behavior = FireWeaponUpdate ModuleTag_99
    Weapon = SpecialSystemWeapon
    InitialDelay = 10
  End

  Geometry = CYLINDER
  GeometryMajorRadius = 7.0
  GeometryMinorRadius = 7.0
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14;
  ShadowSizeY = 14;
  ShadowTexture = ShadowI;
  BuildCompletion = APPEARS_AT_RALLY_POINT

End
And the weapon...

Code:
Weapon SpecialSystemWeapon
  LeechRangeWeapon = Yes
  AttackRange = 1.0
  PrimaryDamage = 999999.0 
  PrimaryDamageRadius = 1.0 
  DamageDealtAtSelfPosition = Yes 
  RadiusDamageAffects = ALLIES 
  DamageType = POISON
  DeathType = EXTRA_2 ; Very important for this to work
  WeaponSpeed = 99999.0 
  DelayBetweenShots = 0 
  ClipSize = 1 
  ClipReloadTime = 0 
  AutoReloadsClip = No 
End
Any thoughts? personally I think this is just one of those SAGE engine bugs, for instance OCLs can behave very differently depending what module you use for them, its something along those lines...
Waraddict is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-04-2006, 09:55 AM   #2 (permalink)
Senior Member
 
Join Date: May 2004
Posts: 144
Default

I think you need to setup the vision range up (You have the ATTACK_NEEDS_LINE_OF_SIGHT Kindof in there. )T0o but keep the shroud clearing range down to what you want. (I didn't see the shroud clearing range declared in there.)
Thinimus is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-04-2006, 11:41 AM   #3 (permalink)
Senior Member
 
Join Date: Mar 2003
Location: Rep. of Ireland
Posts: 373
Default

weapon is actually set off through the fireweaponupdate module but you may be right there, it may still be treated as an attack...
Waraddict is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-04-2006, 12:25 PM   #4 (permalink)
Member
 
Join Date: Dec 2005
Posts: 82
Send a message via MSN to EchoMods.com
Default

very cool!
EchoMods.com is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-04-2006, 12:25 PM   #5 (permalink)
Member
 
Join Date: Dec 2005
Posts: 82
Send a message via MSN to EchoMods.com
Default

good ideas
EchoMods.com is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-04-2006, 02:28 PM   #6 (permalink)
Senior Member
 
Join Date: Mar 2003
Location: Rep. of Ireland
Posts: 373
Default

Erm, you don't even know what I'm using it for... heheh

thanks anyway
Waraddict is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-05-2006, 06:22 PM   #7 (permalink)
Member
 
Join Date: Feb 2006
Location: Kidderminster
Posts: 57
Default

I might be wrong, but these must conflict somewhere and in some way, or otherwise give rise to a problem?

VisionRange = 0.0
EditorSorting = VEHICLE

KindOf = INFANTRY PARACHUTABLE

RadiusDamageAffects = ALLIES
Mere_Mortal is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-06-2006, 06:54 AM   #8 (permalink)
Senior Member
 
Join Date: Mar 2003
Location: Rep. of Ireland
Posts: 373
Default

I haven't had time to try out the suggested corrections yet, but I can tell you that radiusdamageaffects = ALLIES is deliberate, as I have said, its part of a very complicated system I'm trying to work out...

thinking about it now, LeechRangeWeapon may also have a large effect on the weapon...

I'll get back to everyone once I've tried your suggestions, I appreciate your help very much, if this works I may have an interesting treat for the coding community.
Waraddict is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-06-2006, 11:01 AM   #9 (permalink)
Member
 
Join Date: Feb 2006
Location: Kidderminster
Posts: 57
Default

Fair play, and good luck
Mere_Mortal is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unit won't fire Weapon2 EmpirioN Red Alert 2 & Yuri's Revenge Editing 8 12-17-2007 08:36 AM
Hacker Unit Weapon tesla3090 Red Alert 2 & Yuri's Revenge Editing 12 08-22-2004 06:07 AM
Can infantry in Zero Hour properly fire a laser weapon? Kuja Generals & Zero Hour Editing 1 12-21-2003 02:27 AM
HELP!!!!!!!!!!!!!!!!!!!!!!! Creating new unit and weapon Nuker Generals & Zero Hour Editing 1 03-27-2003 10:10 PM
Bulldozer (or construction unit) Building Menu gatekeep2 Generals & Zero Hour Editing 4 02-25-2003 03:31 AM


All times are GMT -4. The time now is 12:03 AM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.