script for the hunt

Post your scripting questions / solutions here

Moderator: Moderators

OxYdO666
Corporal
Posts: 30
Joined: Wed Jul 07, 2004 5:26 pm

script for the hunt

Post by OxYdO666 »

my script is not work :cry: why not work??

Code: Select all

// THE HUNT

main:


	setcvar "g_obj_alliedtext1" "- Find and destroy" 
	setcvar "g_obj_alliedtext2" "the Flak 88 cannon"
	setcvar "g_obj_alliedtext3" ""

	setcvar "g_obj_axistext1" "- Defend the Flak 88"
	setcvar "g_obj_axistext2" "cannon"
	setcvar "g_obj_axistext3" " "

	setcvar "g_scoreboardpic" "objdm1"


	//////////////////////////
	level waittill prespawn
	//////////////////////////

	fix:
	local.static = spawn "statweapons/mg42_gun.tik" "targetname" "mg42b" 
	local.static.origin = ( XXX XXX XXX )
	local.static.angles = ( 0 180 0) 
	local.static yawCenter 180
	local.static maxyawoffset 60
	pitchCaps( 30 30 10 )
	local.static solid 
	local.static firetype bullet 

	local.mg42B = spawn script_model 
	local.mg42B model "statweapons/mg42_bipod.tik" 
	local.mg42B.origin = ( XXX XXX XXX ) 
	local.mg42B.angles = ( 0 180 0) 
	local.mg42B solid 
	end
	fix2:
	local.panzer = spawn models/vehicles/panzer_tank_europe.tik
	local.panzer.origin = ( XXX XXX XXX )
	local.panzer.angle = 272
	local.panzer solid
	local.panzer immune bullet
	local.panzer immune fast_bullet
	local.panzer immune bash
	local.panzer immune mg
	end


	thread random_explosions ( 2066.69 3620.12 -323.11 ) 10.80
	thread random_explosions ( 2408.76 3806.07 -323.11 ) 11.80
	thread random_explosions ( 2673.15 3591.22 -323.11 ) 12.80
	thread random_explosions ( 3064.78 3807.18 -323.11 ) 13.80
	thread random_explosions ( 3426.16 3588.14 -323.11 ) 14.80
	thread random_explosions ( 3780.39 3798.68 -323.11 ) 15.80
	thread random_explosions ( 4100.84 3571.22 -323.11 ) 16.80
	thread random_explosions ( 4437.62 3696.21 -323.11 ) 17.80
	thread random_explosions ( 4560.44 3314.60 -323.11 ) 18.80
	thread random_explosions ( 4951.02 2744.93 -323.11 ) 19.80
	thread random_explosions ( 5350.83 3367.20 -153.99 ) 24.80
	thread random_explosions ( 4357.60 2720.08 -153.99 ) 26.80
	thread random_explosions ( 4929.83 1588.79 -425.15 ) 29.80
	thread random_explosions ( 3398.84 1163.83 -109.61 ) 31.80

	end


	random_explosions local.location local.wait1 local.wait2: 

	wait (randomfloat local.wait1 + local.wait2) 
	local.hurt = spawn script_origin 
	local.hurt.origin = local.location + ( 0 0 64 ) // raise it up 4 feet 
	local.explosion = spawn script_model 
	local.explosion model models/animate/fx_mortar_dirt.tik 
	local.explosion.origin = local.location + ( 0 0 -16 ) 
	local.hurt playsound leadinmp 
	wait 5
	local.explosion anim start // has it own sound 
	radiusdamage local.hurt 256 384 
	wait 6
	local.explosion remove 
	local.hurt remove 

	end 

	//*** Precache Dm Stuff
	exec global/DMprecache.scr

	level.script = maps/obj/obj_team1.scr
	exec global/ambient.scr obj_team1



	//////////////////////////
	level waittill spawn
	//////////////////////////


	level.defusing_team = "axis"
	level.planting_team = "allies"

	// set the parameters for this round based match
	level.dmrespawning = 0 // 1 or 0
	level.dmroundlimit = 5 // round time limit in minutes
	level.clockside = axis // set to axis, allies, kills, or draw


	//////////////////////////
	level waittill roundstart
	//////////////////////////




