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

Forum Info
Forum Members: 18,537
Total Threads: 8,627
Posts: 94,209

Administrators:
DeeZire, Redemption

There are currently 117 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 09-09-2007, 07:34 AM   #1 (permalink)
Junior Member
 
Join Date: Sep 2006
Posts: 4
Default Unit Limit Problem

I have just started modding for the first time, and I have a rather complicated problem. I have a dummyunit that calls an OCL that drops a unit on the battlefield, this all works fine, but I want to put a limit on the amount of that unit that you can build. I cant put the limit on the unit itself, because it is created by the OCL and I cant put the limit on the Dummyunit because it dies after 3 seconds (so it doesnt call the OCL more than once). Any suggestions?
sarge_3rdE is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-09-2007, 04:46 PM   #2 (permalink)
Senior Member
 
CommieDog's Avatar
 
Join Date: Oct 2004
Location: Alaska (Hell Frozen Over)
Posts: 368
Default

Are you trying to impose a build limit of 1 or something else?
CommieDog is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-12-2007, 08:21 AM   #3 (permalink)
Junior Member
 
Join Date: Sep 2006
Posts: 4
Default

Yes, im referring to limiting it to 1.

For Example, a tank

I have a unit that drops tank a on the battlefield then dies, but I want a limit on tank A not that unit, because that unit dies 3 seconds after it is created
sarge_3rdE is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-12-2007, 10:14 PM   #4 (permalink)
Senior Member
 
CommieDog's Avatar
 
Join Date: Oct 2004
Location: Alaska (Hell Frozen Over)
Posts: 368
Default

You'll need to change the code a bit so that the object you build is persistent but spawns a second sort of object that spawns the tank and quickly dies. You need to apply the build limit to the first (persistent) object and have the tank fire a weapon upon death with a special damage type that kills the persistent spawner object as well, allowing you to build another (wich will, in turn, allow you to spawn another tank-spawning object).
CommieDog is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-13-2007, 02:13 AM   #5 (permalink)
Junior Member
 
Join Date: Sep 2006
Posts: 4
Default

thankls heaps, but remember im brand new to modding, and I dont know how to code that.

I have the unit that is persistent, but how do I make it take damage only from the tank, and how do I make that tank fire a weapon when it dies?
sarge_3rdE is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-13-2007, 10:54 PM   #6 (permalink)
Senior Member
 
CommieDog's Avatar
 
Join Date: Oct 2004
Location: Alaska (Hell Frozen Over)
Posts: 368
Default

You need to give your persistent object an ArmorSet that includes an Armor that has Armor = DEFAULT 0% set so it will take no damage from most weapons and also has Armor = HACK 100% (I'm using HACK because it is unused in Generals and ZH) set so that it will take damage from your tank's death weapon. Of course, you'll need to set Armor = HACK 0% on every other Armor in Armor.ini so that the weapon won't damage everything on the map.

As for having objects fire weapons when they die, look at the Bonb Truck code for an example.
CommieDog is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-14-2007, 04:35 AM   #7 (permalink)
Junior Member
 
Join Date: Sep 2006
Posts: 4
Default

Thanks Heaps! You have been a great help, it all works fine!
sarge_3rdE 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
Solution to the 100 unit limit on the VehicleTypes list Whiteboy Red Alert 2 & Yuri's Revenge Editing 21 10-14-2004 07:46 AM
Building and unit problem csraven Generals & Zero Hour Editing 2 08-24-2003 12:13 PM
Problem with new unit el-pape Generals & Zero Hour Editing 16 06-10-2003 09:12 AM
Weapons limit per unit... Etherealsilk Generals & Zero Hour Editing 1 04-28-2003 12:44 AM
Odd.. breaking the 103 unit limit = Internal error? rotten78 Red Alert 2 & Yuri's Revenge Editing 9 03-01-2003 11:33 PM


All times are GMT -4. The time now is 11:22 AM.


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