I asked about this on irc, but no flawless solution appeared.
Basically I want an ability that shoots a missile in a straight line from the front of the unit, and if it hits an object/wall/unit/level border it explodes (damage optional, there are triggers for that). So basically a rocket launcher for your unit.
Suggestions so far:
- Keep using the Move trigger in a loop. In multiplayer when 16 people go macross missile massacre this will not work.
- Have a unit target a point, and a proximity trigger in a loop that blows it up. Same problem, plus what if you're facing a wall and it can't spawn the point?
I can't believe it is complicated to have a simple freaking missile that moves in a simple straight line. Even the hellion almost does this. So I must be stupid.
Seems like it would be a fairly straightforward projectile made from the Data Module. I created a 'grenade' and a rocket would be the same thing withoutthe Z stuff.
You must realize that a graphical representation of a missile and an actual object with collision detection are different things? Units in SC2 always fire missiles at a targeted unit, meaning the missile simply moves toward this unit and collides when in range.
I haven't tried the editor much yet, but in WC3 the way to do this was using "set unit x" and "set unit y" methods in a 0.03 or so periodic trigger (these lag much less than "move unit") and some maths calculating wether the unit hits the ground. Basically you have to substract the current terrain height from the unit's flying height, because the game engine forces the unit to be its height above the ground at all times. Good luck!
So the correct way to do this is to implement your own unit physics system for your projectiles, create an object of the type unit to represent your projectile, then write your own collision testing code, and maintain variables for each unit that you want to be collidable?
This seems like an awful lot of over head for a game that already has a physics engine and already tracks all of this stuff internally.
All the same I'm going to go ahead and just set up my own physics system to manage the movement of every unit in the map until some one comes up with a better idea :<
WC3 could do it with its *data editor* because there where already abilitys that did that (shockwave type effect) thereforce it was easy to get miras arrow or pudges hook. SC has no abilitys like that at all. there force you will probly need a trigger for just 1 bullet (missle) at a time.
WC3 could do it with its *data editor* because there where already abilitys that did that (shockwave type effect) thereforce it was easy to get miras arrow or pudges hook. SC has no abilitys like that at all. there force you will probly need a trigger for just 1 bullet (missle) at a time.
Well I don't know who mira or pudge are, but I get what your saying, people designed these attacks by basically copying existing attacks and modifying them to suit their needs. As clumsy as it feels I suppose manually building these attacks up from scratch is the only way to go. :(
My plan right now is to go ahead and do just that, and then be disappointed 2 weeks later when some one shows us a much better built in method ;)
Il also kinda trying to find out how to do your thing 2 with only units though. with walls and stuff you would probably have to put regions and triggers.
Didn't look at the map, but this shouldn't be too tough.
Have the ability create a unit. The unit has an actor with a missile model and is triggered to constantly move in one direction (until it times out I guess). The unit should also have a Behavior of the "Buff" type with a periodic effect. The periodic effect should be a "Search" with a minimum target of 1 and no error message. The effect will be a Set consisting of doing damage to the search target (or doing another search and damaging everything in an area if you want it to aoe) followed by the missile destroying itself.
Hope this all makes sense. I haven't tried, but I'm pretty good with Behaviors and Effects and I think this will work.
Quote from QuantumMenace:
I've been interested in this sort of thing since the editor came out, and found a way to do it with zero triggers. Here's a test map:
----
I created a trigger fire/collision system for my side-scroller. It has a baneling with a model of a missile and have I it so when it comes in a certain distance and height of a unit it explodes. It adds every missile fired to an array and adds all enemy units to a unit group and does comparisons on distance.
I also have it complicated where there's two missile types, one in the air and one on the ground as splash radius is 2d not 3d.
I've been interested in this sort of thing since the editor came out, and found a way to do it with zero triggers. Here's a test map:
I really like your rockets there, I am going to throw it onto an ability and consider using its core.
I assume the same thing can be done with non-missiles such as regular marine fire, if not making the missile invisible and splash effect being a marine fire... if so I would love to get a copy of that as well that or a tutorial ;)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I asked about this on irc, but no flawless solution appeared.
Basically I want an ability that shoots a missile in a straight line from the front of the unit, and if it hits an object/wall/unit/level border it explodes (damage optional, there are triggers for that). So basically a rocket launcher for your unit.
Suggestions so far: - Keep using the Move trigger in a loop. In multiplayer when 16 people go macross missile massacre this will not work. - Have a unit target a point, and a proximity trigger in a loop that blows it up. Same problem, plus what if you're facing a wall and it can't spawn the point?
I can't believe it is complicated to have a simple freaking missile that moves in a simple straight line. Even the hellion almost does this. So I must be stupid.
I am wondering the same thing.
Well it is possible, since we saw it in the galaga remake in the teaser vids.
Maybe setting it as a neutral unit that just moves forward till it hits something?
Seems like it would be a fairly straightforward projectile made from the Data Module. I created a 'grenade' and a rocket would be the same thing withoutthe Z stuff.
I've been working on this all day and despite some help from IRC have had no success at all. Hopefully some one comes up with a good solution :\
It's obviously possible, just look at WC3's DotA where you have Mirana's arrow and Pudge's hook. I wouldn't know how to do it myself though.
You must realize that a graphical representation of a missile and an actual object with collision detection are different things? Units in SC2 always fire missiles at a targeted unit, meaning the missile simply moves toward this unit and collides when in range.
I haven't tried the editor much yet, but in WC3 the way to do this was using "set unit x" and "set unit y" methods in a 0.03 or so periodic trigger (these lag much less than "move unit") and some maths calculating wether the unit hits the ground. Basically you have to substract the current terrain height from the unit's flying height, because the game engine forces the unit to be its height above the ground at all times. Good luck!
So the correct way to do this is to implement your own unit physics system for your projectiles, create an object of the type unit to represent your projectile, then write your own collision testing code, and maintain variables for each unit that you want to be collidable?
This seems like an awful lot of over head for a game that already has a physics engine and already tracks all of this stuff internally.
All the same I'm going to go ahead and just set up my own physics system to manage the movement of every unit in the map until some one comes up with a better idea :<
@NoRoo: Go
WC3 could do it with its *data editor* because there where already abilitys that did that (shockwave type effect) thereforce it was easy to get miras arrow or pudges hook. SC has no abilitys like that at all. there force you will probly need a trigger for just 1 bullet (missle) at a time.
Well I don't know who mira or pudge are, but I get what your saying, people designed these attacks by basically copying existing attacks and modifying them to suit their needs. As clumsy as it feels I suppose manually building these attacks up from scratch is the only way to go. :(
My plan right now is to go ahead and do just that, and then be disappointed 2 weeks later when some one shows us a much better built in method ;)
@NoRoo: Go
Il also kinda trying to find out how to do your thing 2 with only units though. with walls and stuff you would probably have to put regions and triggers.
I do this in my map, check out the collision trigger.
http://www.filedropper.com/topdownfightersv1
@TECGhost: Go
Wow! That map was tons of fun. The triggers don't seem that complicated, either. Well done. I'm gonna go back and play it a second time :P
@TECGhost: Go
holy crap. Really good game dude. Ty for showing us it.
Didn't look at the map, but this shouldn't be too tough.
Have the ability create a unit. The unit has an actor with a missile model and is triggered to constantly move in one direction (until it times out I guess). The unit should also have a Behavior of the "Buff" type with a periodic effect. The periodic effect should be a "Search" with a minimum target of 1 and no error message. The effect will be a Set consisting of doing damage to the search target (or doing another search and damaging everything in an area if you want it to aoe) followed by the missile destroying itself.
Hope this all makes sense. I haven't tried, but I'm pretty good with Behaviors and Effects and I think this will work.
Quote from QuantumMenace:
I've been interested in this sort of thing since the editor came out, and found a way to do it with zero triggers. Here's a test map:
----
epic first post~
Yeah that seemed easy enough.
@MasterDinadan: Go
This sorta works, but when I do it, the missili explodes automaticly when created, I guess it finds the shooting unit or itself or something
I created a trigger fire/collision system for my side-scroller. It has a baneling with a model of a missile and have I it so when it comes in a certain distance and height of a unit it explodes. It adds every missile fired to an array and adds all enemy units to a unit group and does comparisons on distance.
I also have it complicated where there's two missile types, one in the air and one on the ground as splash radius is 2d not 3d.
I am taking a look at the data way though.
Add traget filters for the behaviour serach and you are done :P
Go play Antioch Chronicles Remastered!
Also, coming soon, Antioch Episode 3: Thoughts in Chaos!
Dont like mapster's ugly white? Try Mapster's Classic Skin!
I really like your rockets there, I am going to throw it onto an ability and consider using its core.
I assume the same thing can be done with non-missiles such as regular marine fire, if not making the missile invisible and splash effect being a marine fire... if so I would love to get a copy of that as well that or a tutorial ;)