// bomb planting setup


	$flak88_weapon1_trigger thread flak88_random_setup $flak88_weapon1_explosive $flak88_weapon1 $flak88_target1 $flak88_base1 4
	$flak88_weapon1_explosive thread global/obj_dm.scr::bomb_thinker
	
	thread allies_win_thread $flak88_weapon1_explosive
	$flak88_weapon1_explosive thread axis_win_timer


// objectives 

//	waitthread global/objectives.scr::reset_objectives 
//	waitthread global/objectives.scr::blank_objectives

//	waitthread global/objectives.scr::add_objectives 1 2 "Find and destroy the Flak88" //$flak88_weapon1_trigger.origin
//	wait 2
//	waitthread global/objectives.scr::current_objectives 1




end

//*** --------------------------------------------

almost_there1:
	//called by BSP
	 local.player = parm.other
	 if ( (local.player.dmteam != "allies") || (level.perimeter_breached == 1) )
		end
		
	 iprintlnbold "The Allies have breached the perimeter!"
	 level.perimeter_breached = 1 
end


//*** --------------------------------------------

allies_win_thread local.bomb1:
	while (local.bomb1.exploded != 1)
		wait .1
	
	teamwin allies
end


//"Axis Victory"


axis_win_timer:

	level waittill axiswin

end


//*** --------------------------------------------

flak88_random_setup local.explosive local.weapon local.point_at local.base local.number_of_locations:

	local.location = ((randomint (local.number_of_locations)) + 1)

	local.trigger_offset = self.origin - local.base.origin 
	local.weapon_offset = local.weapon.origin - local.base.origin 
	local.explosive_offset = local.explosive.origin - local.base.origin 
	local.point_at_offset = local.point_at.origin - local.base.origin 

	local.location = $("flak88_location" + local.location)
	local.base.origin = local.location.origin


	self.origin 		= local.trigger_offset 		+ local.base.origin 
	local.weapon.origin 	= local.weapon_offset 		+ local.base.origin 
	local.explosive.origin 	= local.explosive_offset 	+ local.base.origin 
	local.point_at.origin 	= local.point_at_offset 	+ local.base.origin 

	local.weapon setaimtarget local.point_at
end





// first thread... controls allies using the trigger


flak88_set_explosive_thinker local.bomb local.weapon:

	local.bomb model items/pulse_explosive.tik

while (1)
{
println "waittill trigger " self
self waittill trigger

	local.player = parm.other
	//"local.player.dmteam", can be 'spectator', 'freeforall', 'allies' or 'axis'
        if (local.player.dmteam !="allies") 
	{
		goto flak88_set_explosive_thinker local.bomb local.weapon
	println "failed dmteam check" local.player.dmteam
		
	}
	local.counter = 0

	//add check for allies vs nazi
	while ( (Isalive local.player) && (local.player cansee local.bomb level.bombusefov level.bomb_use_distance) && (local.player.useheld == 1) )
	{
		local.counter++
if ((local.counter % 5) == 0)
{
level.subtitleX = 100
level.subtitleY = 50
locprint level.subtitleX level.subtitleY("set "+ local.counter)
}
		wait .1
		if (local.counter >= level.bomb_set_time)
		{
			thread wait_for_axis local.bomb local.weapon
			thread waittill_explode local.bomb local.weapon
			local.bomb.live = 1
			end
		}
	}
	println "usetrigger but failed check" 
	if ! (local.bomb cansee local.player level.bombusefov  level.bomb_use_distance) 
		println "failed cansee check"	
	if ! (local.player.useheld == 1)
		println "failed useheld check" local.player.useheld
		
}
end



// second thread... controls axis using the trigger

