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

Forum Info
Forum Members: 18,604
Total Threads: 8,693
Posts: 94,827

Administrators:
DeeZire, Redemption

There are currently 37 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements


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

Reply
 
LinkBack Thread Tools
Old 03-03-2006, 07:19 PM   #1 (permalink)
Member
 
Join Date: Nov 2003
Posts: 47
Send a message via MSN to Xenomorph
Default Getting an object to fire, then die

I am trying to figure out how to make an object created by a superpower to fire its weapon once, then die. So far I have tried making the weapon fire when the object dies, but I can't seem to find the command that forcibly kills an object after a set amount of time.
Xenomorph is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-03-2006, 11:36 PM   #2 (permalink)
Senior Member
 
Join Date: Aug 2004
Posts: 216
Send a message via AIM to Cboidy8888
Default

well i s'pose you could make the weapon have an ocl that creates something with a constant firing weapon that kills the thing that fired it

but thats a bit complicated
Cboidy8888 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-04-2006, 12:25 AM   #3 (permalink)
Member
 
Join Date: Nov 2003
Posts: 47
Send a message via MSN to Xenomorph
Default

I was sure there was a module that would kill it's host after a specified amount of time. That would be my ideal answer.
Xenomorph is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-04-2006, 04:57 AM   #4 (permalink)
Senior Member
 
Join Date: Dec 2003
Posts: 217
Default

I think LifetimeUpdate kills (not deletes, important difference) an object after a certain period of time.
sc4freak is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-04-2006, 11:39 AM   #5 (permalink)
Senior Member
 
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
Send a message via ICQ to CodeCat Send a message via MSN to CodeCat
Default

Use a FireOCL to spawn an object when the weapon is fired. The object that is created should have a LifetimeUpdate with a lifetime of 1. This object then uses FireWeaponWhenDeadBehavior to destroy the parent object. Make sure not to make the damage radius too big (even 0.5 is enough) to prevent it from also blowing up other nearby units.
CodeCat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-04-2006, 02:20 PM   #6 (permalink)
Senior Member
 
Join Date: Jun 2003
Location: Germany
Posts: 363
Send a message via ICQ to Dibelius
Default

the best 2 possibilities are:

- via LifetimeUpdate, as long as this object DOESN'T use a WeaponSet (objects with both in the code can't use the weapon of the WeaponSet tag)

- via FireWeaponUpdate (e.g. the ECM and microwave tanks have these)
You only have to define a weapon like this:

Code:
Weapon SpecialPowerKillObjectWeapon
  PrimaryDamage              = 1
  PrimaryDamageRadius        = 10
  AttackRange                = 15
  DamageType                 = MELEE ;I chose this type for no visual effects at death
  DeathType                  = NORMAL
  WeaponSpeed                = 999999
  RadiusDamageAffects        = SELF SUICIDE
  DelayBetweenShots          = 1000 ;the time between 1st and 2nd hit (here 1 sec)
  ClipSize                   = 2
  ClipReloadTime             = 0
  AutoReloadsClip            = No
End
How this works:
The weapon fires once immediately when the object exists but DOESN'T kill it. "DelayBetweenShots" defines when the second and final hit comes and "ClipSize" of 2 makes it possible that this suicide weapon needs a second shot to really destroy the object.
Maybe you must play a little bit with the hit points of the object (but I don't think so). That means you definetly need an "ActiveBody" tag.
Dibelius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-04-2006, 05:24 PM   #7 (permalink)
Member
 
Join Date: Nov 2003
Posts: 47
Send a message via MSN to Xenomorph
Default

Thanks much.
Xenomorph 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
Object replacement Aut665 Generals & Zero Hour Editing 6 04-26-2005 04:39 AM
Possible? New Spellbook Object? Hostile LOTR: Battle For Middle Earth I & II Editing 18 02-10-2005 01:39 AM
object code GTS Generals & Zero Hour Editing 2 07-17-2004 08:00 PM
Object creation Vengence Generals & Zero Hour Editing 9 05-20-2004 06:59 AM
Fire object Prism128 Generals & Zero Hour Editing 4 07-22-2003 10:46 AM


All times are GMT -4. The time now is 05:51 PM.


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