help::cannon

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Nanorobot
Private
Posts: 1
Joined: Fri Jun 28, 2002 1:44 pm
Location: UK

help::cannon

Post by Nanorobot »

How do I make the 15cm cannon model work? :?: I have a walktrough cannon that doesn't move. :) What are script entities about? I am planning to set us a whole single player map when I get it working.
Nanorobot.[/quote]
tstrait72
Second Lieutenant
Posts: 154
Joined: Tue Jun 04, 2002 1:25 am
Location: York, PA U.S.A.
Contact:

Post by tstrait72 »

I think u need to make a copy of the tiki file and change the classname to turretgun. there is a map with a similar setup(can't remember which one), find that map and look in the pk3. they probably included their files to make this work so you can just study them. Sorry I couldn't be more helpful, I'm at work while replying to this.
Toby, or not Toby, that is the question...

Staff Member
MoH Design
thingshappen
Private
Posts: 2
Joined: Sun Sep 04, 2005 8:09 am
Contact:

Cannon

Post by thingshappen »

flak88:

spawn script_origin "origin" ( 123.10 -2528.06 384.13 ) "targetname" "mytargets" // choose ur own bombing spots
spawn script_origin "origin" ( -248.03 -273.27 312.13 ) "targetname" "mytargets" // choose ur own bombing spots
spawn script_origin "origin" ( -460.12 2304.56 472.13 ) "targetname" "mytargets" // choose ur own bombing spots
spawn script_origin "origin" ( -366.77 3388.88 652.13 ) "targetname" "mytargets" // choose ur own bombing spots
spawn script_origin "origin" ( 488.00 3108.14 464.13 ) "targetname" "mytargets" // choose ur own bombing spots
spawn script_origin "origin" ( 488.01 3110.50 720.13 ) "targetname" "mytargets" // choose ur own bombing spots
spawn script_origin "origin" ( 474.73 3138.92 960.13 ) "targetname" "mytargets" // choose ur own bombing spots
spawn script_origin "origin" ( 483.30 -887.13 480.13 ) "targetname" "mytargets" // choose ur own bombing spots
spawn script_origin "origin" ( 902.86 -791.85 64.13 ) "targetname" "mytargets" // choose ur own bombing spots
spawn script_origin "origin" ( 34.24 56.09 328.13 ) "targetname" "mytargets" // choose ur own bombing spots
spawn script_origin "origin" ( -392.58 2879.13 240.13 ) "targetname" "mytargets" // choose ur own bombing spots



local.flak_base = spawn statweapons/flak88base.tik "origin" ( 20.11 1518.15 240.13) // choose ur own position of the flak88


local.flak_gun = spawn statweapons/flak88turret.tik "targetname" "flak88"
local.flak_gun angles ( 7.88 170 0.00) // choose ur angles of the turret (not really needed)
local.flak_gun.origin = local.flak_base.origin + ( 0 0 54 ) // change the 64 to the right height above base
local.flak_gun.dmprojectile = "projectiles/tigercannonshell.tik"

thread fire_flak88

end



fire_flak88:

while(1)
{

local.target = randomint($mytargets.size)+1
$flak88 setaimtarget $mytargets[local.target]
level.bang = $mytargets[local.target]
$flak88 playsound flak_snd_move
$flak88 waittill ontarget
$flak88 anim fire_scripted
$flak88 playsound flak_snd_fire3
waitthread bang
wait 4
}
end


end


bang:

local.Exp1 = spawn "fx/scriptbazookaexplosion.tik"
local.Exp2 = spawn "animate/fx_mortar_dirt.tik"
local.Exp3 = spawn "emitters/fireandsmoke.tik"
local.Exp4 = spawn "emitters/inferno.tik"
local.Exp5 = spawn "emitters/residual_fire.tik"

//exec global/earthquake.scr .23 4 0 0
local.Exp1.origin = level.bang
local.Exp1 anim start
local.Exp2.origin = level.bang
local.Exp2 anim start
local.Exp3.origin = level.bang
local.Exp3 anim start
local.Exp4.origin = level.bang
local.Exp4 anim start
local.Exp5.origin = level.bang
local.Exp5 anim start
wait 1
local.Exp1 remove
local.Exp2 remove
wait 20
local.Exp3 remove
local.Exp4 remove
local.Exp5 remove


end
Version 1.0
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Hi thingshappen, welcome to .Map... I wonder if you noticed this topic was more than 3 years old? :shock:
Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

Welcome to .map :)

Code: Select all

spawn script_origin "origin" ( 123.10 -2528.06 384.13 ) "targetname" "mytargets"
I like him :D he uses one-line spawning.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Post Reply