Posted: Wed May 23, 2018 2:01 pm Post subject:
Trouble Implementing an immobile deploy-fire unit.-PART 2
Subject description: Part 2 - The Lingering B.S.
Hello again everyone, I previously posted a topic entitled 'Trouble Implementing an immobile deploy-fire unit.', and thanks largely to the community's help (and namely, cxtian), I managed to implement a unit that could deploy into it's immobile firing form (that is, make use of it's UnloadingClass=vxl), and make use of it's weapon while immobile.
Now the annoying new issue I've noticed; the unit actually still Fires when undeployed, thus not making a difference if it is deployed or not. Can anyone explain why the unit does this, and how to prevent it from firing unless in it's deployed state?
I have set the following tags;
Primary=FakeWeapon --> cxtian provided this in Part 1 (see previous topic), and this was used as the 'targeting' weapon?
Secondary= (it's real weapon)
DeployFireWeapon=1 (the real weapon)
CanPassiveAquire=yes
CanRetaliate=yes
PreventAttackMove=yes
IsSimpleDeployer=yes
DeployFire=yes
OpportunityFire=no (I set this to 'no' so it wouldn't fire on the move, which it shouldn't)
UnloadingClass= (it's deployed-state voxel)
Can anybody see anything wrong with the tags?Are they in any way mis-used here? QUICK_EDIT
DeployToFire = The vehicle must deploy before it can fire (def=no)?
'DeployToFire' - I shall try that, I genuinely didn't know this tag was valid, I will let you know the result tomorrow. Do I add this to my other tags, or does this replace 'DeployFire'? I will most likely attempt both... QUICK_EDIT
fire with the fake weapon when undeployed, that's what I did
Hello again cxtian; as you said, I set the 'fakeweapon' as the primary weapon for the undeployed vehicle, and gave it's real weapon as it's secondary. I wonder, do I just delete the secondary weapon altogether, and set it's real weapon after the 'DeployFireWeapon=' tag line? QUICK_EDIT
Joined: 19 Aug 2009 Location: Moscow State University
Posted: Wed May 23, 2018 10:07 pm Post subject:
The siege chopper deploy thing is just like the GI deploy. Before deploy - use primary. After deploy - use secondary.
Maybe other tags can alter this, but I believe that is the default state.
DeployToFire behavior is actually "entering firing state (force fire, command fire or retaliate) forces unit to deploy". "must deploy to fire" is referring to GDI juggernaut, which must deploy into a building before it can fire. That explains the juggernaut mechanism, but not actually how this tag works.
DeployFire behavior is when you deploy it, it fires a weapon specified by DeployFireWeapon _________________ Tired of grabbing my random SHP conversions? Why not learn to create SHPs for yourself? QUICK_EDIT
The siege chopper deploy thing is just like the GI deploy. Before deploy - use primary. After deploy - use secondary.
Maybe other tags can alter this, but I believe that is the default state.
DeployToFire behavior is actually "entering firing state (force fire, command fire or retaliate) forces unit to deploy". "must deploy to fire" is referring to GDI juggernaut, which must deploy into a building before it can fire. That explains the juggernaut mechanism, but not actually how this tag works.
DeployFire behavior is when you deploy it, it fires a weapon specified by DeployFireWeapon
The new tag has so far Failed!
G-E and cxtian, I first tried just adding 'DeployToFire=yes' to the unit, and then tried with replacing the 'DeployFire=yes' tag with it. On both cases, the unit refused to fire a weapon either in undeployed, or deployed state (even force fire).
Kenosis; thanks for backing up the tag that G-E brought up, it is my intention to create a unit that meets the parameters you just described. At this moment I don't understand why the unit would fire in both forms before, but with the 'DeployToFire=yes' set, it doesn't fire in either deployment mode.
*** Also, a small update; I've been experimenting with removing other tags, as well as adding and removing tags on the 'deployed' voxel (which I originally gave matching stats to, except UnloadingClass=undeployedvoxel). And most recent test shows that it still doesn't fire, but when I order it to shoot an air target the unit seems to enter into a state where it is constantly switching between the two voxels.
In other words, it looks like it is constantly trying to deploy and then undeploy, and then deploy again...
In my rules I have 2 units listed for this one unit's purpose [deployed unit] and [undeployed unit]. cxtian you mentioned it doesn't matter what stats the deployed voxel has, as only the image is used, so does this mean I can delete the entry for it in rules? I assumed to make 2 units, giving them the same stats so that it 'exists' in the game (and doesn't be invisisble)? QUICK_EDIT
Is your fake weapon NeverUse= like VirtualScanner?
Hi G-E, cxtian advised me to use the fake weapon;
[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
This is what i've set as the Primary weapon for the undeployed unit, with my real weapon set as secondary. On my 'deployed' unit (although i'm told the stats for this unit don't matter) the same real weapon is set as it's primary weapon. Do you think i need to use NeverUse tag? QUICK_EDIT
Hahaha putting DeployToFire=yes on a deploy-to-self unit would just cause infinite loop. Because after deploy it still need to deploy before it can fire, and then it deploy again and again and again and never actually fire.
Not a mystery at all
Maybe Verses of 1%'s cause weapon switch, try to change all to 100%, and then say something like Versus.none.Retaliate=no, Versus.none.PassiveAcquire=no, etc
Damfoos just made the building version btw _________________
Doesn't matter.
SCHP has everything needed. There is no actual "deployed form unit", only the Image is used in SCHD.
If you are still wasting time on these tags, copy a set of SCHP and SCHD, change image, weapons, movement, build requirements and anything you still want to change.
Kenosis, I shall take your advice and let you know how it goes, I will attempt over the weekend when I get a chance.
cxtian, I will after copying the siege chopper as Kenosis suggested, see if the fakeweapon needs to be changed. I know about the SHP version I had a look, but I prefer the voxel for 2 reasons; 1 it can deploy facing any direction, and 2 I would really like to implement a new deployable voxel unit. QUICK_EDIT
Okay, so following Kenosis' advice I've redone the unit code (which is S-300), using the siege chopper (SCHP AND SCHD).
I'm basically back to where I got before; The unit can deploy and undeploy, and the unit can fire it's main real (secondary) weapon, But it will still fire it's secondary (real) weapon even when undeployed. So it still ignores deployment state.
I will try tomorrow to do something with the fakeweapon as per your advice cxtian, although I'm not sure what. The fakeweapon (primary weapon) currently is:
[FakeWeapon]
Damage=0; can attack but deal no damage
ROF=0
Range=-2
Projectile=Invisible
Speed=100
Warhead=FakeWeaponWH
NeverUse=yes
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
I don't know exactly what to do, I will first try setting verses to 100%, and I'm not sure if 'NeverUse=yes' or 'FireOnce=yes' are doing anything here... QUICK_EDIT
Well guys, after trying everything I could think of, after even trying from scratch using the Siege Chopper as a base I couldn't get anywhere with the problem. The unit still fires in it's undeployed state, just as it would in it's deployed state.
cxtian I tried playing with the verses values on the fake weapon but it didn't work.
The siege chopper doesn't use 'DeployFireWeapon=' or 'DeployToFire=' (but does use 'DeployFire').
I tried using DeployFireWeapon=1, in the hope the unit would deploy and use it's secondary (real) weapon, but it doesn't bother to deploy, it still just fires while undeployed.
If anyone has any ideas, I'd appreciate to hear them? QUICK_EDIT
You miss my point, the unit DOES fire the fake weapon in undeployed state, but the weapon is invisible so you won't notice that it's fired, and it only fire once. So putting NeverUse is defeating the purpose. _________________
After much more testing, and trying all your ideas, I've had no luck..
cxtian; I removed that tag, it made no difference unfortunately.
Creator; I gave it a random sizelimit (=4), no difference.
Kenosis; I tried playing with the range and warhead values of the fake weapon, but no progress.
I even went back on myself and tried using an older build of the code (not using SCHP as a template), and have tried using DeployFire, DeployFire AND DeployToFire, and just DeployToFire on it's own, while giving it DeployFireWeapon=1 (real weapon).
And to this moment it Still fires while undeployed and deployed; the unit won't deploy on it's own, it has to be ordered to. It won't bother to deploy because it can just fire while deployed still.
I will post the unit's code that I have (most recently) been working on... QUICK_EDIT
[FakeWeapon]
Damage=1; can attack but deal no damage
ROF=0
Range=50
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 QUICK_EDIT
Change FakeWeapon's projectile to Invisible3 or Invisible4 or anything AA=yes
Otherwise weapon switches to secondary because primary can not target air _________________
Sounds like a weapon code issue, but you intentionally hid your secondary weapon. We can't help you if you don't give us all the information. QUICK_EDIT
Change FakeWeapon's projectile to Invisible3 or Invisible4 or anything AA=yes
Otherwise weapon switches to secondary because primary can not target air
Hi cxtian, sadly I tried that today, still the same problem.
Kenosis it would seem it is the case here; using the exact code I posted above, the unit automatically fires at a target using it's secondary (real) weapon. It will also do force fire at an air unit, regardless of whether the unit is deployed or not...
Has anyone gotten this DeployToFire thing to work? I've left the DeployfireWeapon=1 in there but I've tried like I said before using DeployToFire , DeployFire, both, but it didn't seem to make a difference. Although I have just followed cxtian's advice with the fakeweapon's projectile change, so I might go ahead and do that series of tests again and see what happens. QUICK_EDIT
Sounds like a weapon code issue, but you intentionally hid your secondary weapon. We can't help you if you don't give us all the information.
If it helps I'll post that too right now. I didn't post it to begin with because the secondary (intended, real weapon) wasn't the issue, it's the unit. Or at least logically to me.. The unit is seemingly ignoring the tag lines telling it to deploy to fire it's secondary weapon, but the weapon itself works (i even tried a weapon from another unit).
Then the game uses secondary to target air by default. Flip primary and secondary and change DeployFireWeapon to 0
cxtian, sorry for late reply, but Thank You! That did it. I was considering doing it as one of my 'longshot' theories, but you've sped up the process haha
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