wait_for_axis local.bomb local.weapon:
while (1)
{
self waittill trigger

	local.player = parm.other
	//"local.player.dmteam", can be 'spectator', 'freeforall', 'allies' or 'axis'
	//add check for nazi 
       if (local.player.dmteam !="axis") 

	{      println "failed dmteam check" local.player.dmteam
		goto wait_for_axis local.bomb local.weapon
			
	}
	local.counter = 0


	while ( (Isalive local.player) && (local.player cansee local.bomb level.bombusefov  level.bomb_use_distance) && (local.player.useheld == 1) )
	{
		local.counter++
if ((local.counter % 5) == 0)
{
level.subtitleX = 100
level.subtitleY = 70
locprint level.subtitleX level.subtitleY ("defuse "+local.counter)
}
		wait .1
		if (local.counter >= level.bomb_defuse_time)
		{
			thread flak88_set_explosive_thinker local.bomb local.weapon //start first thread again
			local.bomb.live = 0
			end
		}
	}
}
end



// third thread... times the bomb and makes it explode at the right time

waittill_explode local.bomb local.weapon:

	local.bomb model items/explosive.tik
	local.bomb playsound plantbomb


	self loopsound bombtick
	
	local.start_time = level.time
	while (level.time < (local.start_time + level.bomb_tick_time))
	{
		wait .1
		if (local.bomb.live != 1)
		{
			self stoploopsound
			end
		}
 	}
 	self stoploopsound
	thread explode local.bomb local.weapon
	self remove
end



// fourth thread... controls the explosion 

explode local.bomb local.weapon:

 
///// shake the players view
thread jitter_large 0
 local.temp = spawn script_model
 local.temp.origin = self.origin
 local.temp model "fx/fx_flak88_explosion.tik"
 local.temp anim start
 local.temp playsound explode_aagun
 
 local.weapon model models/statweapons/flak88_d.tik
 //origin   damage   radius    constant damage or not
 radiusdamage local.bomb.origin  level.bomb_damage level.bomb_explosion_radius
    local.bomb hide

	teamwin allies
end





// jitter large effect
// jitter_large [delay]

jitter_large local.time:

if (local.time)
	wait local.time

waitexec global/earthquake.scr .35 10 0 0

waitexec global/earthquake.scr .23 6 0 0

waitexec global/earthquake.scr 1 1 0 0

waitexec global/earthquake.scr 1.25 .3 0 1

end
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post by strafer »

It's not working because you are putting all of your scripts after the "level waittill prespawn". You are supposed to put it after "level waittill spawn". Try it then and if it doesnt work post your current script. Here's an example:

//////////////////////////
level waittill prespawn
//////////////////////////

//*** Precache Dm Stuff
exec global/DMprecache.scr

level.script = maps/obj/obj_team1.scr
exec global/ambient.scr obj_team1

//////////////////////////
level waittill spawn
//////////////////////////


local.jeep = spawn script_model
local.jeep model "models/vehicles/jeep.tik"
local.jeep.origin = ( 2542 3600 -215 )
local.jeep.angles = ( 0 50 90 )
local.jeep solid

end

level.defusing_team = "axis"
level.planting_team = "allies"

// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = axis // set to axis, allies, kills, or draw
The jeep is before the specifications of the defusing team and round base perameters and is after the level waittill spawn.
OxYdO666
Corporal
Posts: 30
Joined: Wed Jul 07, 2004 5:26 pm

Post by OxYdO666 »

