Page 1 of 1

Health for a flyingplane

Posted: Thu Jul 24, 2003 1:15 pm
by kho
Whats the script command to set a plane to have health. Also when it ran out of health, whats the command to set a destroyed plane model flying down to the ground.

Posted: Thu Jul 24, 2003 2:28 pm
by Bjarne BZR
$targetname_of_my_model.health = 200

and

$targetname_of_my_model.model = location_of_the_tiki/the_tiki.tik

( I could be wrong, but you are not explaining what you need in a large detail )

health for a plane

Posted: Fri Jul 25, 2003 3:31 am
by kho
Im making a plane in my map going to blow up 2 rockets, and a radio room. Theres a path for the plane to go.

Posted: Fri Jul 25, 2003 5:02 pm
by bdbodger
I did a map where the plane was a script model then I did something like this

thread stuka_health

stuka_health:
while($stuka.health >0)
waitframe

local.stuka_crash = spawn sriptmodel "model" "vehicles/stuka_wing_d2.tik"

local.stuka_crash.origin = $stuka.origin
$stuka remove

$crash_path.origin=local.stuka_crash.origin // $crash_path is the first node of a info_splinepath that is the path the plane will follow when it crashes
local.stuka_crash flypath $crash_path 1000 100

.....

.....

end

Posted: Fri Jul 25, 2003 5:20 pm
by kho
where do i put that shit.....?

crap

Posted: Fri Jul 25, 2003 8:56 pm
by tltrude
If you are going to call his script thread "crap", I think you can guess where he is going to tell you to stick it!!!!

Amen tltrude!

Posted: Sat Jul 26, 2003 2:06 am
by grb
Some forum members appear to be very rude to say the least!
KHO, just think. The person took the time to try to help you out,
why don't you have a little common decency?

Posted: Sat Jul 26, 2003 3:46 am
by HappyChappy_7000
crap is a bad word :(
is there any way to attach mg42s to planes?

Posted: Sat Jul 26, 2003 3:56 am
by Alcoholic
i think you can bind it, but if the plane turns, you'll have problems with the yaw min/max (if you set one)

Posted: Sat Jul 26, 2003 1:23 pm
by kho
i always say crap for some reason. im not trying to be rude, sorry if u thought i was. But this scripting help ur giving me is one step closer to finishing my cuban missile crisis map. (its a great map). so can u tell me when u put it?

Posted: Sun Jul 27, 2003 2:02 am
by HappyChappy_7000
you put the "thread stuka health" just after level waittill spawn

and then you put

Code: Select all

stuka_health: 
while($stuka.health >0) 
waitframe 

local.stuka_crash = spawn scriptmodel "model" "vehicles/stuka_wing_d2.tik" 

local.stuka_crash.origin = $stuka.origin 
$stuka remove 

$crash_path.origin=local.stuka_crash.origin // $crash_path is the first node of a info_splinepath that is the path the plane will follow when it crashes 
local.stuka_crash flypath $crash_path 1000 100 

..... 
under "end" of the "main" thread.
sry its confusing when i write it.
You have to edit some of the script other than copy and paste coz its just an example

m1l3b.scr

Posted: Sun Jul 27, 2003 12:27 pm
by tltrude
That stuka is in the m1l3b.scr script. You can find that script in pak5.pk3, but there are a lot of things that need to be put in the map to get it to work--like spline paths, triggers, and script_origins. It would be hard, even for a professional mapper/scripter to figure out. Search for "monkey_stuka" in the script.

There is also somthing like that in Spearhead, but I don't know which map it is off hand.

Posted: Sun Jul 27, 2003 4:14 pm
by kho
thanks alot guys :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: vv