HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Aircraft Takeoff/Landing

02-10-2005, 11:44 PM#1
yuripro84
ok, i will have an aircraft unit on my map (when i decide to add alliance's side) called the harrier (and lack jet(more advanced version)). I want to make itso these start on the ground and then when ordered to move or attack move, it will go up a little while moving, and then ounce it hits a target or meets its destination, it will be ordered to go back to a specific airpad(same it came from)
Heres what i have so far for take-off. I still have no idea what to do to make them come back after they reach there destination or hit a target. I also dont know how to make them go 2 the same exact place and land slowly. To maker it make more sence, the airpod things for the aircraft have 4 little things for planes to land on(and are buildable, so for regions, just need to say region-move if needed). I would also like to know the exact triggers if you know them for the takeoff trigger, lol, i know they exist, but, i forgot where to find the event and condition
EDIT:I forgot to add that the units course can be changed and that it WILL have a spell for missle 1 and 2, so you can make it when it isnt moving, make it go back to original base or something??well, thanx if you try anyway(even if you read the post, thank you so much)


>Takeoff
EVENT
When a unit is ordered to (attack-)move
CONDITION
triggering unit is = Undead(different races for each type of unit)
ACTION
EDIT:the thingy below this post

THANX IN ADVANCE!!!
02-11-2005, 12:30 AM#2
Guest
Quote:
Originally Posted by yuripro84
ok, i will have an aircraft unit on my map (when i decide to add alliance's side) called the harrier (and lack jet(more advanced version)). I want to make itso these start on the ground and then when ordered to move or attack move, it will go up a little while moving, and then ounce it hits a target or meets its destination, it will be ordered to go back to a specific airpad(same it came from)
Heres what i have so far for take-off. I still have no idea what to do to make them come back after they reach there destination or hit a target. I also dont know how to make them go 2 the same exact place and land slowly. To maker it make more sence, the airpod things for the aircraft have 4 little things for planes to land on(and are buildable, so for regions, just need to say region-move if needed). I would also like to know the exact triggers if you know them for the takeoff trigger, lol, i know they exist, but, i forgot where to find the event and condition

>Takeoff
EVENT
When a unit is ordered to (attack-)move
CONDITION
triggering unit is = Undead(different races for each type of unit)
ACTION
set height of unit to XXX
wait XXX sec
set height of unit to XXX
wait XXX sec
set height of unit to XXX
wait XXX sec
set height of unit to XXX
wait XXX sec
set height of unit to XXX(slowly move up)

THANX IN ADVANCE!!!

Event - use the generic unit event and set it to be attack-move.
Condition - if I remember correctly, use boolean - unit classification (or was it type) is undead equal to true.

Have no idea about the actions - never seen an action for setting height, but then that's most likely cause I am a bit tunnel-visioned ^_^ - but I do have a suggestion: why not use a loop or something and a counter for the xxx height. Then you won't need the wait actions, and the unit avoids appearing to stutter as it rises. You can probably use time (a real counter in other words) as the basis for the increasing height of the plane.
02-11-2005, 02:07 AM#3
yuripro84
didnt know there was such thing for that action??ill check it out. well thanx for the help ^_^ now i need to know how to do landin and being sent back :( anybody know how??
02-11-2005, 07:37 AM#4
Guest
Maybe give the unit to neutral passive for the time it lands or takes off and then back to its owner?
02-11-2005, 01:37 PM#5
yuripro84
well, when in mid-air, i want there course to be able to change, which is another problem, along with comin back to its owner
02-11-2005, 02:47 PM#6
Guest
Quote:
Originally Posted by yuripro84
well, when in mid-air, i want there course to be able to change, which is another problem, along with comin back to its owner


Some complicated triggers on the way ^_^

If this could help you... maybe you should make three different units for each aircraft and work with the replace unit trigger, one that can't move (and maybe that is mechanical and could be repaired?) on the ground, one that goes very slow while taking off, and one that goes fast and has the missiles while in the air.

All I can do right now is wish you a lot of good luck for your map, and I hope you'll be able to make this trigger work
02-12-2005, 11:53 AM#7
johnfn
Yea pretty much. Have a unit and steadily raise its flying height with triggers, Then when it reaches peak height, swap it with an actual flying unit - the same exact unit except the movement type set to flying and the flying height set to what it should be. That should account for all your problems.
02-13-2005, 09:38 AM#8
yuripro84
ya, but know i need the harder part, coming back and landing in the exact location
you see, theres 4 pads, each pad will hold 1 airplane, the problem is that you can make more than one of these, so i need to know how to make them go into the same place they came from, is this possible?
IDEA:Is it possible to give him the return gold ability and make him return the gold(even though he has none) to the same place when attacks and has no missles left??
02-23-2005, 05:03 PM#9
HazeyInDaHead
Just me or do i see the coming back trgger relatively easy?

You said the actually attack would be skills soo...

Event
A unit finishes casting an ability

Condition
Ability equal to Fox2
Casting unit equal to harrier

Action
Order Casting Unit to move-to region (I think you make it move to a certain point in the region, in that case, make it move all the way to the back of the region.)

<make the region longer than the actual airfield so when it "enters" before it gets to the specified point, you have time to do the landing height actions>

PS Hi yuripro its me Hazey!! Im still looking at your magnetron, I think I can make the model but animations and skin i dont think i can do =)
02-23-2005, 05:29 PM#10
Kamux
but then you still wont know where the harrier came from...

I think the best way is to store the "airport" and the "plain" into 2 arrays, on the same arrayindex. then whe the unit has attacked/reached his destination run a loop the check wich plane it was, and so you can determine where the plain came from.
02-24-2005, 01:50 AM#11
Raptor--
esentially have some kind of referencing variable, probably custom value is best, though handle variables would work too, but essentially put the regions or points or landing pads into an array with the same index as the aircrafts...

as for taking off and landing, i'd probably use local variables to make things simpler to keep track of, and run a function whenever the plane is made to attack

Code:
function TakeOff(unit Z, unit targetUnit)
    local unit udg_plane
    local integer i
    udg_plane = Z
    
    for i = 0 to 50
        set flying height of udg_plane to (10 * i)
        order udg_plane to move to position of (self + (100, 0))
        wait 0.20 seconds
    endloop
    
    replace udg_plane with (real plane)
    order last replaced unit to attack targetUnit
end function
*i didn't use proper syntax or anything

this can be converted into a trigger of course if you want, also i'm not completely sure if waits mess things up, i assume not since they're all running in independent triggers/functions with local variables

once u figured out when the plane has fired its payload, run another trigger or function to make it fly back to region[unit's custom value] + (400, 0) or something like that, then make something that basically reverses take off for landing

the only thing i see is determining when the plane has come within range to land, i can think of a few ways but they're all not that efficient... basically adding the event (unit comes within range of (unit)) for the landing pads to a trigger that will check if the unit coming within range is an aircraft with the same custom value :S

well, my solution isn't the best in that regard but its the best i can think of on the spot without the editor open