HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Projectile

01-22-2006, 03:27 PM#1
Thunder_Eye
Can anyone help me solve this?

Trigger:
Attack
Collapse Events
Unit - A unit Is attacked
Collapse Conditions
(Attacking unit) Equal to Sylvanas Windrunner 0002 <gen>
Collapse Actions
Set Attackpoint = (Position of (Attacking unit))
Unit - Create 1 Dummy Arrow for Player 1 (Red) at Attackpoint facing (Facing of (Attacking unit)) degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit Group - Add (Last created unit) to Arrows
Custom script: call RemoveLocation(udg_Attackpoint)
Trigger:
Timer
Collapse Events
Time - Every 0.01 seconds of game time
Conditions
Collapse Actions
Collapse Unit Group - Pick every unit in Arrows and do (Actions)
Collapse Loop - Actions
Set Targets = (Units within 100.00 of (Position of (Picked unit)) matching (((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True))
Set Pick = (Picked unit)
Collapse Unit Group - Pick every unit in (Random 1 units from Targets) and do (Actions)
Collapse Loop - Actions
Unit - Order Pick to Attack (Picked unit)
Set Arrowpoint = ((Position of (Picked unit)) offset by 10.00 towards (Facing of (Picked unit)) degrees)
Unit - Move (Picked unit) instantly to Arrowpoint
Custom script: call RemoveLocation(udg_Arrowpoint)
Unit Group - Remove all units from Targets
Trigger:
Remove
Collapse Events
Unit - A unit Dies
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Dying unit) is in Arrows) Equal to True
Collapse Then - Actions
Unit Group - Remove (Dying unit) from Arrows
Else - Actions

The dummy unit has an ability based of sapper explosion, I think the problem is that it doesnt have time to attack a target within 0.01 sec, how to solve this?
01-22-2006, 03:30 PM#2
Anitarf
Well, why do you want it to attack, you could just do triggered damage to the unit in rang of the arrow and then remove the arrow.
01-22-2006, 03:33 PM#3
Thunder_Eye
Ok the triggers look like this now:

Hidden information:

Trigger:
Attack
Collapse Events
Unit - A unit Is attacked
Collapse Conditions
(Attacking unit) Equal to Sylvanas Windrunner 0002 <gen>
Collapse Actions
Set Attackpoint = (Position of (Attacking unit))
Unit - Create 1 Dummy Arrow for Player 1 (Red) at Attackpoint facing (Facing of (Attacking unit)) degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit Group - Add (Last created unit) to Arrows
Custom script: call RemoveLocation(udg_Attackpoint)


Hidden information:

Trigger:
Timer
Collapse Events
Time - Every 0.01 seconds of game time
Conditions
Collapse Actions
Collapse Unit Group - Pick every unit in Arrows and do (Actions)
Collapse Loop - Actions
Set Targets = (Units within 100.00 of (Position of (Picked unit)) matching (((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True))
Set Target = (Random unit from Targets)
Set Pick = (Picked unit)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Target Equal to No unit
Collapse Then - Actions
Set Arrowpoint = ((Position of (Picked unit)) offset by 10.00 towards (Facing of (Picked unit)) degrees)
Unit - Move (Picked unit) instantly to Arrowpoint
Custom script: call RemoveLocation(udg_Arrowpoint)
Unit Group - Remove all units from Targets
Collapse Else - Actions
Unit - Cause (Picked unit) to damage Target, dealing 300.00 damage of attack type Pierce and damage type Normal
Unit - Kill (Picked unit)
Unit - Remove (Picked unit) from the game
Unit Group - Remove (Picked unit) from Arrows


But somehow the unit isnt created "inside" the attacker, its created to the left of it. Doesn't look very well :/

It is also very buggy and disappears right infront of the target.
01-22-2006, 04:22 PM#4
SmileyJeff
Turn collision off so that it will be created 'inside' the hero.
01-22-2006, 04:24 PM#5
Immoralis
or give it locus, somehow colliossned off units still affect pathing(other unit's pathing), yes it sounds wierd but ive tested it...
01-22-2006, 04:28 PM#6
Thunder_Eye
It already has locust and I can only turn of the collision after Ive created it.
01-22-2006, 04:35 PM#7
SmileyJeff
Turn off collision for the attacker before creating the dummy. It works, since the event check it fast even if "a unit is attacked". But this is not quite a good solution.
01-22-2006, 04:43 PM#8
Thunder_Eye
Well it works but doesnt look very well
the arrow is faced to the right first, it faces "facing of attacking unit" when its about 150 away from the attacker.
Attached Files
File type: w3xExplosiveBear.w3x (20.8 KB)
01-23-2006, 12:38 AM#9
Shisho
Use an offset of some kind, you can also use the action of (move a unit instantly) if there isn't a way to create it in the right initial spot.
01-23-2006, 05:14 AM#10
Naakaloh
I think that it only appears to be to the side and it's actually just lower. Because of the camera angle it probably looks like it's in a weird position. Make it flying and give it an appropriate flying height (80 or something like that) and it should probably look fine.
01-23-2006, 01:23 PM#11
Thunder_Eye
@Shisho sry already done all that, stills looks wierd.

On some targets I have to go for a special angle, some kind of bug :/ how to fix that?