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 Thu Apr 18, 2024 6:09 am
All times are UTC + 0
Trouble Implementing an immobile deploy-fire unit.
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [8 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Fri Apr 27, 2018 2:02 pm    Post subject:  Trouble Implementing an immobile deploy-fire unit. Reply with quote  Mark this post and the followings unread

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...

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


Joined: 11 Feb 2016

PostPosted: Fri Apr 27, 2018 7:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

_________________

Back to top
View user's profile Send private message Skype Account
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Fri Apr 27, 2018 8:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

cxtian39 wrote:
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.

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


Joined: 11 Feb 2016

PostPosted: Fri Apr 27, 2018 9:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

This should do what you want
Code:
[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.

_________________

Back to top
View user's profile Send private message Skype Account
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Sat Apr 28, 2018 1:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

/

Last edited by Lee3y on Sat Apr 28, 2018 1:08 pm; edited 1 time in total

Back to top
View user's profile Send private message
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Sat Apr 28, 2018 1:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

cxtian39 wrote:
This should do what you want
Code:
[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)

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


Joined: 11 Feb 2016

PostPosted: Sun Apr 29, 2018 1:09 am    Post subject: Reply with quote  Mark this post and the followings unread

No I didn't change anything in [HTNK], should be irrelevant (no 120mm is fired nor any quotes/sound of rhino is played to me

_________________

Back to top
View user's profile Send private message Skype Account
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Sun Apr 29, 2018 12:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks for the advice I got it to work!

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.

This issue can be considered resolved!

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [8 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.1488s ][ Queries: 11 (0.0087s) ][ Debug on ]