Page 1 of 2
startfire/rockets
Posted: Mon May 31, 2004 8:04 pm
by Elgan
can i spawn and make a bazooka and make it fire?
also
like with the flak88's is there a wait till on target cmd for mg42's?
local.gun2 setaimtarget local.org
local.gun2 wait on target?
local.gun2 startfiring
Posted: Mon May 31, 2004 8:09 pm
by jv_map
1) Yes, just spawn a bazooka and then do local.mybazooka anim fire

or local.mybazooka shoot
2) Yes, try waittill ontarget but in my experience it sometimes crashes
Alternatively you could easily script a waittill ontarget condition yourself
Example
Code: Select all
waittillontarget local.gun local.targetent:
while !(waitthread isontarget local.gun local.targetent)
wait 0.20
end
isontarget local.gun local.targetent:
local.vectotarget = vector_normalize (local.targetent.origin - local.gun.origin)
local.gunvec = local.gun.forwardvector
local.dotvec = local.gunvec * local.vectotarget
// 2 * arccos 0.95 gives the fov that's considered 'on target' (+- 10 degrees)
if(local.dotvec >= 0.95)
end 1
else
end 0
end
Posted: Mon May 31, 2004 8:21 pm
by Elgan
cool thanx. i tried a wait till and it made the guns explode:S:S...
its fine how it is anyway:D
Posted: Mon May 31, 2004 8:27 pm
by jv_map
lol impatient guns I suppose

Posted: Mon May 31, 2004 10:08 pm
by blue60007
jv_map wrote:1) Yes, just spawn a bazooka and then do local.mybazooka anim fire

or local.mybazooka shoot
Hey cool I didn't know you could do that.

Posted: Mon May 31, 2004 11:55 pm
by Elgan
"model" "weapons/kt2/bazooka.tik"
local.rockets anim fire
local.rockets2 anim fire
and it crashes mohaa:S
Posted: Mon May 31, 2004 11:57 pm
by Elgan
and local.rockets2 shoot
does nothing..maybe they need ammo?
Posted: Tue Jun 01, 2004 12:06 am
by Elgan
errm now when i try local.rocket shoot it also crashes mohaa:S:S:S
Posted: Tue Jun 01, 2004 6:15 am
by jv_map
You should spawn a bazooka, not a script_model with the bazooka model
Like this:
local.myzooka = spawn weapons/bazooka.tik
Posted: Tue Jun 01, 2004 10:44 am
by Elgan
errm
//
//local.rockets = spawn weapons/kt2/bazooka.tik
//local.rockets.angles = local.plane.angles
i was using that?
isnt that what u mean though:S
Posted: Tue Jun 01, 2004 4:34 pm
by blue60007
Well you have it commented, nothing will happen with that script.
Posted: Tue Jun 01, 2004 7:35 pm
by Elgan
lol thats because i commented it out then pasted it here

!.
i tried 1 last time but it just crashes the game:(
Posted: Wed Jun 02, 2004 1:35 am
by blue60007
Oh sorry...

Posted: Wed Jun 02, 2004 1:42 am
by Elgan
hehe its cool. btw if you would like to have a play with the planes the serv is up and less full as forced dmw 3.0 is on
connect with it and you will be fine..
Posted: Wed Jun 02, 2004 2:03 am
by blue60007
Hey I'll be right there...