thx!!! my tank work!!!
But bombardments do not still work :( why?
How can it be done so that the tower of the tank makes a rotation of 20 ? left or more and so that it fires a blow??

Code: Select all

// THE HUNT

main:


	setcvar "g_obj_alliedtext1" "- Find and destroy" 
	setcvar "g_obj_alliedtext2" "the Flak 88 cannon"
	setcvar "g_obj_alliedtext3" ""

	setcvar "g_obj_axistext1" "- Defend the Flak 88"
	setcvar "g_obj_axistext2" "cannon"
	setcvar "g_obj_axistext3" " "

	setcvar "g_scoreboardpic" "objdm1"


	//////////////////////////
	level waittill prespawn
	//////////////////////////


	//*** Precache Dm Stuff
	exec global/DMprecache.scr

	level.script = maps/obj/obj_team1.scr
	exec global/ambient.scr obj_team1



	//////////////////////////
	level waittill spawn
	//////////////////////////


thread random_explosions ( 2066.69 3620.12 -323.11 ) 10.80
thread random_explosions ( 2408.76 3806.07 -323.11 ) 11.80
thread random_explosions ( 2673.15 3591.22 -323.11 ) 12.80
thread random_explosions ( 3064.78 3807.18 -323.11 ) 13.80
thread random_explosions ( 3426.16 3588.14 -323.11 ) 14.80
thread random_explosions ( 3780.39 3798.68 -323.11 ) 15.80
thread random_explosions ( 4100.84 3571.22 -323.11 ) 16.80
thread random_explosions ( 4437.62 3696.21 -323.11 ) 17.80
thread random_explosions ( 4560.44 3314.60 -323.11 ) 18.80
thread random_explosions ( 4951.02 2744.93 -323.11 ) 19.80
thread random_explosions ( 5350.83 3367.20 -153.99 ) 24.80
thread random_explosions ( 4357.60 2720.08 -153.99 ) 26.80
thread random_explosions ( 4929.83 1588.79 -425.15 ) 29.80
thread random_explosions ( 3398.84 1163.83 -109.61 ) 31.80



end




random_explosions local.location local.wait1 local.wait2: 

wait (randomfloat local.wait1 + local.wait2) 
local.hurt = spawn script_origin 
local.hurt.origin = local.location + ( 0 0 64 ) // raise it up 4 feet 
local.explosion = spawn script_model 
local.explosion model models/animate/fx_mortar_dirt.tik 
local.explosion.origin = local.location + ( 0 0 -16 ) 
local.hurt playsound leadinmp 
wait 1 
local.explosion anim start // has it own sound 
radiusdamage local.hurt 256 384 
wait 4 
local.explosion remove 
local.hurt remove 
wait 25
thread random_explosions local.location local.wait1 local.wait2 

end 

	local.panzer = spawn models/vehicles/panzer_tank_europe.tik
	local.panzer.origin = ( 962.41 -1154.70 -400.12 )
	local.panzer.angle = 272
	local.panzer solid
	local.panzer immune bullet
	local.panzer immune fast_bullet
	local.panzer immune bash
	local.panzer immune mg
	local.panzer immune explosion
	local.panzer nodamage
	end



	level.defusing_team = "axis"
	level.planting_team = "allies"

	// set the parameters for this round based match
	level.dmrespawning = 0 // 1 or 0
	level.dmroundlimit = 5 // round time limit in minutes
	level.clockside = axis // set to axis, allies, kills, or draw


	//////////////////////////
	level waittill roundstart
	//////////////////////////
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

perhaps because thy're trying to do it before the round starts? you have the level waittill roundstart at the end. i'm not much of a DM scripter but i think you'll need to put those after all that. 8-)
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
OxYdO666
Corporal
Posts: 30
Joined: Wed Jul 07, 2004 5:26 pm

Post by OxYdO666 »

it's my total script! no obj script ,the hunt is a obj map! :) Thus it would be necessary ke I put apres waittill roundstart?

Code: Select all

// THE HUNT 

main: 


   setcvar "g_obj_alliedtext1" "- Find and destroy" 
   setcvar "g_obj_alliedtext2" "the Flak 88 cannon" 
   setcvar "g_obj_alliedtext3" "" 

   setcvar "g_obj_axistext1" "- Defend the Flak 88" 
   setcvar "g_obj_axistext2" "cannon" 
   setcvar "g_obj_axistext3" " " 

   setcvar "g_scoreboardpic" "objdm1" 


   ////////////////////////// 
   level waittill prespawn 
   ////////////////////////// 


   //*** Precache Dm Stuff 
   exec global/DMprecache.scr 

   level.script = maps/obj/obj_team1.scr 
   exec global/ambient.scr obj_team1 



   ////////////////////////// 
   level waittill spawn 
   ////////////////////////// 


thread random_explosions ( 2066.69 3620.12 -323.11 ) 10.80 
thread random_explosions ( 2408.76 3806.07 -323.11 ) 11.80 
thread random_explosions ( 2673.15 3591.22 -323.11 ) 12.80 
thread random_explosions ( 3064.78 3807.18 -323.11 ) 13.80 
thread random_explosions ( 3426.16 3588.14 -323.11 ) 14.80 
thread random_explosions ( 3780.39 3798.68 -323.11 ) 15.80 
thread random_explosions ( 4100.84 3571.22 -323.11 ) 16.80 
thread random_explosions ( 4437.62 3696.21 -323.11 ) 17.80 
thread random_explosions ( 4560.44 3314.60 -323.11 ) 18.80 
thread random_explosions ( 4951.02 2744.93 -323.11 ) 19.80 
thread random_explosions ( 5350.83 3367.20 -153.99 ) 24.80 
thread random_explosions ( 4357.60 2720.08 -153.99 ) 26.80 
thread random_explosions ( 4929.83 1588.79 -425.15 ) 29.80 
thread random_explosions ( 3398.84 1163.83 -109.61 ) 31.80 



end 




random_explosions local.location local.wait1 local.wait2: 

wait (randomfloat local.wait1 + local.wait2) 
local.hurt = spawn script_origin 
local.hurt.origin = local.location + ( 0 0 64 ) // raise it up 4 feet 
local.explosion = spawn script_model 
local.explosion model models/animate/fx_mortar_dirt.tik 
local.explosion.origin = local.location + ( 0 0 -16 ) 
local.hurt playsound leadinmp 
wait 1 
local.explosion anim start // has it own sound 
radiusdamage local.hurt 256 384 
wait 4 
local.explosion remove 
local.hurt remove 
wait 25 
thread random_explosions local.location local.wait1 local.wait2 

end 

   local.panzer = spawn models/vehicles/panzer_tank_europe.tik 
   local.panzer.origin = ( 962.41 -1154.70 -400.12 ) 
   local.panzer.angle = 272 
   local.panzer solid 
   local.panzer immune bullet 
   local.panzer immune fast_bullet 
   local.panzer immune bash 
   local.panzer immune mg 
   local.panzer immune explosion 
   local.panzer nodamage 
   end 



   level.defusing_team = "axis" 
   level.planting_team = "allies" 

   // set the parameters for this round based match 
   level.dmrespawning = 0 // 1 or 0 
   level.dmroundlimit = 5 // round time limit in minutes 
   level.clockside = axis // set to axis, allies, kills, or draw 


   ////////////////////////// 
   level waittill roundstart 
   ////////////////////////// 



// bomb planting setup 


   $flak88_weapon1_trigger thread flak88_random_setup $flak88_weapon1_explosive $flak88_weapon1 $flak88_target1 $flak88_base1 4 
   $flak88_weapon1_explosive thread global/obj_dm.scr::bomb_thinker 
    
   thread allies_win_thread $flak88_weapon1_explosive 
   $flak88_weapon1_explosive thread axis_win_timer 


// objectives 

//   waitthread global/objectives.scr::reset_objectives 
//   waitthread global/objectives.scr::blank_objectives 

//   waitthread global/objectives.scr::add_objectives 1 2 "Find and destroy the Flak88" //$flak88_weapon1_trigger.origin 
//   wait 2 
//   waitthread global/objectives.scr::current_objectives 1 




end 

//*** -------------------------------------------- 

almost_there1: 
   //called by BSP 
    local.player = parm.other 
    if ( (local.player.dmteam != "allies") || (level.perimeter_breached == 1) ) 
      end 
       
    iprintlnbold "The Allies have breached the perimeter!" 
    level.perimeter_breached = 1 
end 


//*** -------------------------------------------- 

allies_win_thread local.bomb1: 
   while (local.bomb1.exploded != 1) 
      wait .1 
    
   teamwin allies 
end 


//"Axis Victory" 


axis_win_timer: 

   level waittill axiswin 

end 


//*** -------------------------------------------- 

flak88_random_setup local.explosive local.weapon local.point_at local.base local.number_of_locations: 

   local.location = ((randomint (local.number_of_locations)) + 1) 

   local.trigger_offset = self.origin - local.base.origin 
   local.weapon_offset = local.weapon.origin - local.base.origin 
   local.explosive_offset = local.explosive.origin - local.base.origin 
   local.point_at_offset = local.point_at.origin - local.base.origin 

   local.location = $("flak88_location" + local.location) 
   local.base.origin = local.location.origin 


   self.origin       = local.trigger_offset       + local.base.origin 
   local.weapon.origin    = local.weapon_offset       + local.base.origin 
   local.explosive.origin    = local.explosive_offset    + local.base.origin 
   local.point_at.origin    = local.point_at_offset    + local.base.origin 

   local.weapon setaimtarget local.point_at 
end 





// first thread... controls allies using the trigger 


flak88_set_explosive_thinker local.bomb local.weapon: 

   local.bomb model items/pulse_explosive.tik 

while (1) 
{ 
println "waittill trigger " self 
self waittill trigger 

   local.player = parm.other 
   //"local.player.dmteam", can be 'spectator', 'freeforall', 'allies' or 'axis' 
        if (local.player.dmteam !="allies") 
   { 
      goto flak88_set_explosive_thinker local.bomb local.weapon 
   println "failed dmteam check" local.player.dmteam 
       
   } 
   local.counter = 0 

   //add check for allies vs nazi 
   while ( (Isalive local.player) && (local.player cansee local.bomb level.bombusefov level.bomb_use_distance) && (local.player.useheld == 1) ) 
   { 
      local.counter++ 
if ((local.counter % 5) == 0) 
{ 
level.subtitleX = 100 
level.subtitleY = 50 
locprint level.subtitleX level.subtitleY("set "+ local.counter) 
} 
      wait .1 
      if (local.counter >= level.bomb_set_time) 
      { 
         thread wait_for_axis local.bomb local.weapon 
         thread waittill_explode local.bomb local.weapon 
         local.bomb.live = 1 
         end 
      } 
   } 
   println "usetrigger but failed check" 
   if ! (local.bomb cansee local.player level.bombusefov  level.bomb_use_distance) 
      println "failed cansee check"    
   if ! (local.player.useheld == 1) 
      println "failed useheld check" local.player.useheld 
       
} 
end 



// second thread... controls axis using the trigger 

wait_for_axis local.bomb local.weapon: 
while (1) 
{ 
self waittill trigger 

   local.player = parm.other 
   //"local.player.dmteam", can be 'spectator', 'freeforall', 'allies' or 'axis' 
   //add check for nazi 
       if (local.player.dmteam !="axis") 

   {      println "failed dmteam check" local.player.dmteam 
      goto wait_for_axis local.bomb local.weapon 
          
   } 
   local.counter = 0 


   while ( (Isalive local.player) && (local.player cansee local.bomb level.bombusefov  level.bomb_use_distance) && (local.player.useheld == 1) ) 
   { 
      local.counter++ 
if ((local.counter % 5) == 0) 
{ 
level.subtitleX = 100 
level.subtitleY = 70 
locprint level.subtitleX level.subtitleY ("defuse "+local.counter) 
} 
      wait .1 
      if (local.counter >= level.bomb_defuse_time) 
      { 
         thread flak88_set_explosive_thinker local.bomb local.weapon //start first thread again 
         local.bomb.live = 0 
         end 
      } 
   } 
} 
end 



// third thread... times the bomb and makes it explode at the right time 

waittill_explode local.bomb local.weapon: 

   local.bomb model items/explosive.tik 
   local.bomb playsound plantbomb 


   self loopsound bombtick 
    
   local.start_time = level.time 
   while (level.time < (local.start_time + level.bomb_tick_time)) 
   { 
      wait .1 
      if (local.bomb.live != 1) 
      { 
         self stoploopsound 
         end 
      } 
    } 
    self stoploopsound 
   thread explode local.bomb local.weapon 
   self remove 
end 



// fourth thread... controls the explosion 

explode local.bomb local.weapon: 

  
///// shake the players view 
thread jitter_large 0 
 local.temp = spawn script_model 
 local.temp.origin = self.origin 
 local.temp model "fx/fx_flak88_explosion.tik" 
 local.temp anim start 
 local.temp playsound explode_aagun 
  
 local.weapon model models/statweapons/flak88_d.tik 
 //origin   damage   radius    constant damage or not 
 radiusdamage local.bomb.origin  level.bomb_damage level.bomb_explosion_radius 
    local.bomb hide 

   teamwin allies 
end 





// jitter large effect 
// jitter_large [delay] 

jitter_large local.time: 

if (local.time) 
   wait local.time 

waitexec global/earthquake.scr .35 10 0 0 

waitexec global/earthquake.scr .23 6 0 0 

waitexec global/earthquake.scr 1 1 0 0 

waitexec global/earthquake.scr 1.25 .3 0 1 

end
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

no no no, i didn't mean for you to delete the roundstart, i meant that all this may be trying to happen before the round starts.... it may make no difference (as i said i'm not an MP scripter) but it seems to me that if you have a waittill roundstart at the end, which ould be the beginning of the actual level, that all this wouldn't occur during the level. :wink:
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
OxYdO666
Corporal
Posts: 30
Joined: Wed Jul 07, 2004 5:26 pm

