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

Forum Info
Forum Members: 18,581
Total Threads: 8,669
Posts: 94,547

Administrators:
DeeZire, Redemption

There are currently 46 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 01-13-2005, 11:45 AM   #1 (permalink)
Member
 
Join Date: Oct 2004
Location: Slovakia
Posts: 58
Default Animation Code problem

I have made two models of an unit and I need to connect them using a animation. I have already made third model which contain the amination cycle of transforming.
However I donīt know how to code it.
The animatin should be played after an upgrade and then after animation is finished it should be replaced (with ReplaceObject logic) with new object but I have no idea how to do this.

BTW It is possible to keep the life of the unit after ReplaceObject ???
Retnuh is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-13-2005, 03:16 PM   #2 (permalink)
Senior Member
 
Join Date: Feb 2004
Location: Glued to the chair in front of my laptop
Posts: 1,158
Default

As far as I know, using ReplaceObject can not retain Experience or Health of a unit.
GametagAeonFlux is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-13-2005, 03:21 PM   #3 (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

But you can kill the unit with the upgrade, and use CreateObjectDie to spawn another in its place. Use "TransferPreviousHealth = Yes" on CreateObjectDie to ensure it keeps its health.
CodeCat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-13-2005, 05:14 PM   #4 (permalink)
Senior Member
 
Join Date: Jul 2004
Location: London, UK
Posts: 376
Send a message via MSN to AntiSocialKindaGuy
Default

What module kills an object when an upgrade is complete? And can you prevent it from playing the death anim?
AntiSocialKindaGuy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-13-2005, 05:20 PM   #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

Well, you can trigger an OCL through the upgrade. And then the OCL fires a weapon on the object (yes, OCLs can do that!), which kills the object.
CodeCat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-13-2005, 06:38 PM   #6 (permalink)
Senior Member
 
Join Date: Jul 2004
Location: London, UK
Posts: 376
Send a message via MSN to AntiSocialKindaGuy
Default

hmm. How would you tell the OCL to target the unit?
AntiSocialKindaGuy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-13-2005, 06:51 PM   #7 (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

Well there is always some way to make upgrades kill something. An object can be created which does it, a weapon can be fired, etc.
CodeCat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-14-2005, 11:37 AM   #8 (permalink)
Member
 
Join Date: Oct 2004
Location: Slovakia
Posts: 58
Default

Keeping life is not that important , the most important is how to play an animation after buying an ObjectUpgrade and AFTER the animation use ReplaceObject.
That is my problem.

BTW if you hadnīt figured it out already it is MCV.
Retnuh is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-14-2005, 12:21 PM   #9 (permalink)
Senior Member
 
Join Date: Jul 2004
Location: London, UK
Posts: 376
Send a message via MSN to AntiSocialKindaGuy
Default

Using the method immo described, you could give the unit a death animation of deploying. If the animation doesn't complete before the deployed con yard is built, then just delay the object creation.
AntiSocialKindaGuy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-14-2005, 02:11 PM   #10 (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

Ohh well if it's an MCV then it's easier.

Instead of fiddling around with conditionstates, why not make the animation a separate object? MCV deploys into an intermediate object, through ReplaceObject. That intermediate object plays the animation when it is created (only one conditionstate - the one with the anim), and with a LifetimeUpdate it dies exactly when the anim is done, spawning the real building in its place.
CodeCat 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
Packing & Unpacking Animation Problems - Code Included AntiSocialKindaGuy Generals & Zero Hour Editing 2 09-27-2004 04:24 AM
Problem with this code? adamstrange Generals & Zero Hour Editing 14 09-26-2004 12:42 PM
Animation problem Bart Generals & Zero Hour Editing 0 09-14-2004 09:27 AM
Problem with code juanmanuelsanchez Generals & Zero Hour Editing 5 03-01-2004 06:28 PM
Animation Problem GHoernchen Generals & Zero Hour Editing 13 08-25-2003 05:28 PM


All times are GMT -4. The time now is 06:23 PM.


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