Whats the problem!?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Snipes
Corporal
Posts: 48
Joined: Sun Sep 07, 2003 11:28 am

Whats the problem!?

Post by Snipes »

Heres the error i recieve in qconsolelog

Code: Select all

------- Actual Spawning Entities Done ------------------ 27 ms
^~^~^ Add the following line to the *_precache.scr map script:
cache models/items/pulse_explosive.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/animate/fx_explosion_tank.tik
^~^~^ WARNING: func_crate entities 84 and 86 have overlapping volumes near (-105.767 370.197 -239) to (-71.1973 404.767 -233)
^~^~^ WARNING: func_crate entities 82 and 87 have overlapping volumes near (-244.803 367.16 -239) to (-212.16 399.803 -233)
^~^~^ WARNING: func_crate entities 82 and 88 have overlapping volumes near (-244.803 367.16 -239) to (-212.16 399.803 -233)
0 teams with 0 entities
unmatching {} pair
file 'maps/obj/complex.scr', source pos 3374:

unexpected end of file found
file 'maps/obj/complex.scr', source pos 3374:

^~^~^ Script file compile error:  Couldn't parse 'maps/obj/complex.scr'
ScriptMaster::GetScript: Script 'maps/obj/complex.scr' was not properly loaded

95 entities spawned
219 simple entities spawned
0 entities inhibited
Whats the problem in this, I think this is why my script isnt working, before it was working properly and the third bomb didnt work, neither the fan...! But now nothing works at all.. :(

heres my script:

Code: Select all

// SE COMPLEX BETA
// ARCHITECT: -={SE}=- Snipes
// SCRIPTER: -={SE}=- Snipes

main: 

   setcvar "g_obj_alliedtext1" "Destroy the Control panel" 
   setcvar "g_obj_alliedtext2" "Find the blueprints" 
   setcvar "g_obj_alliedtext3" "Destroy the chamber" 
   setcvar "g_obj_axistext1" "Defend the control panel" 
   setcvar "g_obj_axistext2" "Defend the blueprints" 
   setcvar "g_obj_axistext3" "Defend the chamber" 

   setcvar "g_scoreboardpic" "textures/scum/complex_other.tga" 
    
   ///////////////////////// 
   level waittill prespawn 
   ///////////////////////// 

   exec global/DMprecache.scr 

   level.script = maps/obj/complex.scr 

   // m6l1a is a blowing wnind sound 
   exec global/ambient.scr obj_team2 
   thread global/exploder.scr::main 

   level.defusing_team = "axis" 
   level.planting_team = "allies" 
   level.targets_to_destroy = 3 
   level.bomb_damage = 200 
   level.bomb_explosion_radius = 2048 

   // Set the parameters for round based match  
   level.dmrespawning = 0 // 1 or 0 (0=no respawn) 
   level.dmroundlimit = 5 // round time limit in minutes 
   level.clockside = axis // axis, allies, kills, or draw 

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

   //////////////////// 
   // level waittill roundstart // Use "//" for testing the bomb alone  
   //////////////////// 
   $panel_bomb thread global/obj_dm.scr::bomb_thinker 
   $third_bomb thread global/obj_dm.scr::bomb_thinker 
   thread desk_document_check 
   thread allies_win_bomb // Start the win check thread for allies 
   $panel_bomb thread axis_win_timer 
   level waittill axiswin
   level.fan_spinning = 0 
   thread bigfan_mover 

end 

////////FAN SCRIPTING////////
bigfan_mover: 

   while(1) // Forever
   {
      $bigfan_switch waittill trigger 

      if (level.fan_spinning == 0) 
      { 
         thread bigfan_start 
      } 
      else
      {
      if (level.fan_spinning == 1) 
      { 
         thread bigfan_stop
      }
   }
end

bigfan_start: 
   wait .5
   $bigfan loopsound lighthouse_run 
   $bigfan rotateY 3.6  // 10 seconds per revolution (6 rpm) 
   level.fan_spinning = 1
end 

bigfan_stop: 
   wait .5 
   $bigfan stoploopsound 
   $bigfan rotateY 0 
   level.fan_spinning = 0 
end 

// "Axis Victory" 
axis_win_timer: 
	level waittill axiswin 
end 

// "Allied Victory" 
allies_win_bomb: 
	while(level.targets_destroyed < level.targets_to_destroy) 
	{
		waitframe 
	}
	teamwin allies 
end 

desk_document_check: 
   while(1) { // forever 
      // Dont execute past this line 
      // until someone triggers the object 
      $documents_trigger waittill trigger 
      // parm.other is the triggerer 
      if(parm.other.dmteam == allies) { 
         // Make the document graphix disappear 

         $documents hide 
         // Tell the win method that an 
         // objective has been completed 
         level.targets_destroyed ++ // ++ adds 1 
         // break out of the while loop 
         iprintln "The blueprints have been stolen!!" //Type the message you want to be displayed when the documents are stolen 
         break 
      } 
      // protection against making this 
      // thread use too much CPU 
      waitframe 
   } 
end // end document checks 
im new to scripting really and if you could fix the problem so that my - Fan, Control Panel bomb, and Third bomb work that woudl be great .. Thanks!!
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Code: Select all

while(1) // Forever
   {
      $bigfan_switch waittill trigger

      if (level.fan_spinning == 0)
      {
         thread bigfan_start
      }
      else
      {
      if (level.fan_spinning == 1)
      {
         thread bigfan_stop
      }
   } 
Should be:

Code: Select all

while(1) // Forever
   {
      $bigfan_switch waittill trigger

      if (level.fan_spinning == 0)
      {
         thread bigfan_start
      }
      else if (level.fan_spinning == 1)
      {
         thread bigfan_stop
      }
   } 
And

Code: Select all

end // end document checks 
Should be:

Code: Select all

end
Image
Snipes
Corporal
Posts: 48
Joined: Sun Sep 07, 2003 11:28 am

Post by Snipes »

Thanks that fixed my main problem, yet the third bomb doesnt work? any ideas?

* Also when the control panel bomb blows the exploders on the third bomb go too, is this because they set exploder same targetname, but i thought it was not a variable that u could cahnge...?
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Snipes wrote:Thanks that fixed my main problem, yet the third bomb doesnt work? any ideas?
Define 'doesnt work' :wink:
Also when the control panel bomb blows the exploders on the third bomb go too, is this because they set exploder same targetname, but i thought it was not a variable that u could cahnge...?
Give them different #set values.
Image
Snipes
Corporal
Posts: 48
Joined: Sun Sep 07, 2003 11:28 am

Post by Snipes »

Godammit, the fan still dont work! - and what does this mean Im doing wrong, the third bomb doesnt work either. What does this mean..

Code: Select all

----------------------Z-----------------------
self = panel_bomb
self.target (flak 88 or other) = 
	println "self.target.destroyed_model = " self.target.destroyed_model (global/obj_dm.scr, 31)
	println "self.target.destroyed_model = " self.target^

^~^~^ Script Error: There are 0 entities with targetname ''. You are using a command that requires exactly one.

self.target.destroyed_model = NIL
	println "self.target.target (collision entity) = " self.target.target (global/obj_dm.scr, 32)
	println "self.target.target (collision entity) = " self.target^

^~^~^ Script Error: There are 0 entities with targetname ''. You are using a command that requires exactly one.

self.target.target (collision entity) = NIL
self.trigger_name = panel_trigger
self.exploder_set = 1
self.explosion_fx = models/fx/fx_explosion.tik
self.explosion_sound = NIL
self.killarea = groundzero
----------------------Z-----------------------
	self.target.collisionent = self.target.target (global/obj_dm.scr, 40)
	self.target.collisionent = self.target^

^~^~^ Script Error: There are 0 entities with targetname ''. You are using a command that requires exactly one.

	self.target.collisionent = self.target.target (global/obj_dm.scr, 40)
	self.target^

^~^~^ Script Error: There are 0 entities with targetname ''. You are using a command that requires exactly one.

	self.target notsolid (global/obj_dm.scr, 41)
	self.target ^

^~^~^ Script Error: There are 0 entities with targetname ''. You are using a command that requires exactly one.

waittill trigger panel_trigger
----------------------Z-----------------------
self = third_bomb
self.target (flak 88 or other) = 
	println "self.target.destroyed_model = " self.target.destroyed_model (global/obj_dm.scr, 31)
	println "self.target.destroyed_model = " self.target^

^~^~^ Script Error: There are 0 entities with targetname ''. You are using a command that requires exactly one.

self.target.destroyed_model = NIL
	println "self.target.target (collision entity) = " self.target.target (global/obj_dm.scr, 32)
	println "self.target.target (collision entity) = " self.target^

^~^~^ Script Error: There are 0 entities with targetname ''. You are using a command that requires exactly one.

self.target.target (collision entity) = NIL
self.trigger_name = third_trigger
self.exploder_set = 1
self.explosion_fx = models/fx/fx_explosion.tik
self.explosion_sound = NIL
self.killarea = groundzero2
----------------------Z-----------------------
	self.target.collisionent = self.target.target (global/obj_dm.scr, 40)
	self.target.collisionent = self.target^

^~^~^ Script Error: There are 0 entities with targetname ''. You are using a command that requires exactly one.

	self.target.collisionent = self.target.target (global/obj_dm.scr, 40)
	self.target^

^~^~^ Script Error: There are 0 entities with targetname ''. You are using a command that requires exactly one.

	self.target notsolid (global/obj_dm.scr, 41)
	self.target ^

^~^~^ Script Error: There are 0 entities with targetname ''. You are using a command that requires exactly one.
Image
Snipes
Corporal
Posts: 48
Joined: Sun Sep 07, 2003 11:28 am

Post by Snipes »

hmm nvm seems to be working now..
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

prespawn

Post by tltrude »

These lines should probably be above "level waittill spawn".

level.fan_spinning = 0
thread bigfan_mover

Also, You have "level waittill axiswin" above those two fan lines. Anything under that line wont be read until the axis team wins--bigfan thread is not being started. You don't need "level waittill axiswin" there anyway because it is below in the axis_win_timer thread.

What targetnames did you give your bombs and bomb triggers in the map? It helps to study the scripts from the stock objective maps (pak5). The "obj_dm.scr" script is in pak0.pk3/global.

Ps: A "while" loop should have a short wait in it, or it will cause the game to crash. Your's has a wait because it waits until the trigger is used. But, if a player helded down the use key, it may still crash the game. "jv_map" hates goto loops, I like em! You don't really need the word "else" at all.

Try to keep your script neat, so you can find threads quickly. Use tabs and blank lines, and remove all those tutorial comments.
Tom Trude,

Image
Post Reply