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 56 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 08-09-2005, 10:52 AM   #1 (permalink)
Senior Member
 
Join Date: Jun 2003
Location: Germany
Posts: 363
Send a message via ICQ to Dibelius
Default Damn Energy bug with object replacing!

this problem destroys all my plans I have...

I want to make a defense tower like the GDI had. The player shall build a base tower from which he can upgrade TWO possible upgrades. These upgrades shall replace the default base tower with the "real" tower object. So far no problem... but now the energy bug seems to destroy this plan totally.

The problem with "ReplaceObjectUpgrade" is:
Since I've upgraded the base tower to a "real" one he shall consume 1kW energy. The base tower doesn't consume energy (or later maybe yes... must be tested first). When I sell the upgraded tower the 1kW of energy won't be given back to me........ it's forever away the whole game
In tower defense mod you often must sell your buildings to get money for better towers, so it's really really important that this works correctly.

I already tried it with the "death and respawn logic via OCL" as described in this TOPIC

But it doesn't work in my case... the first reason is that I need an upgrade which cost money when you buy it (the build time, too). The other reason is that I need TWO of these upgrades for one tower. The player shall have 2 upgrade possibilities but only 1 of these shall be possible (like the Overlord upgrades).

So I tried to modify the code of the other topic a little bit... with "StatusBitsUpgrade" -> DESTROYED ---> then the replaced tower should be spawned. it doesn't work... same with negative "MaxHealthUpgrade" where I wanted to decrease the tower's health to zero... but I think the tower doesn't know that he's dead when his health is zero... I dunno.
I fear if you really can help me and the upgrade is really executable without any more bugs, the next problem would be the second alternative turret upgrade.... :/

My question now: is there a way to destroy the tower after an upgrade is done? Or maybe other ways to get it running?

I'm thankful for every tip...
Dibelius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-09-2005, 11:07 AM   #2 (permalink)
Senior Member
 
Join Date: Mar 2003
Location: Rep. of Ireland
Posts: 373
Default

Simple, throw the fire weapon button away, instead create two upgrades, and using the ObjectCreationUpgrade module, OCL the specilised death weapon.

E.g., lets say your two tower upgrades are Upgrade_GunTower and Upgrade_RPGTower, and that your two specialised weapon OCLs are OCL_GunTowerTransform and OCL_RPGTowerTransform, the ObjectCreationUpgrade code for your default tower would look like the following...

Code:
  Behavior = ObjectCreationUpgrade ModuleTag_GT
    UpgradeObject = OCL_GunTowerTransform
    TriggeredBy   = Upgrade_GunTower
    ConflictsWith = Upgrade_RPGTower
  End
  Behavior = ObjectCreationUpgrade ModuleTag_RT
    UpgradeObject = OCL_RPGTowerTransform
    TriggeredBy   = Upgrade_RPGTower
    ConflictsWith = Upgrade_GunTower
  End
The two specialised weapon OCLs would be like the following...

Code:
ObjectCreationList OCL_GunTowerTransform
  FireWeapon
    Weapon = GunTowerTransformWeapon
  End
End

ObjectCreationList OCL_RPGTowerTransform
  FireWeapon
    Weapon = RPGTowerTransformWeapon
  End
End
Now, the trick then is to just give the two special weapons different deathtypes, one could be EXTRA_2, the other EXTRA_3, and then just make sure the default object has a deathobject module for EXTRA_3 too.
Waraddict is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-09-2005, 11:27 AM   #3 (permalink)
Senior Member
 
Join Date: Jun 2003
Location: Germany
Posts: 363
Send a message via ICQ to Dibelius
Default

ok thx so far
but the DeathTypes EXTRA_2 (3,4,...) didn't work :S
but why?!



//EDIT:

I've done it with the two DeathTypes POISONED and POISONED_BETA now. But nothing happens after the upgrade is done :/



//EDIT 2:

