 |
Forum Info
|
 |
Forum Members: 18,581
Total Threads: 8,669
Posts: 94,547
Administrators:
DeeZire, Redemption
There are currently 46 users online.
|
 |
Partner Links
|
 |
 |
Advertisements
|
 |
|
| Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here. |
01-13-2005, 11:45 AM
|
#1 (permalink)
|
|
Member
Join Date: Oct 2004
Location: Slovakia
Posts: 58
|
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 ???
|
|
|
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
|
As far as I know, using ReplaceObject can not retain Experience or Health of a unit.
|
|
|
01-13-2005, 03:21 PM
|
#3 (permalink)
|
|
Senior Member
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
|
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.
|
|
|
01-13-2005, 05:14 PM
|
#4 (permalink)
|
|
Senior Member
Join Date: Jul 2004
Location: London, UK
Posts: 376
|
What module kills an object when an upgrade is complete? And can you prevent it from playing the death anim?
|
|
|
01-13-2005, 05:20 PM
|
#5 (permalink)
|
|
Senior Member
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
|
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.
|
|
|
01-13-2005, 06:38 PM
|
#6 (permalink)
|
|
Senior Member
Join Date: Jul 2004
Location: London, UK
Posts: 376
|
hmm. How would you tell the OCL to target the unit?
|
|
|
01-13-2005, 06:51 PM
|
#7 (permalink)
|
|
Senior Member
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
|
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.
|
|
|
01-14-2005, 11:37 AM
|
#8 (permalink)
|
|
Member
Join Date: Oct 2004
Location: Slovakia
Posts: 58
|
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.
|
|
|
01-14-2005, 12:21 PM
|
#9 (permalink)
|
|
Senior Member
Join Date: Jul 2004
Location: London, UK
Posts: 376
|
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.
|
|
|
01-14-2005, 02:11 PM
|
#10 (permalink)
|
|
Senior Member
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
|
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.
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 06:23 PM.
|