Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Apr 19, 2024 5:41 pm
All times are UTC + 0
[Ares] How to make a Repair Crane like M.O
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [6 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Natit_Titan
Grenadier


Joined: 20 May 2012

PostPosted: Thu Mar 19, 2015 2:06 pm    Post subject:  [Ares] How to make a Repair Crane like M.O Reply with quote  Mark this post and the followings unread


Back to top
View user's profile Send private message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Thu Mar 19, 2015 2:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

The animation is on YRArgentina (and possibly here too, in the Media Hut section). There are also a few shp's of actual repair cranes floating around in the community.

As for the repair function, I've not snooped around in MO's code and have no intention of ripping it, so I'm kind of on my own with this, but maybe the following would work:

Add an AttachEffect.Animation=XXXX, where XXXX is the ID of your repair ring animation, and AttachEffect.Duration=-1. Then give that animation a negative damage value in artmd.ini, and a warhead.

That warhead needs to have 0% against buildings and infantry (otherwise those would get healed) and AffectsEnemies=no (otherwise enemy units would get healed). You also need to give it a CellSpread of your own preference. A good idea would be to make the CellSpread equal to the diameter of the repair animation.

_________________
Mao Zedong wrote:

Our mission, unfinished, may take a thousand years.  

Back to top
View user's profile Send private message
gameaddict11707
Grenadier


Joined: 15 Jul 2011

PostPosted: Thu Mar 19, 2015 3:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

The repair ring is actually an AlphaImage, not the AttachEffect animation or an ActiveAnim. You'd have to give the AE anim (which is invisible & applies the healing effect) a certain Duration and Delay to get the effect that MO has. The ring needs to be in the "alphatst" palette to appear correctly. (You can just copy the "fullfnt3" palette from Tiberian Sun and rename it.)

From Red Resurrection (my own comments added for clarification):
Code:

[NASCRN]; put these tags in the crane building's entry in RulesMD.ini
...; other building stuff, not important here
AlphaImage=SCRNRING; the transparent ring around the building (doesn't need to be listed in [Animations] since it's /not/ an anim)
AttachEffect.Animation=CRANEAE; invisible anim, has Damage & Warhead tags. don't forget to list the anim in [Animations]!
AttachEffect.Delay=25; how long in frames before CRANEAE re-applies itself
AttachEffect.Duration=5; how long in frames CRANEAE is active
AttachEffect.ForceDecloak=yes; AE anims don't play at all on cloaked buildings, making cloaked cranes unable to repair vehicles

[CraneRepairWH]; give the CRANEAE anim "Warhead=CraneRepairWH" and "Damage=25" (or whatever number, just make sure it's not negative!) in ArtMD.ini, also make sure your warhead is listed in [Warheads]!
Verses=0%,0%,0%,-100%,-100%,-100%,0%,0%,0%,-100%,0%; give the anim a positive Damage value! Negative Damage doesn't work on anims
CellSpread=4.5; roughly the size of the ring (5 is just a bit too big)
AffectsAllies=yes
AffectsEnemies=no
Malicious=no; not really needed here since it ends up repairing instead of damaging - makes it so you don't hear "ore miner under attack" when it affects your harvesters
Sonic=yes; removes Terror Drones and TD-like Parasite units from vehicles for a few moments


Back to top
View user's profile Send private message
kenosis
Commander


Joined: 19 Aug 2009
Location: Moscow State University

PostPosted: Thu Mar 19, 2015 5:47 pm    Post subject: Reply with quote  Mark this post and the followings unread


_________________
Tired of grabbing my random SHP conversions? Why not learn to create SHPs for yourself?

Back to top
View user's profile Send private message Send e-mail Visit poster's website Skype Account Yahoo Messenger Account
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Thu Mar 19, 2015 6:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yes, AttachEffect anims has their invoker set as owning house.

This applies to both types, actually, warheadAEanims also have the invoker house set. Invoker unit directly caused bugs, but invoker house works.

Notsure, but I could have make this toward other animations as well - never tested that part out, but the fix is pretty global.

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
Natit_Titan
Grenadier


Joined: 20 May 2012

PostPosted: Fri Mar 20, 2015 1:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

thank all, this's usefull

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [6 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1790s ][ Queries: 11 (0.0083s) ][ Debug on ]