• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] Unit Attached to another unit

Status
Not open for further replies.
Level 12
Joined
Dec 25, 2010
Messages
972
In Warhammer 40k Dawn of War, some vehicle units (Excluding Walkers) are capable of engaging multiple targets since their secondaries weapons act independent from the main one (Unless you order to attack a single enemy).
Is there any possibility on making an indepedent Unit Attached to another unit that attacks in the same way as in warhammer 40k
 
Level 12
Joined
Dec 25, 2010
Messages
972

Yeah, SetUnitX and SetUnitY, which are JASS natives unavailable in GUI, allow the unit to constantly be moved yet still attack and cast spells. A trigger which sets a carried unit's coordinates to the coordinates of its carrier every 0.03 seconds works great.

@Both: how would any of this work for the Skyfire Gunship model if (Hypothetically) it had neither of it's side cannons on the upper deck were removed.
 

Ardenian

A

Ardenian

No, you cannot simply do this method with that model you linked, since the weapons are in-built. It requires model edit.

You would have to make the cannons/guns seperate models to use the method IcemanBo and Bribe showed up.
 

Ardenian

A

Ardenian

Will Phoenix Fire not work?

I think the would like to have the guns shoot separately, including animations, like in SC2 with these attached objects ( turrets, e.g.) or how they are called. Phoenix Fire does not do this, does it ?
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
You have to remove the gun models from the ship, then you have to create a new unit (make it locust) and give it a new model based on the gun (copy'n'paste).

Then you have to find the good offset and direction from the center of the gunship to the center of the gun (for both sides however, I assume that you only have to mirror the angle) and then create two of those units whenever such a gunship enters the game. (This event can be done by any proper unit indexer or you can make it yourself.)

Then you can use the system by TC to add the gun units to the ship (dunno how exactly because I have never used that system but it should be obvious how).
(call SetUnitX(child, GetUnitX(Parent)) is not really enough... so I hope his system allows offsets. He sure loves to add numberless configurables which makes it hard to find one when you search for it :D)

It looks like his system is also made for combat... which I find a bit odd, which would make you be able to set the attack data quite easily.

Ofcourse with some triggers that would redirect orders, you could make the turrets to focus a specific target when you order the gunship to attack someone or other stuff like that which would be quite awesome, but that part is completely up to you.
 
Status
Not open for further replies.
Top