Shooting plane tutorial


(th0rn3) #1

So as I promised, I made a shooting plane tutorial.
There are three methods to make a plane shoot.
Method 1:
Step 1:
Make a long map with high skybox

Step 2:
Add plane in the skybox and spline outside of the skybox, where you want your plane to get started. Give it scriptname plane and targetname plane

Step 3:
Now surround your spline with caulk box, not to get leaks (and sometimes plane ignores a leaked spline)
Note I added an extra spline just to make sure plane stays where it must stay.

Step 4:
Now make a spline where you want your plane to start shooting

Step 5:
Put splines where you want your shots to go

Step 6:
Move plane’s origin to first shooting spline’s origin

Step 7:
Now draw fire on the turrets’ end (but, because plane will move, make it a bit further, otherwise it will look like fire is in wings

Step 8:
Select ‘block of fire’ and make it a script_mover or whatever entity that can be setstated. Give it scriptname plane_fire and targetname fire1


(th0rn3) #2

Step 9:
Copy fires

Step 10:
Now comes the fun part, script. Just an example:

plane
{
	spawn
	{
		wait 500
		
		followspline 0 spl0 50000 wait
		
		wait 5000
		
		trigger self fly
	}
	
	trigger fly
	{
		
		
		followspline 0 spl0 1000 wait
		
		followspline 0 spl1 1000 wait
		
		trigger plane_fire fire1
		followspline 0 spl2 1000 wait
		
		trigger plane_fire fire2
		followspline 0 spl3 1000 wait
		
		trigger plane_fire fire3
		followspline 0 spl4 1000 wait
		
		trigger plane_fire fire4
		followspline 0 spl5 1000 wait
		
		trigger plane_fire fire5
		followspline 0 spl6 1000 wait
		
		trigger plane_fire fire6
		followspline 0 spl7 1000 wait
		
		trigger plane_fire fire7
		followspline 0 spl8 1000 wait
		
		followspline 0 spl9 1000 wait
	}
}

plane_fire
{
	spawn
	{
		setstate fire1 invisible
		setstate fire2 invisible
		setstate fire3 invisible
		setstate fire4 invisible
		setstate fire5 invisible
		setstate fire6 invisible
		setstate fire7 invisible
	}
	
	trigger fire1
	{
		setstate fire1 default
		
		wait 25
		
		setstate fire1 invisible
	}
	
	trigger fire2
	{
		setstate fire2 default
		
		wait 25
		
		setstate fire2 invisible
	}
	
	trigger fire3
	{
		setstate fire3 default
		
		wait 25
		
		setstate fire3 invisible
	}
	
	trigger fire4
	{
		setstate fire4 default
		
		wait 25
		
		setstate fire4 invisible
	}
	
	trigger fire5
	{
		setstate fire5 default
		
		wait 25
		
		setstate fire5 invisible
	}
	
	trigger fire6
	{
		setstate fire6 default
		
		wait 25
		
		setstate fire6 invisible
	}
	
	trigger fire7
	{
		setstate fire7 default
		
		wait 25
		
		setstate fire7 invisible
	}
}

So this was the method 1. Its kinda bad because it makes a lot of brushes. Other methods are a bit more simple, but I will only post a theory for now and later a tutorial.
Please note: don’t ask how to make plane move and about script_movers. You can only ask about shooting planes. I made this tutorial for users that know how to make something move. So if you dont know that you can either make a new topic or pm me.

Method 2:
As I said, only theory for now.
You can make one ‘block of fire’ give it an origin and move it with plane.

Method 3:
You can make one ‘block of fire’ and no ‘one spline per shot’, but only a shooting start spline. Then you can make shooting spline to call a routine which setstates fire block and increases accum. And when that accum reaches some number, script kills the routine

I hope you understand because I don’t :tongue:


(Miki) #3

Great job! But could you also supply that test .map and .script that you used here? =D Thanks


(Pytox) #4

Great tutorial!!! :slight_smile: Nice Job


(Zer0Cool) #5

well, nice done, but i would be interested inhow you would do the splashing sand/dirt at the floor when the bullet “hits” there.


(zenith-ply) #6

Great job on the tutorial!

And Miki, why do you seem to want to experience being kicked in the groin so badly? :wink:


(th0rn3) #7

Those things can be done with shader and setstating brushes on the ground


(TomTom7777) #8

For just one or a small number of bullets true, but for a train of bullets or strafing? So far the best I can think up is a combination of tcMod scroll and an animMap hmm:confused:

Anyway really great tutorial.
How about extending it to firing rockets from wing racks?
You could show how it was done in Bergen (Wolfproject Mapping Team, Detoeni.uk et al) as well as how it could be made to fire real rockets with a couple of shooter_rockets.
A variety of rocket racks could be modeled (3 clustered on a hardpoint, 3-5 on a xmas tree and the 4-5 flat rack). For the flat rack it could even be simulated with a brush and texture.
You could even do air-to-air rockets on the Axis Me262 (though the R4M rockect was much faster than a 30m/s panzerfaust)


(th0rn3) #9

Firing rockets won’t be a big problem just make a shooter_rocket instead of fire and alertentity them. And for more effect you can make a rocket model with the same origin as plane and setstate it when you alertentity those shooter_rocket.
And by the way, ‘real’ bullets can be made too, with a trigger_hurt


(nUllSkillZ) #10

Well done.
Very good.


(Zer0Cool) #11

And by the way, ‘real’ bullets can be made too, with a trigger_hurt

depends on the speed you let them fly. as more realistic the speed as more unrealistic the killing/hurt-effect


(Fluffy_gIMp) #12

nice work Thorn3!


(.Chris.) #13

For latest scene from theme round I came up with better solution for shooting planes using attachtotag with a fire md3 model that I made using that ET model tool thing that is aligned with the plane model and it’s origin which then follows the plane perfectly, then its a matter of using script to make it appear and disappear rapidly. I did this for two plane models, one already had tags with it but the other didn’t so had to use one of them invisible model things with the tags.

Took me a while but here is short clip of what it turned out like, its very short cause I only need to take one screenshot for the scene from theme competition, I can make longer example if anyone interested.

http://www.youtube.com/watch?v=tHgUqPk-FeQ (updated)


(IndyJones) #14

lol, this is looking great. maybe the planes are a little too slow, and the wings of sawmill are rotating at same angles if you know what i mean…


(Pegazus) #15

Good looking, the planes could just be a bit faster.
Is one of the planes Mustang P-51, hard to tell from such a short clip.


(.Chris.) #16

I’ve added couple more seconds of same scene but from different angle with slightly sped up planes.

After done with the scene map I’ll try make larger dog fight with same map that lasts longer.


(zenith-ply) #17

Nice. Kind of reminds me of one of those 3dmark render scenes tests when looped. Couldn’t tell if you tagged the engine exhaust flames or not.


(kamikazee) #18

[QUOTE=IndyJones;193551]lol, this is looking great. maybe the planes are a little too slow, and the wings of sawmill are rotating at same angles if you know what i mean…[/QUOTE]You mean the windmills are running “synchronized”? Indeed, windmills only rarely do that in real life, some random rotation offset would work wonders.


(TomTom7777) #19

It might work as a slow motion video if the windmills rotated much slower and there was a delay between the 3 Shermans firing and the exploding tanks. ME262s were to fly at 300KMH or higher to avoid some engine issues that would make the plane hard to handle so right now it looks pretty unrealistic. then there are the markings… the mustangs indicate Normandy invasion and the red spot on the ME-262s looks like they are trying to pretend that they are Russian red star markings. And I can’t tell what the Shermans are firing at but they could include AVREs for all I can see.

The two mustangs look like they are trying to kamikaze the ME262s (not a viable tactic). Better they come from above and behind in a dive as per tactics learned. Or they could be flying in front of the ME262s taking fire from behind and then banking in a sharp turn to get out of the fire zone. That and some engine and tank barrel smoke and I think you would have something real.

Btw I just noticed in the first 2 seconds the far mustang disappears a tenth of a second before the change of camera view.


(zenith-ply) #20

I’ll admit, I had issues with using the red strip in both camo schemes. My ref. was loosely from Janes ww2 fighters, which is focused on the Ardennes Offensive. Here is a screen shot from the 1998? game.