Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Ace40k  
#1 Posted : Sunday, April 1, 2018 3:40:37 AM(UTC)
Ace40k
Private
Joined: 4/1/2018(UTC)
Posts: 9

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
hi,is it possible to make a unit fire a projectile which splits into a couple smaller submunitions midair that damage ground troops in a certain area? like the chinese clusterbomb from a cargo plane but instead of releasing landmines it should simply deal explosive damage upon impact right away

what i want to do later is to assign this weapon to an artillery or air unit so it attacks opponents with its cluster bombs that cover a large area but do not deal too much damage

thanks!
Sponsor
Offline Zatsupachi  
#2 Posted : Sunday, April 1, 2018 7:40:07 AM(UTC)
Zatsupachi
Major
Joined: 3/27/2015(UTC)
Posts: 490

Thanks: 5 times
Was thanked: 213 time(s) in 155 post(s)
First we need to make the projectile:



Second, the weapon object for the submunitions...
You can though indeed just use regular shells, just make sure you swap it out on the weapon code for submunitions.




Then, The Weapon that goes on to the unit:


Then finally, the submunitions weapon
"It's precision_bomber."

Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mod...oads/death-label-ver-099

Next Episode:
precision_bomber's Zero Hour SCIENCE!
thanks 1 user thanked Zatsupachi for this useful post.
Ace40k on 4/1/2018(UTC)
Offline Ace40k  
#3 Posted : Sunday, April 1, 2018 3:23:51 PM(UTC)
Ace40k
Private
Joined: 4/1/2018(UTC)
Posts: 9

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
whoa, this worked perfectly THANK YOU!Big Smile

i have adjusted my code a little and now my inferno cannon spits cluster ammo that destroys pretty much any tank (was a little weak with the flame attack before)
Offline Ace40k  
#4 Posted : Sunday, April 1, 2018 5:55:44 PM(UTC)
Ace40k
Private
Joined: 4/1/2018(UTC)
Posts: 9

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
me again, what i noticed is my unit with the cluster weapon (in this case, inferno cannon) doesnt gain veterancy even after destroying several units and important structures. could this be fixed?
Offline Zatsupachi  
#5 Posted : Monday, April 2, 2018 8:22:30 AM(UTC)
Zatsupachi
Major
Joined: 3/27/2015(UTC)
Posts: 490

Thanks: 5 times
Was thanked: 213 time(s) in 155 post(s)
Well, that's the side effect of this.
Mainly because it's not killing with the object's weapon, but the weapon object's weapon, if that makes sense.

You can try HeightDieUpdate instead of LifetimeUpdate

Replace the ModuleTag with this:
Code:

  Behavior = HeightDieUpdate ModuleTag_06
	TargetHeight = 1 ;somewhere maybe slightly above ground like 50? or 25?
	TargetHeightIncludesStructures = Yes ;detonates on top of buildings.
	OnlyWhenMovingDown = Yes ;Only when the projectile is moving ground
  End
"It's precision_bomber."

Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mod...oads/death-label-ver-099

Next Episode:
precision_bomber's Zero Hour SCIENCE!
Offline Ace40k  
#6 Posted : Wednesday, April 4, 2018 3:57:03 PM(UTC)
Ace40k
Private
Joined: 4/1/2018(UTC)
Posts: 9

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: Zatsupachi Go to Quoted Post
Well, that's the side effect of this.
Mainly because it's not killing with the object's weapon, but the weapon object's weapon, if that makes sense.

You can try HeightDieUpdate instead of LifetimeUpdate

Replace the ModuleTag with this:
Code:

  Behavior = HeightDieUpdate ModuleTag_06
	TargetHeight = 1 ;somewhere maybe slightly above ground like 50? or 25?
	TargetHeightIncludesStructures = Yes ;detonates on top of buildings.
	OnlyWhenMovingDown = Yes ;Only when the projectile is moving ground
  End

thanks but whenever i enter a value around 50+ for TargetHeight my Inferno Cannon commits suicide with its own cluster rounds.. which i dont understand as i was under the impression the round will explode only when moving towards ground (why is that last code line not working anyway)

the veterancy thing is not that big of a deal. i was just wondering whether i did something wrong on my part. the weapon is strong enough even without heroic unit statusWink
Offline zzc  
#7 Posted : Wednesday, April 4, 2018 7:57:29 PM(UTC)
zzc
Major
Joined: 9/5/2014(UTC)
Posts: 144
Malaysia
Location: KL

Thanks: 14 times
Was thanked: 15 time(s) in 13 post(s)
HeightDieUpdate
TargetHeight = [real number]
TargetHeightIncludesStructures = [Yes/No]
OnlyWhenMovingDown = [Yes/No]
InitialDelay = [integer, milliseconds]
SnapToGroundOnDeath = [Yes/No]
DestroyAttachedParticlesAtHeight = [real number]
End

I think you need InitialDelay, to prevent the weapon from suiciding.

Superweapons have delay times also, to animate with the building doors. And theres the comment in the nuclear missile building, that the delay prevents it exploding right on launch.
thanks 1 user thanked zzc for this useful post.
Ace40k on 4/5/2018(UTC)
Offline Ace40k  
#8 Posted : Thursday, April 5, 2018 3:28:26 PM(UTC)
Ace40k
Private
Joined: 4/1/2018(UTC)
Posts: 9

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: zzc Go to Quoted Post
I think you need InitialDelay, to prevent the weapon from suiciding.

thanks a ton! that was indeed it. now the cluster bombs will detonate at a fixed height which works much better at different ranges compared to the time fuze

it didn't fix the veterancy issue though, but anyway
Offline zzc  
#9 Posted : Thursday, April 5, 2018 7:25:36 PM(UTC)
zzc
Major
Joined: 9/5/2014(UTC)
Posts: 144
Malaysia
Location: KL

Thanks: 14 times
Was thanked: 15 time(s) in 13 post(s)
The veterancy thing is probaly caused by the weapon already being dead before doing damage, as damage is being done by the subweapon.

But you could still gain xp by running over infantry.... give it a really fast locomotor ;)
Offline Annihilationzh  
#10 Posted : Friday, April 6, 2018 7:03:48 AM(UTC)
Annihilationzh
General
Joined: 8/2/2008(UTC)
Posts: 1,779
United Kingdom

Thanks: 26 times
Was thanked: 475 time(s) in 331 post(s)
Originally Posted by: Ace40k Go to Quoted Post
thanks a ton! that was indeed it. now the cluster bombs will detonate at a fixed height which works much better at different ranges compared to the time fuze

it didn't fix the veterancy issue though, but anyway

This is a problem for the inferno cannon too. Whilst they do gain EXP for killing units with their shells, they often kill units with the fire instead. And the fire doesn't count. :/
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.