Need a hand with aircraft -1 reply

Please wait...

Commie

The elusive Member 132837.

50 XP

23rd December 2005

0 Uploads

1,850 Posts

0 Threads

#1 11 years ago

I'm trying to get a nice aircraft flyover effect for my map, like the Ju87s and IL-2s in A Day Of Zitadelle. I did a quick recode of the object in Zitadelle to spawn a Corsair and a quick recode of the Corsair for ambient sound effects, but when I place the object in the map the Corsair's don't fly over - in fact, they don't appear at all. Debug isn't helping either :(

Anyone able to lend a hand?

A copy of the code:

Spoiler: Show

rem *** Recode from A Day of Zitadelle - now Corsair instead of IL-2 *** ObjectTemplate.create Bundle corsairspawnrotator ObjectTemplate.geometry bullet_m1 ObjectTemplate.setHasCollisionPhysics 0 ObjectTemplate.aiTemplate B25CirclesAi rem --------------------------------------- ObjectTemplate.addTemplate corsairspawnrotation1 rem ---------------------------------------

ObjectTemplate.create RotationalBundle corsairspawnrotation1 ObjectTemplate.setHasCollisionPhysics 0 ObjectTemplate.geometry bullet_m1 rem --------------------------------------- ObjectTemplate.addTemplate AirCorsairSpawner ObjectTemplate.setPosition 400/0/0 ObjectTemplate.setRotation 0/0/0 rem --------------------------------------- ObjectTemplate.setMaxSpeed 60/0/0 ObjectTemplate.setAcceleration 10/0/0 ObjectTemplate.setContinousRotationSpeed -4/0/0

ObjectTemplate.create ObjectSpawner AirCorsairSpawner ObjectTemplate.setObjectTemplate 1 Corsair-R ObjectTemplate.setObjectTemplate 2 Corsair-R ObjectTemplate.holdObject 1 ObjectTemplate.SpawnDelay 190 ObjectTemplate.TimeToLive 10 ObjectTemplate.Distance 0 ObjectTemplate.spawnOffset 0/0/0 ObjectTemplate.team 2 ObjectTemplate.MaxNrOfObjectSpawned 1 ObjectTemplate.damageWhenLost 0




SacredLizard

Its cupnoodles not cuponoodles

50 XP

23rd April 2004

0 Uploads

918 Posts

0 Threads

#2 11 years ago

I didn't look too closely at the code. I dont think its necessarily a problem with that... all you did was replace the Il2's with corsairs, right?

THe trick with the flyover objects is that when you place the object in the editor, you are actually placing "corsairspawnrotator" which is, in fact the center of an 400 m ark. your planes fly the circumference of the circle. so, when you are thinking that they didn't spawn, actually they did, but 400m away from where you thought they would. basically, I had a trick for placing these in ed42. YOu make a special code for just the editor, that tells it to show a specific mesh at the position your actual planes would be. that way you will be able to judge where your planes will be ingame.




Commie

The elusive Member 132837.

50 XP

23rd December 2005

0 Uploads

1,850 Posts

0 Threads

#3 11 years ago

I've got the object right at the center of the arc and I've waited over 5 minutes, looked on the minimap for the icons...no Corsairs in sight :S




Commie

The elusive Member 132837.

50 XP

23rd December 2005

0 Uploads

1,850 Posts

0 Threads

#4 11 years ago

Ok all fixed mostly, I tried moving the the center of the arc and it works fine :doh: I changed the plane to a Hellcat too, but now I need to get the prop to spin (I recoded it to show the blurred model and removed the landing gear so it wasn't flying around with gear down).




commander29

I don't spend enough time here

50 XP

4th July 2006

0 Uploads

24 Posts

0 Threads

#5 11 years ago
RussianComrade;3686083Ok all fixed mostly, I tried moving the the center of the arc and it works fine :doh: I changed the plane to a Hellcat too, but now I need to get the prop to spin (I recoded it to show the blurred model and removed the landing gear so it wasn't flying around with gear down).

Wouldn't be easier just to hire a pilot :D

to make the propeller to rotate i suggest looking into windmill code ;), but essentially the code is almost the same as the rotating movement of the plane.




Commie

The elusive Member 132837.

50 XP

23rd December 2005

0 Uploads

1,850 Posts

0 Threads

#6 11 years ago

Yeah I already tried making a RotationalBundle with the hellcat_propblurred_m1 (or something like that) as the model and rotating, but it's still stuck. At least I got Hellcats roaring overhead as the US charges beaches with seagulls overhead, which is pretty sweet.

Oh and no need hiring a pilot, I get my pilot's license in a few years ;)