Hey Kueken, firstly EXCELLENT tute! I can follow your working step by step easily :).
Couple of things though... firstly i found that when making the missile unit for the Plasma Surge I had to link the actor using a Unit Birth event which I don't believe you included (the rest of your tute is very noob - friendly).
And the other problem is that my unit won't turn to face the target point... this causes the projectile to shoot in the direction the unit is facing instead of the direction chosen by the player... any thoughts?
Rollback Post to RevisionRollBack
For every action, there is an equal and opposite reaction.
firstly i found that when making the missile unit for the Plasma Surge I had to link the actor using a Unit Birth event which I don't believe you included (the rest of your tute is very noob - friendly).
This should not be necessary, if you create the actor with the correct base like stated in the tutorial (actor type: Missile, based on: GenericAttackMissile)
An actor with this base should get a Unit Token field at the very top, which should manage the events automatically, as soon as you select the missile unit.
Hi there - for my map Snipers 2.0 I have a bullet projectile that persists until it reaches the point clicked or hits an enemy.
Right now the vision is such that it never has to deal with cliffs, however, in my next versions of the game I want the bullet to persist until either it hits an enemy, it reaches maximum range, or it hits a cliff. How do I incorporate the persist until at-range and the cliff check?
For the range, use an initial persistent effect starting at the source unit facing your target point with an offset matching your desired maximum range, like the abilities in this tutorial use.
For cliff collision, I did not find a satisfying data-only way yet. You can check for pathability, which would make the bullet collide with unpathable doodads as well, but it would also collide, when flying down cliffs.
Or you can check for cliff level difference, but this would make it collide with ramps.
Use a Location Compare Cliff Level validator, which can check for differences in cliff level between 2 points. Use this validator as a Periodic Validator for your persistent effect and compare the Source Unit (aka location of the missile) with the Caster Point.
I tried making the fireball following the tutorial. It works perfectly fine except one thing. My unit will only shoot the fireballs straight. I tinkered for a long time trying to figure out how to make the missiles actually target the point I click on. I'm sure I probably made a stupid mistake somewhere but could you take a look and help me find what I did wrong? Thanks for the awesome tutorial by the way.
A couple of things. 1 in order to be able to point this ability where you click go to the ability and go to the effect range field and add a new value min 0 max 500, this is the default setting and you do not want to change that in this case.
Ok a lot of your stuff is misplaced and such, I think. I am assuming that you want to launch your fireballs, and have them produce an aoe upon impact with their target offset, or, the first enemy that they come into contact with. To do this with what you have here is what I would do.
1. You put the set containing the suicide in the impact field of the LM effect, LM effects murder their host missile by default so I am assuming you just linked the wrong thing here. Change the impact effect for both LM effects to a search that just does the damage you want only, as this will only execute if the missile reaches its target destination.
2. Fireball Persistent: I am assuming this is your collision check for the missiles that is supposed to create the AOE and kill the missile if it comes into contact with any enemies before reaching its target destination. Change this to a behavior, leave the behaviors duration as 0, as it doesnt matter the missile is going to die and the behavior will be gone anyway. In the periodic effect field add what I describe in 2A, set your period to .0625 or whatever you used for the timing in the persistent effect we are replacing, and leave the period count at -1. I set the time scale source to global but you can do w/e you like there.
2A. In each of your LM effects, I notice you apply Fireball Persistent to the source unit in the Launch Effect field. That is putting it on your firebat not the missiles. So your missiles do not impact the first enemy they hit like you want, actually your firebat does lol but luckily you put the suicide effect in the wrong spot or your firebat would get killed every time you used the ability lol. To fix this, I would create a search call it Fireball Find Missile, in the filters require Missile, and Self, and exclude ally, enemy, and nuetral. and make the search area small like 2, and put this new search effect in the Launch Effect field of each of your LM effects, add the behavior we made to replace Fireball Persistent in the search so it just finds the missile you just launched and applies the new behavior to them, which periodically creates a your search which will kill the missile if it finds an enemy target.
I am going to fix it and attach a copy of it to this post, so you can check, because there a few other things out of place, and this post is already getting quite long.
One thing I will point out to you though is that the Impact Location field on search effects denotes where the search will originate from, has nothing to do with who the search will find etc..
Edit* I was just thinking, now I dont know if you were doing this just for learning purposes or if you intend to put this into a game you are making at some point, but you do know you can use any model in the game as a missile, for instance Terran Fire Medium at a scale of about .65 would probably looks pretty good as your fireball missile, if you chose a bit slower mover like the longbolt or I imagine even missile default is a bit slower, just food for thought really.
Thanks for the help Dryeyece. I am just using this as a learning tool. As you can see my understanding of the data editor is really poor. Also I will tinker around with models for missiles later on to try out. That is pretty neat. I have been looking at that changes and am starting to figure out some of my mistakes. This has been useful!
For you guys wanting to detonate your missiles if they come into contact with a cliff I made a solution, I am not so good at communicating what I do in the editor nomenclature is a big problem for me I call some things what I think of them as instead of what they are sometimes without really realizing it so if i do that here I am sorry.
For this purpose I just used the map that Kueken had uploaded for the tutorial which I have looked at now by the way and am very delighted to know I can use source unit on an effect in the launch effect field of an LM effect to apply things straight to the missile, I was using a filtered search before which worked fine but its nice to know I can cut one effect out of some of my chains. Anyway all the stuff I created in the map is named Cliff Checker something or another, usually followed by what type of effect it is but searching for cliff checker will find you all the things I made. I used the fireball as an example because it uses the fastest mover, and it has to kill the missile etc but what I did can be applied to any of these by just changing the effect in Cliff Checker (Suicide) from fireball impact to whatever effect you use to do your area dmg and kill the missile if you are killing it. I don't think it would work for the way that Kueken does boomerangs which I have to admit is far more efficient than the workaround I was using myself to achieve it.
A couple of things to note that are very important, I had to make my own validators for this the standard cliff validators check the wrong units for our purposes. I have it set up right now so that you if the fireball comes to a cliff greater than the one the caster i.e the firebat is on the it executes the impact, if the cliff level is the same as or lower than that of the caster then it just allows the missiles to continue on their merry way searching for hapless victims to explodify. So you want to copy and paste the one you want be it greater or same same or lesser etc... and change the Target - Location + field to Target Point, and change the Target - Other Location to Caster Unit, and now you have your validators for the switch.
i will upload my amended version of Kuekens map so you can check it out, I raised some cliffs and placed some marines at the very edge of it, you can see for yourself it works. There is nothing I can do presently to stop the missiles from moving along an ascending path the way they do, its part of the peristent effect that launches them and that their end target location is on top of the cliff.
On the suicide offset, its set to -2 right now because the missile is moving so fast, you can tweak this distance to match the speed of whatever missile mover you are using, though there may be a way to use another switch and a copy of the launch persistent with a -Z offset to detect if the target point is above or below a cliff but I doubt it would work because it would bring the location for the missiles to below the ground plane, which I dont think is possible.
Edit Dangit I have just thought of a more efficient way to do it, if you are curious just PM me it only requires small changes to what I have already done.**
I am kinda sorry I hadn't looked at the tutorial before I helped you mate, you can remov the find missiles search and just put the apply behavior effect in the launch effect on the missiles and save yourself an effect.
Unfortunately, your cliff collision collides with ramps, which makes it just as effective as a single Compare Cliff Level validator comparing the cliff level at the location of the missile with the cliff level at the source point (which is way easier to implement btw).
However, you mention a more effective way to do this, I am interested in it.
Your damage effect causes damage in an area. Remove the areas from the Search: Area + - field and set the Target - Impact Location + to Target Unit.
Also, your initial effect shoots 3 bullets at once, is this intended? Because they fire at exactly the same time, the missiles are in an area of 0. This causes the Destroy Persistent effect to destroy the persistents for all 3 missiles, I think, causing 2 of them to lose their impact check before their impact actually triggers. This is fixed by firing only one missile, or by adding a small delay between the 3 launches.
You can also try to scrap the destroy persistents and use a custom Source not dead - validator as a periodic validator for the persistent effect.