HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

make units train units

10-04-2003, 11:47 AM#1
jmoritz
This is for PR, the carrier :)
A work-around is easily found, but it would be so much better if the carrier could actually build the interceptors. Problem is: carrier becomes immobile when it builds.

Does anybody know any way at all to make the carrier move when building?
10-04-2003, 12:56 PM#2
ABM
u put a custom ability based in spell such as roar spell (u edit the ability to be "build interceptor" effect put everything to none it is supposed to be a dummie spell)

Then: u trigger:
event:
unit begin casting an ability
condition:
ability being cast = build interceptor
casting unit = carrier
action:
create 1 interceptor at position of casting unit facing default building.
add gold (0 - xx)gold to owner of casting unit.

xx is the gold cost of the interceptor if u want lumber cost too.
just add lumber (0 - yy)lumber to owner of casting unit.

u can also put a special effect if u wish to make it look better...
and if you and to take some time to build put in the action at first wait 10 s and turn trigger off and on.

ex:
action:
turn this trigger off
wait 10s
create 1 interceptor at position of casting unit facing default building.
create a special effect to origin of casting unit using blablabla special effect.
add gold (0 - xx)gold to owner of casting unit.
turn this trigger on

sometime with the wait order it doesn't work so u have to try but for the first trigger i am quite sure it works even closed eyes...

i hope it help :p
10-04-2003, 12:58 PM#3
35263526
one problem is that you can't que build orders using custom spells. There is a trigger workaround, and I need a day, but i'll post it when i'm done.
10-04-2003, 12:59 PM#4
Saethori
Yeah, but I think he wants to queue up interceptors, and make it seem more like a 'real' Carrier, from Starcraft.

Standing still while building isn't that much of a problem, is it? I think it's something hard-coded into the game.. unless someone knows something that can make a unit build and move simultaneously?
10-04-2003, 04:09 PM#5
jmoritz
That was what I was asking. I'm not a JASS newbie that got hired by accident :)

I already have a working work-around, including queueing of interceptors, and a passive ability that is added when the carrier is building. It's just not as good looking as real building :(
10-04-2003, 09:21 PM#6
ABM
If the unit training as a building is not a good option for it make the units unable to move and if u use trigger u don't like because cannot queue or u can queue but with passive ability wich screw a little the overlook at it.....

Why not add and inventory at ur carrier and make item to be interceptor, u will queue the item each time the order to build will be set, and them remove the item and reset them in order each time an interceptor is made, with the item it could look as it would be in a real units training, but it might be difficult to trigger out, but thats just an idea, what do u think?
10-04-2003, 10:59 PM#7
jmoritz
It's a good idea, especially as I hadn't thought of that yet. However, I don't know if it would look right. You know, a Carrier with an inventory is a little weird, even when we're using it for something completely different.
10-04-2003, 11:02 PM#8
35263526
I can do the triggers for you if you haven't got them already. They shouldn't be that hard.
10-05-2003, 02:53 AM#9
Saethori
If you go the trigger route, don't forget that only one interceptor is supposed to be 'trained' at once. So the trigger that checks if the interceptor 'item' is built should shut itself off at the beginning, and use an If/Then/Else to check if there are any more Interceptors..if there are it tells itself to fire again ignoring conditions, and if there aren't it reenables itself.

Also, and this is probably minor, make the interceptor items be able to be clicked (like a normal item ability) and if you do, it refunds some of your money and cancels that interceptor's production.
10-05-2003, 09:41 AM#10
PitzerMike
I'll add that to the next version of WEU. But units will not have that status bar where you can see the progress of the trained unit. and you'll have to remove the rallypoint ability from the unit to be able to move with a right click...