A LOT OF THANKS TO YOU!!!!
It works completely without any bugs now. I had to modify your code a little bit but yours "the idea" to do the rest
Now after each upgrade a different object will be spawned and deleted after short time which fire a one-shot weapon via "FireWeaponUpdate". I also had to add "ALLIES" in the "RadiusDamageAffects" tag to your given weapon code. The DeathTypes EXTRA_2 and EXTRA_3 work now (I dunno why not before).

I'll add you to the credits immediately, Waraddict!!!
Dibelius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-09-2005, 07:13 PM   #4 (permalink)
Senior Member
 
Join Date: Mar 2003
Location: Rep. of Ireland
Posts: 373
Default

Thanks, it's no problem
Waraddict is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-11-2005, 03:03 AM   #5 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: Germany
Posts: 303
Default

I'm working on something similar, however I have encountered one problem with that way of coding.

You always get a "Building destroyed" score addition when switching your upgrades right?

Is there anyway to fix this without removing the "SCORE" tag completely?
2312222 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-11-2005, 06:38 AM   #6 (permalink)
Senior Member
 
Join Date: Jun 2003
Location: Germany
Posts: 363
Send a message via ICQ to Dibelius
Default

I think no....
But in my case I simply could delete the SCORE tag couse the base tower has no weapons and is not really important if it will not be counted.

But who knows... maybe there's a possibility of modifying the SCORE thing so that it will subtract 1 from the SCORE list while you play the game, e.g. a dummy object which will be spawned at the same time and subtract this point of the other unit again so that it is +/-0
Dibelius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-11-2005, 08:13 AM   #7 (permalink)
Senior Member
 
Join Date: Mar 2003
Location: Rep. of Ireland
Posts: 373
Default

I have been thinking about that also, I think the first step in the right direction is to make a killing of any object that uses this feature not valid, no point for the killer and no loss point for the owner.

What next we would want to do is to somehow give a loss point to the owner and a kill point to the killer when it is destroyed conventionally, I can think of one way to give a loss point at the moment which is to have the object spawn a sub object (which matters point wise) which then self detonates (not noticed of course).

I still need to think on somehow giving a kill point to the killer.
Waraddict is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-11-2005, 02:45 PM   #8 (permalink)
Senior Member
 
Join Date: Sep 2001
Posts: 313
Send a message via ICQ to mad ivan Send a message via MSN to mad ivan
Default

You cant get arround the SCORE thing. You`d have to make a whole new entry in the game source for that.

I suggest you use the OverlordTankDraw (naming correct?) module and attach you turrets using the overlord upgrade modules (eg. Purchase Upgrade and Get Vulcan Cannon and a sidebar change, purchase different upgrade and get RPG cannon and sidebar change, etc.)
The sidebar change is mainly of cosmetic value
mad ivan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-11-2005, 02:49 PM   #9 (permalink)
Senior Member
 
Join Date: Jun 2003
Location: Germany
Posts: 363
Send a message via ICQ to Dibelius
Default

eh dude... read this topic again.
Dibelius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-11-2005, 08:09 PM   #10 (permalink)
Senior Member
 
Join Date: Sep 2001
Posts: 313
Send a message via ICQ to mad ivan Send a message via MSN to mad ivan
Default

Did. In an unfortunately cancelled mod of mine, i got the same problem. Tried a different approach of things and it worked normally. No bugs, no nothing.

I remember i used the Overlord Draw Module. Can`t find the mod ini to give you direct refference to what i did, thought, Must be on my dead HD
mad ivan 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
Bones for an upgrade replacing turret? Fritz Generals & Zero Hour Editing 4 07-11-2004 07:44 PM
Replacing Nation Flags Creed Red Alert 2 & Yuri's Revenge Editing 26 12-19-2003 09:09 AM
damn i almost have it NewGhost Generals & Zero Hour Editing 2 10-18-2003 12:40 AM
replacing existing models Mohawk Generals & Zero Hour Editing 7 08-27-2003 07:19 AM
damn aircraft JhonnyRey Red Alert 2 & Yuri's Revenge Editing 36 06-16-2003 07:19 PM


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


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