Post by OxYdO666 »

I made the same thing on D village and that functions! I have to replace it by a bombardment with animation plane and that goes
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post by strafer »

I can tell you how to make a script for a tank to move and shoot, but it conflicts with the bomb. If you put a bombing plane or a moving tank in an obj map, you won't be able to set the bomb. So I recommend that you don't unless someone knows how to fix that problem because I haven't figured that out yet. 8-)
OxYdO666
Corporal
Posts: 30
Joined: Wed Jul 07, 2004 5:26 pm

Post by OxYdO666 »

Then how as it is made to have a tank which deplace and which fires :D !???????? thx!! I have to add vehicules, to elevator, mg42 I understands has can pret how add things on the map!
thx lizardkid By you I understood how to put the commands!!! :P
OxYdO666
Corporal
Posts: 30
Joined: Wed Jul 07, 2004 5:26 pm

Post by OxYdO666 »

what is the script for a tank moved and fire??
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post by strafer »

Ffirst you have to spawn an entity for the panzer. EX:

spawn vehicles/tigertank.tik "targetname" "tiger1"
$tiger1.origin = ( xxx xxx xxx )
$tiger1.angle = xxx
$tiger1.gun = $tiger1 QueryTurretSlotEntity 0
$tiger1.gun2 = $tiger1 QueryTurretSlotEntity 1
$tiger1 solid

