Page 2 of 3

Posted: Fri Apr 22, 2005 7:38 pm
by k47a
Yes I can see your signature but when I try to visit moh.gamesnet.pl or your sig, it says that it can't find the site... :x
Did I firewall-antispyware-and-cookie-whatever it to death??? :shock:

Posted: Fri Apr 22, 2005 8:25 pm
by lizardkid
http://moh.gamesnet.pl/rookieone/?lang=english

works for me when i clicked the sig.

Posted: Sat Apr 23, 2005 11:13 am
by k47a
Phew! Thank you God!!! :D It does work now, spasibo, thank you sooooo much, Rookie One! I'm gonna try it asap...
Computers are such bastards sometimes... :?

Posted: Sat Apr 23, 2005 12:15 pm
by k47a
Alright, it almost works :D
One more problem: my script. :? I know I musta done something wrong as BOTH wires appear at the same time...


main:

exec global/ai.scr

//////////

level waittill prespawn

$enemyspawn ai_on


/////////


level waittill spawn

// player weapons
$player item weapons/colt45.tik
$player item weapons/m1_garand.tik
$player item weapons/mp40.tik


// give him some ammo!
$player ammo pistol 32
$player ammo smg 100
$player ammo rifle 60



thread global/ai.scr::spawngroup #1 #1


//put this line at the beginning of the script:
$cut_wire hide

lorry_disable:
$normal_wire delete
$lorry_engine playsound m1l2b_disabletruck
$cut_wire show
iprintlnbold_noloc "The lorry has been disabled!"
// put whatever stuff you want to be done when the lorry has been disabled here
end
What do I have to change?
But anyway, Rookie, thank you so much for your help - you'll have my deepest gratitude (?) for the rest of your life :D

Posted: Sat Apr 23, 2005 5:08 pm
by Rookie One.pl
No problem, always willing to help, especially girls. 8-)
I wrote://put this line at the beginning of the script:
$cut_wire hide
See it now? ;)

Posted: Sat Apr 23, 2005 5:21 pm
by Mj
You seem to have a main with no end :? Dunno if this affects anything :oops:

Posted: Sat Apr 23, 2005 8:37 pm
by k47a
Rookie One.pl {sfx} wrote:No problem, always willing to help, especially girls. 8-)
Hehe :D !

Yeah, I saw that I have only one end... I checked with the script for the existing MOH map (how to disable a truck) and found that there should be some more of those :roll:
What does the line 'end' do anyway?
I'll change that in my sucking script and I guess it should work after that... I'll let ya know.
Thanks very much for the help again. Really, without all the help from you nice guys I would've given up long ago... :D

Posted: Sat Apr 23, 2005 8:51 pm
by Mj
Its just telling the script to stop; end = end thread. main: is just a thread, that is automatically called, so it still needs an end :)

Posted: Sat Apr 23, 2005 9:03 pm
by Rookie One.pl
Well, actually, it's just a label. It's just called by the game by default being the first one in the script. The exec command creates a new ScriptThread instance at the first label encountered in the file (actually, it's not needed - scripts will execute even if there's none), the thread command - starting at the label given, and the end command kills the thread. Waitexec and waitthread do exactly the same, however, they wait for the created thread to finish.
-IvaN- wrote:
Rookie One.pl {sfx} wrote:No problem, always willing to help, especially girls. 8-)
Hehe :D !
I'm trying to be a gentleman. :P

Posted: Sat Apr 23, 2005 10:47 pm
by Mj
Hehe, I just got Own3d by Rookies end definition :D

I tried :wink: :P

Posted: Sun Apr 24, 2005 8:43 am
by k47a
Yippie! It works, the darn truck finally works :lol: :D :D :D :D :D :D
I had some strange wire stuff in the map as well (as I had to remake the truck several times and obviously didn't delete everything...
And I had to change the script as well... I worked on it for about two hours (in the early morning hours, that is about one am :D ). I tried every possible combination and also tried to put an 'end' and 'main' in every possible space :lol: but finally I managed... Phew. I've just got no idea about scripting (the order of it etc.) I sure downloaded the scripting tutorials, but I think if you're a bl**dy noob like I am - no way... :?
Thanks for the help; yeah, you really are gentlemen :D

Posted: Sun Apr 24, 2005 1:07 pm
by Rookie One.pl
Scripting isn't as hard as it seems. I wasn't any good scripter until this year, when I was suddenly enlightened. ;)

