HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger help!

10-19-2004, 06:12 AM#1
masda70
Well i want to do an airstrike ability. Basically i used an AoE "blank" ability and i created 2 units. One is a normal plane (gyrocopter model) the other one is a permanent invisible air unit that has attack ground. So basically my trigger creates the gyrocopter so it will go flying on the area of targeted ability and the invisible planes will launch the rockets (5 planes will launch each one rocket)
The gyro seems to work but the other guys just don't attack ground!!.
I would also like a way to make the gyro always work, because i found (or it's just my imagination :( that when it's created out of the map limit it won't fly on the correct place.
Any other suggestions would be appreciated.
Btw i'm planning to make the plane come from a random position.

Here is my current trigger.
Quote:
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Air Strike
Actions
Unit - Create 1 Real Plane for Neutral Passive at ((Center of (Playable map area)) offset by (((X of (Target point of ability being cast)) - 500.00), ((Y of (Target point of ability being cast)) - 500.00))) facing (Target point of ability being cast)
Set realplane = (Last created unit group)
Unit Group - Order realplane to Move To ((Center of (Playable map area)) offset by (((X of (Target point of ability being cast)) + 500.00), ((Y of (Target point of ability being cast)) + 500.00)))
For each (Integer B) from 1 to 5, do (Actions)
Loop - Actions
Unit - Create 1 Airtrike Plane for Neutral Hostile at (Position of (Random unit from realplane)) facing (Target point of ability being cast)
Unit Group - Add (Last created unit) to blackwispshahah
Unit - Order (Last created unit) to Attack Ground (Random point in (Rect centered at (Target point of ability being cast) with size (0.00, 0.00)))
Wait 0.10 seconds
Wait 1.50 seconds
Unit Group - Pick every unit in blackwispshahah and do (Unit - Remove (Picked unit) from the game)
Wait 1.50 seconds
Unit Group - Pick every unit in realplane and do (Unit - Remove (Picked unit) from the game)
Unit Group - Remove all units from blackwispshahah
Unit Group - Remove all units from realplane
10-19-2004, 02:38 PM#2
AFB-DieHard
Maybe it's because they don't have a attack-ground "ability", i mean they can only attack units. For example siege weapons can attack-ground, but not normal units. I hope that helped.
10-19-2004, 08:48 PM#3
masda70
The attack ground is enabled, i tried to add the unit to the map as another unit in the map for the active player, at his attack ground attack works. Any other ideas?
10-19-2004, 08:53 PM#4
Guest
Make sure that the unit is far away or change the minimum attack range for attack ground. Siege units can't attack closeby units.
10-19-2004, 09:20 PM#5
masda70
range has been adjusted to 1. So actually the planes would get close to the target and the fire? or i am wrong
10-19-2004, 11:59 PM#6
masda70
btw can that trigger cause lag? Because i tested in some comps and i experience lag when casting the spell
10-20-2004, 12:40 AM#7
thedevil
Try this
Event:A unit begin casting an ability
Condition:ability being cast equal to airstrike
Action:
-Wait:0.2s(just make sure the spell will have cooldown)
Set airstrikepoint=target point of ability being cast
-Create 5 visibleplane for owner of triggering unit at airstrikepoint
-Create 1 realplane for owner of triggering unit at airstrikepoint
-Pick every unit type of visibleplane own by owner of triggering unit attack move to airstrikepoint
Pick every unit type of realplane own by owner of triggering unit attack move to airstrikepoint-->the only problem is when visibleplane attack enemy the realplane still move to airstrikepoint,u can set variable for 1 visibleplane and make realplane follow it
-the rest of it u can do as your way hope i can help a little ^_^