HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Innacurate Projectiles?

03-20-2004, 07:29 AM#1
Sprite_Boi
How can i make a unit shoot somwhere in the direction the enemy is? Im getting boored of those artillery units always shooting in the right direction (ex. mortar). I tried many different ways but i cant make that work. Help me please.
03-20-2004, 03:02 PM#2
Hunter0000
Quote:
Originally Posted by Sprite_Boi
How can i make a unit shoot somwhere in the direction the enemy is? Im getting boored of those artillery units always shooting in the right direction (ex. mortar). I tried many different ways but i cant make that work. Help me please.

Easy, howwever, if you have lots of these units my method would probabbly lag.

EVENTS
Unit is attacked
CONDITIONS
Attacking unit = to (your unit type here)
ACTIONS
Order attacking unit to order- attack ground at a point of random polar offset to your liking(or whatever)
wait (slightly shorter than the attacking unit's refire rate)
Order attcking unit to order- stop

That should do it, Oh by the way, hi guys, im back!
03-21-2004, 02:12 AM#3
ThyFlame
I believe you'd want to roll a random integer to see if you attack and hit the unit or you just shoot and miss.

That trigger would 1.) Miss 100% 2.) Fire after the attack [I think?]
03-21-2004, 02:13 AM#4
Pheonix-IV
that trigger wont miss 100% if there is splash damage, what sprite wants is artillery units firing in the general direction of the enemy, not straight at it, hunters trigger works prefectly for this.
03-21-2004, 02:15 AM#5
Hunter0000
I belive he is refering to the dumb looks of how artillery always leads it's targets correctly. He wants it to physicly miss the target completely sometimes. At least thats what it looks like to me

EDIT: lol, pheonix beat me to it!
03-21-2004, 03:53 AM#6
kane635
o.O I have something that works... sorry, but yours does not.

Event - A unit is issued order torwards an object
Condition - Target object of issued order is a unit equal to true
Action - Order Targeting unit to "attack - ground" position of target unit of issued order offset by (random real between 0.00 and 450.00, random real between 0.00 and 450.00).

Or if you would like to get a little bit involved I am sure you could get a ratio between the distance between the target unit and the targeting unit to determine the inaccuracy rate, but I'm not going to do that here.

Dont use polar offsets, that is just more work... Plus, if you used "unit is attacked" this means that the projectile has ALREADY hit the target.
03-21-2004, 04:21 AM#7
Hunter0000
Are you sure? I always thought that meant that it was targeted for an attack, but had not yet fired.
03-21-2004, 04:25 AM#8
ThyFlame
Quote:
Originally Posted by kane635
o.O I have something that works... sorry, but yours does not.

Event - A unit is issued order torwards an object
Condition - Target object of issued order is a unit equal to true
Action - Order Targeting unit to "attack - ground" position of target unit of issued order offset by (random real between 0.00 and 450.00, random real between 0.00 and 450.00).

Or if you would like to get a little bit involved I am sure you could get a ratio between the distance between the target unit and the targeting unit to determine the inaccuracy rate, but I'm not going to do that here.

Dont use polar offsets, that is just more work... Plus, if you used "unit is attacked" this means that the projectile has ALREADY hit the target.



I hope it occured to you that this will affect EVERY UNIT...

You need a condition signifying the unit being issued the order is of the unit-type you want to 'miss'.

Polar offsets more work? What are you talking about? Polar offsets are quite simple and easy to use. Your trigger does nothing but make the attack fall short or go to far, as opposed to miss slightly to the side, or to the side AND short/long.

There is nothing wrong with polar offsets.
03-21-2004, 04:57 AM#9
Hunter0000
Quote:
Originally Posted by ThyFlame
There is nothing wrong with polar offsets.


They are infact GODLY.
03-21-2004, 05:33 AM#10
Sprite_Boi
Ehh, Hunter heres how i made it.

EVENTS
Unit- A unit is attacked
CONDITIONS
(Unit-type of (Attacking unit)) Equal to Mortar Team
ACTIONS
Unit - Order (Attacking unit) to Attack Ground ((Position of (attacked unit)) offset by 256.00 towards 0.00 degrees)
Wait 3.40 seconds
Unit - Order (Attacking unit) to Stop


Is that right?

Note: The mortar teams cooldown is 3.50 seconds
03-21-2004, 05:36 AM#11
Pheonix-IV
Quote:
Originally Posted by kane635
o.O I have something that works... sorry, but yours does not.

Event - A unit is issued order torwards an object
Condition - Target object of issued order is a unit equal to true
Action - Order Targeting unit to "attack - ground" position of target unit of issued order offset by (random real between 0.00 and 450.00, random real between 0.00 and 450.00).

Or if you would like to get a little bit involved I am sure you could get a ratio between the distance between the target unit and the targeting unit to determine the inaccuracy rate, but I'm not going to do that here.

Dont use polar offsets, that is just more work... Plus, if you used "unit is attacked" this means that the projectile has ALREADY hit the target.


that wont work for default "defence" attacks only for ordered ones, it will also screw up royally with spells and certain orders "Unit is attacked" is triggered when a unit is the target of an attack NOT when it is hit by the attack.
03-21-2004, 05:48 AM#12
Sprite_Boi
Quote:
Originally Posted by Pheonix-IV
what sprite wants is artillery units firing in the general direction of the enemy, not straight at it.
Thats right, just what i want.
03-23-2004, 12:44 AM#13
kane635
Before you insult me, the unit type of triggering unit was simply implied, and when you list all of the things my offset does, you literally mention every spot within 450.00 of the unit. Its the same thing with polar offset. And you have the nerve to PM me telling me I am wrong. Not very smart.
03-23-2004, 12:45 AM#14
kane635
Oh, it works, Phoenix. Try it out.
03-23-2004, 03:50 AM#15
MadFunk
You are aware if you give it an offset that is out of the attacking units range, it'll move closer to fire. That might be an issue.