If you need any more help, just ask.

Posted: Sun Apr 24, 2005 3:40 pm
by k47a
Enlightened? I truly hope this'll happen to me some time (if possible in the near(est) future) :D
If you need any more help, just ask.
Cool, thanks! :D

Posted: Tue Oct 11, 2005 12:25 pm
by CTpenok
Hi

Can someone explain to me how I can make an objective of this wire cutting ?
I used 2 objectives, destroy the V2 and destroy the Control Room.
Just like in V2.
But I also want the Allies to cut the wires on 3 trucks.

I used

Code: Select all

$cutwire01 hide
$cutwire02 hide
$cutwire03 hide
to hide the cutwires.

And with this code I can cut the wires , but it's not an obbjective yet and the axis can cut the wires too :(

Code: Select all

//*********************************************
// Disable truck 1
//*********************************************
opentruck01_disabled:
	$wire01 remove
	$opentruck01 playsound m1l2b_disabletruck
	$cutwire01 show
	level.opentruck01_disabled = 1
	iprintlnbold_noloc "Wire 01 has been disabled!"
	//thread nexttruck
end
	
//*********************************************
// Disable truck 2
//*********************************************
opentruck02_disabled:
	$wire02 remove
	$opentruck02 playsound m1l2b_disabletruck
	$cutwire02 show
	level.opentruck02_disabled = 1
	iprintlnbold_noloc "Wire 02 has been disabled!"
	//thread nexttruck
end

//*********************************************
// Disable truck 3
//*********************************************
opentruck03_disabled:
	$wire03 remove
	$opentruck03 playsound m1l2b_disabletruck
	$cutwire03 show
	level.opentruck03_disabled = 1
	iprintlnbold_noloc "Wire 03 has been disabled!"
	//thread nexttruck
end

This is what I did to test it.
The 2 objectives (destroy V2 an CR) work fine
And also the allies can cut the wires, but the axis can too and it it's not an objective.

Code: Select all

  main:
 
   setcvar "g_obj_alliedtext1" "" 
   setcvar "g_obj_alliedtext2" ""
   setcvar "g_obj_alliedtext3" ""
  
   setcvar "g_obj_axistext1" ""
   setcvar "g_obj_axistext2" ""
   setcvar "g_obj_axistext3" ""
   
   setcvar "g_scoreboardpic" ""
   
   $cutwire01 hide
   $cutwire02 hide
   $cutwire03 hide
   
   level waittill prespawn
  
   exec global/DMprecache.scr
   
   level.script = maps/obj/nonameyet_obj.scr
  
   exec global/ambient.scr obj_team2.scr
   // Initialize the exploder subsystem
   exec global/door_locked.scr::lock
   thread global/exploder.scr::main
   
   level waittill spawn
  
   level.defusing_team = "axis
   level.planting_team = "allies"
   level.targets_to_destroy = 5
   level.bomb_damage = 200
   level.bomb_explosion_radius = 2048
   level.dmrespawning = 0 // 1 or 0 (0=no respawn)
   level.dmroundlimit = 10 // round time limit in minutes
   level.clockside = axis // axis, allies, kills, or draw

   level waittill roundstart
   
   $v2_explode thread global/obj_dm.scr::bomb_thinker
   $ctrlroom_explode thread global/obj_dm.scr::bomb_thinker
   
   thread allies_win_bom

   $v2_explode thread axis_win_timer
 end

 // Allied victory
 allies_win_bomb:

   while(level.targets_destroyed < level.targets_to_destroy) {
     waitframe
   }

   teamwin allies
 end 
 
 // Axis victory
 axis_win_timer:

   level waittill axiswin
 end 

//*********************************************
// Disable truck 1
//*********************************************
opentruck01_disabled:
	$wire01 remove
	$opentruck01 playsound m1l2b_disabletruck
	$cutwire01 show
	level.opentruck01_disabled = 1
	iprintlnbold_noloc "Wire 01 has been disabled!"
	//thread nexttruck