You can set the health on that script too and tell it to be removed when it dies. If you do that then you can go more advanced and make it explode and create a destroyed model of the tank when it is blown up 8-) .

Then you have to create nodes for the tank. Also, you must create a spot where the tank fires at.

Once you finished that, then you have to connect the paths for the tank. EX:

$node6.target = NULL
$tiger1 drive $node2
$tiger1 waittill drive
$tiger1 stop
$tiger1.gun setAimTarget $aim1
$tiger1.gun waittill ontarget
$tiger1.gun anim fire

And, of course, you have to make it a thread and place "thread MyThread" below level waittill spawn.

And also, there are only certain models you can use for the tanks to move. You can make anything move, but the tiger tank is one of them that has animations.

If you are using Spearhead, then you may not hear the sounds of the tank moving. This is caused by an ubersound error. If it does happen to you, don't worry. It will work on a dedicated server just fine. It happens to me. I'm not sure if there is a fix out there for it. If there is then someone needs to tell me about it :shock: .
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post by strafer »

I just found another vehicle that has an animation and sound to it when you script it to move and fire 8-) . Here's the path: vehicles/panzerwerfer_base.tik

It's a cool looking vehicle. It's in the shape of a German halftrack and has a turret on the top of it with 2 rows of 4 rocket launchers 8-) .

It is only for Spearhead though :( .
Last edited by strafer on Fri Jul 09, 2004 7:55 pm, edited 1 time in total.
Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

i intend to bring these tanks and the panzerwerfer to my new map Euro..........
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post by strafer »

lizardkid wrote:i intend to bring these tanks and the panzerwerfer to my new map Euro..........
Cool. Tell me when the map is finished or needs testing. I will be glad to test it for you. I always like a new map. :D
Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

sure, i'm just in bare-bones mode right now, so it's not near finished but most of the major mapping's done. :) btw, it'll be SP for SH. :wink:
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Post Reply