Posted: Tue Feb 17, 2015 2:36 pm Post subject:
Defensive Strike Calls for Additional Strikes
Subject description: How does WeaponObject fire projectiles away from itself?
I want to do the following.
1. Aim defensive weapon at a spot.
2. Have laser from space hit that spot.
3. Have other lasers from space hit nearby spots, randomly.
This is easy to almost do if I set the scatter radius on the weapon to be high and have multiple projectiles, but that isn't quite the same. Chiefly, I don't want all of the lasers to be the same. (I have the multiple laser strikes.)
What I've tried to do is use the OCL to have the defensive weapon put down an object that calls for the laser. The OCL also puts down an invisible particle that has a weapon. I can get that weapon to go off, but I can't get it to fire in a random scatter by having its weapon have ScatterRadius=25 (or whatever) and ClipSize = 4 (or whatever), meaning that all of my lasers hit the same spot. This is in spite of the fact that the weapon for the invisible object is set to fire projectiles that call for the other laser strikes; those projectiles will not fire any distance from the firing projectile. (I'm not convinced that they fire at all.)
How can I get that invisible object to shoot away from itself? Units and structures do it all the time! I even set the "KindOf" to include "CAN_ATTACK" and "PRELOAD". QUICK_EDIT
Joined: 18 Jun 2005 Location: Dordrecht, the Netherlands
Posted: Wed Feb 18, 2015 7:09 pm Post subject:
Re: Defensive Strike Calls for Additional Strikes
BigBad wrote:
I want to do the following.
1. Aim defensive weapon at a spot.
2. Have laser from space hit that spot.
3. Have other lasers from space hit nearby spots, randomly.
This is easy to almost do if I set the scatter radius on the weapon to be high and have multiple projectiles, but that isn't quite the same. Chiefly, I don't want all of the lasers to be the same. (I have the multiple laser strikes.)
What I've tried to do is use the OCL to have the defensive weapon put down an object that calls for the laser. The OCL also puts down an invisible particle that has a weapon. I can get that weapon to go off, but I can't get it to fire in a random scatter by having its weapon have ScatterRadius=25 (or whatever) and ClipSize = 4 (or whatever), meaning that all of my lasers hit the same spot. This is in spite of the fact that the weapon for the invisible object is set to fire projectiles that call for the other laser strikes; those projectiles will not fire any distance from the firing projectile. (I'm not convinced that they fire at all.)
How can I get that invisible object to shoot away from itself? Units and structures do it all the time! I even set the "KindOf" to include "CAN_ATTACK" and "PRELOAD".
An option I think from the top of my mind is to have the weapon being fired in step 1 use a ProjectileDetonationOCL to spawn a dummy entity with a lifetime of a couple of frames. This dummy entity uses several FireWeaponUpdate modules (in your case, 4) to spawn a dummy weapon with a random scatter. This weapon on impact then does the random scatter lasers you want. Lastly, use a FireWeaponWhenDeadBehavior module to spawn the main laser you want. QUICK_EDIT
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