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 Tue Mar 19, 2024 2:01 pm
All times are UTC + 0
Defensive Strike Calls for Additional Strikes
Moderators: Generals Moderators, Global Moderators
Post new topic   Reply to topic Page 1 of 1 [2 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
BigBad
Medic


Joined: 23 Feb 2014

PostPosted: 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?
Reply with quote  Mark this post and the followings unread

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

Back to top
View user's profile Send private message
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Wed Feb 18, 2015 7:09 pm    Post subject: Re: Defensive Strike Calls for Additional Strikes Reply with quote  Mark this post and the followings unread

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.

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