Posted: Fri Apr 27, 2018 2:02 pm Post subject:
Trouble Implementing an immobile deploy-fire unit.
Greetings fellow modders,
I'm trying to implement a new unit that only fires while deployed, using Issimpledeployer, deployfire, and unloadingclass (with a 'deployed' voxel).
I have a feeling I may have done something wrong but cannot figure out what. On most of my recent attempts the unit was visible, would deploy into the correct voxel, but it would refuse to fire any weapon given.
I've given both the base and deployed voxel the tags 'IsSimpleDeployer=yes', 'DeployFire=yes', and set the 'UnloadingClass' = to their other matching voxel.
I have also only set 'DeployFireWeapon=1' to the undeployed base voxel, in the hope it would use index of '1' to fire the secondary weapon (a missile weapon) when in it's deployed form, but nothing fires. I've tried setting the primary to =none, and in my most recent attempt I set it to a dummy 'rangefinder' weapon used by another unit, but then I got an IE.
I've given it a socondary weapon I know works, because another unit uses it, although that unit uses it as their sole, primary weapon.
Any advice? I'm hoping some senior modders have implemented such units that only fire when deployed, and can redeploy back to their original voxel... QUICK_EDIT
Looks like you are making a siege chopper except that it can't fire when not deployed
Is it turreted or the weapon has OmniFire?
I think the best way to achieve this is to deploy into a structure so that you can use DeployToFire=yes on the unit that prevents any unit weapon firing. _________________
Looks like you are making a siege chopper except that it can't fire when not deployed
Is it turreted or the weapon has OmniFire?
I think the best way to achieve this is to deploy into a structure so that you can use DeployToFire=yes on the unit that prevents any unit weapon firing.
Hi cxtian, the unit in question is not turreted, and yes the weapons I try to give it are Omnifire capable.
I know I could make a structure, but I was hoping to implement the 'UnloadingClass=(deployed voxel)' tag, as this allows to deploy to and from a voxel, which faces any direction. This aspect works, but I cannot get it to fire a weapon for some reason. I read that the tags I've used are supposed to let the unit fire it's secondary weapon once deployed, but I'm not sure which tags or weapons should go on the vehicle that deploys, or the deployed vehicle. QUICK_EDIT
[MTNK]
IsSimpleDeployer=yes
UnloadingClass=HTNK;Grizzly to rhino
DeployFire=yes
Primary=FakeWeapon
Secondary=160mm
[FakeWeapon]
Damage=0; can attack but deal no damage
ROF=0
Range=-2
Projectile=Invisible
Speed=100
Warhead=FakeWeaponWH
FireOnce=yes
Cursor.Attack=NoMove
Cursor.AttackOutOfRange=NoMove; even I can attack but I rather pretend I can not
OmniFire=yes; no need to turn your turret
[FakeWeaponWH]
Versus=1%,1%,1%,1%,1%,1%,1%,1%,1%,1%,1%;no retaliate, no passive acquire
IsSimpleDeployer DOESN'T convert unit from one to another and UnloadingClass only borrows image of another unit to display the deployed state. So basically it's deploying into itself and changes image, statics on UnloadingClass is completely ignored.
And the image changing doesn't work for SHP-based unit and that kind of disappoints me. _________________
[MTNK]
IsSimpleDeployer=yes
UnloadingClass=HTNK;Grizzly to rhino
DeployFire=yes
Primary=FakeWeapon
Secondary=160mm
[FakeWeapon]
Damage=0; can attack but deal no damage
ROF=0
Range=-2
Projectile=Invisible
Speed=100
Warhead=FakeWeaponWH
FireOnce=yes
Cursor.Attack=NoMove
Cursor.AttackOutOfRange=NoMove; even I can attack but I rather pretend I can not
OmniFire=yes; no need to turn your turret
[FakeWeaponWH]
Versus=1%,1%,1%,1%,1%,1%,1%,1%,1%,1%,1%;no retaliate, no passive acquire
IsSimpleDeployer DOESN'T convert unit from one to another and UnloadingClass only borrows image of another unit to display the deployed state. So basically it's deploying into itself and changes image, statics on UnloadingClass is completely ignored.
And the image changing doesn't work for SHP-based unit and that kind of disappoints me.
Thanks for the reply cxtian, I will try assign this fake weapon as the primary for the deploying voxel and see what happens. I didn't mean to sound like it converts to another unit, but the 2nd voxel (the 'deployed' voxel) I assume needs similar stats as the 1st voxel with the equal but opposite tag 'UnloadingClass=(1stvoxel)' in order to re-deploy back into it's original state.
I understand this 2nd voxel is just the deployed voxel that is intended to remain in one place, but I'm not sure what weapons (if any) I'm meant to assign the 2nd voxel.
If I leave out any weapons tags on the 2nd voxel, will it use the assigned secondary weapon of the 1st voxel?
(i will in the meantime do some testing and update here on how it goes) QUICK_EDIT
I used the fake weapon with the parameters you used, gave it to the 1st voxel, assigned my own weapon as it's secondary, then used that secondary weapon as the primary weapon on the 2nd (deployed) voxel.
So the complete result works just as intended; a vehicle that deploys to fire, and is immobile in it's deployed state, and can be re-packed to move again.
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