:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Wed Apr 08, 2020 9:45 am
All times are UTC + 0
 Forum index » Modding Central » Red Alert 2 Editing Forum » Ares (Unofficial Forum)
AttachEffect on self while firing enemy?
Moderators: Ares Support Team at PPM, Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
Author Message
rey
Vehicle Drone


Joined: 15 Jul 2019

PostPosted: Tue Feb 11, 2020 3:41 pm    Post subject:  AttachEffect on self while firing enemy? Reply with quote

all mods that use Ares usually have either units who put effect on enemy while attacking, or effect themselves.  can smb please give me hints on simpliest(shortest code-wise) way to put effect on unit-itself while still making a distant attack on enemy(without effecting it)?
for the moment i found only use of animations to "re-call" another weapon during use of main enemy attacking weapon, but that involves quite a heap of code, so maybe there is some other/simple way?

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


Joined: 11 Feb 2016

PostPosted: Wed Feb 12, 2020 5:22 am    Post subject: Reply with quote

Animation weapon on the weapon's Anim
Code:
[GUNFIRE]
Damage=1
Weapon=AESpawnerWeapon

Make sure your flh is not too off and the AE-spawner weapon has some CellSpread
_________________
I DON'T extract models from Rivals.
I play Rivals tho, PM me for a fight.

Back to top
View user's profile Send private message Skype Account
XxpeddyxX
Commander


Joined: 03 Sep 2004
Location: Sydney, Australia

PostPosted: Wed Feb 12, 2020 8:03 am    Post subject: Reply with quote

If your unit only has 1 weapon, the easiest (and cleanest IMO) way would be to:

ART
Code:
[UNIT]
PrimaryFireFLH=0,0,0 ; bang on in the middle of the unit so no other unit gets affected
SecondaryFireFLH=70,0,140 ;change this to whatever your unit actually uses, note that if you change this on infantry, sequence may need to be altered


RULES
Code:
[UNIT]
Primary=DummyWeapon
ElitePrimary=DummyWeaponE ;if range increases add elite dummy
Secondary=ProperWeapon
EliteSecondary=ProperWeaponE
ReloadAmount=1
NoAmmoWeapon=1
Reload=60 ; set this to how often you want the buff reapplied
Ammo=1

[DummyWeapon]
Damage=1
ROF=1
Range=6 ;make sure it matches the proper weapon's range
Projectile=DummyProj ;to explode instantly
Speed=100
Warhead=BuffWH
Ammo=1 ;necessary

[ProperWeapon]
Ammo=0 ;just add this to the weapon

[DummyProj]
Image=CLRANIM
Arcing=yes
Vertical=yes ;needed
;DetonationAltitude=0
Ranged=yes

[BuffWH]
Verses=0%,0%,0%,0%,0%,0%,0%,0%,0%,0%,0% ;change it to only affect the unit's armor, or better yet add a custom armor just for the purpose of this buff to the unit. make it 10% so no damage is parsed
CellSpread=0.25 ;play around with this but doesn't need to be higher than this so it only affects the unit
AffectsEnemies=no
AttachEffect.Duration=60 ;play around with duration to suit
AttachEffect.Animation=INSERT POWER UP ANIM HERE
AttachEffect.TemporalHidesAnim=yes
AttachEffect.FirepowerMultiplier=1.15    ;change this to whatever buff you want, check the manual
AttachEffect.Cumulative=no ;if you want, recommended

_________________

Back to top
View user's profile Send private message Skype Account
rey
Vehicle Drone


Joined: 15 Jul 2019

PostPosted: Wed Feb 12, 2020 9:58 pm    Post subject: Reply with quote

@XxpeddyxX interesting approach, thank you for unexpected idea!

@cxtian39 that's kinda what i was talking about - this way demands at least new weapon, WH, projectile, plus as it's a "spawned weapon" it can't be set to affect only allies/enemies(at least i didn''t find a way to have area effect for only one side).

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
 Forum index » Modding Central » Red Alert 2 Editing Forum » Ares (Unofficial Forum)
Jump to:  
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.1118s ][ Queries: 10 (0.0055s) ][ Debug on ]