end
	
//*********************************************
// Disable truck 2
//*********************************************
opentruck02_disabled:
	$wire02 remove
	$opentruck02 playsound m1l2b_disabletruck
	$cutwire02 show
	level.opentruck02_disabled = 1
	iprintlnbold_noloc "Wire 02 has been disabled!"
	//thread nexttruck
end

//*********************************************
// Disable truck 3
//*********************************************
opentruck03_disabled:
	$wire03 remove
	$opentruck03 playsound m1l2b_disabletruck
	$cutwire03 show
	level.opentruck03_disabled = 1
	iprintlnbold_noloc "Wire 03 has been disabled!"
	//thread nexttruck
end
This are the settings for the triggers in Radiant:
classname: trigger_useonce
setthread: opentruck01_disabled

Posted: Tue Oct 11, 2005 12:47 pm
by Rookie One.pl
Change all the cut triggers from trigger_useonce to trigger_use and use this script:

Code: Select all

  main:
 
   setcvar "g_obj_alliedtext1" "" 
   setcvar "g_obj_alliedtext2" ""
   setcvar "g_obj_alliedtext3" ""
  
   setcvar "g_obj_axistext1" ""
   setcvar "g_obj_axistext2" ""
   setcvar "g_obj_axistext3" ""
   
   setcvar "g_scoreboardpic" ""
   
   $cutwire01 hide
   $cutwire02 hide
   $cutwire03 hide
   
   level waittill prespawn
  
   exec global/DMprecache.scr
   
   level.script = maps/obj/nonameyet_obj.scr
  
   exec global/ambient.scr obj_team2.scr
   // Initialize the exploder subsystem
   exec global/door_locked.scr::lock
   thread global/exploder.scr::main
   
   level waittill spawn
  
   level.defusing_team = "axis
   level.planting_team = "allies"
   level.targets_to_destroy = 2
   level.bomb_damage = 200
   level.bomb_explosion_radius = 2048
   level.dmrespawning = 0 // 1 or 0 (0=no respawn)
   level.dmroundlimit = 10 // round time limit in minutes
   level.clockside = axis // axis, allies, kills, or draw

   level waittill roundstart
   
   $v2_explode thread global/obj_dm.scr::bomb_thinker
   $ctrlroom_explode thread global/obj_dm.scr::bomb_thinker

   thread allies_win_bomb

   $v2_explode thread axis_win_timer
 end

 // Allied victory
 allies_win_bomb:

   while((level.targets_destroyed < level.targets_to_destroy) && (level.opentruck01_disabled && level.opentruck02_disabled && level.opentruck03_disabled)) {
     waitframe
   }

   teamwin allies
 end 
 
 // Axis victory
 axis_win_timer:

   level waittill axiswin
 end 

//*********************************************
// Disable truck 1
//*********************************************
opentruck01_disabled:
   local.player = parm.other
   if (local.player.dmteam == allies)
   {
	$wire01 remove
	$opentruck01 playsound m1l2b_disabletruck
	$cutwire01 show
	level.opentruck01_disabled = 1
	iprintlnbold_noloc "Wire 01 has been disabled!"
	self delete
   }
end
	
//*********************************************
// Disable truck 2
//*********************************************
opentruck02_disabled:
   local.player = parm.other
   if (local.player.dmteam == allies)
   {
	$wire02 remove
	$opentruck02 playsound m1l2b_disabletruck
	$cutwire02 show
	level.opentruck02_disabled = 1
	iprintlnbold_noloc "Wire 02 has been disabled!"
	self delete
   }
end

//*********************************************
// Disable truck 3
//*********************************************
opentruck03_disabled:
   local.player = parm.other
   if (local.player.dmteam == allies)
   {
	$wire03 remove
	$opentruck03 playsound m1l2b_disabletruck
	$cutwire03 show
	level.opentruck03_disabled = 1
	iprintlnbold_noloc "Wire 03 has been disabled!"
	self delete
   }
end
Also corrected a typo (the allies would never win) and changed the level.targets_to_destroy value to 2 (it should be the number of the bombs only).