Lost + found
Moderator: Moderators
-
janiegotagun
- Private
- Posts: 2
- Joined: Sat Sep 03, 2011 2:28 pm
I don't script, I map. Here's the only dual bomb script in MOHAA that I know of. You'll have to mess with it a bit and combine your stuff with it.... ???
/////////////////////////////////////
// THE BRIDGE
// ARCHITECTURE: POWZER
// SCRIPTING: POWZER
main:
setcvar "g_obj_alliedtext1" "Defend the bridge"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "Place an explosive"
setcvar "g_obj_axistext2" "under the bridge"
setcvar "g_obj_axistext3" "to destroy it"
setcvar "g_scoreboardpic" "objdm4"
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
level.script = maps/obj/obj_team4.scr
exec global/ambient.scr obj_team4
thread global/exploder.scr::main
thread global/minefield.scr::minefield_setup
exec global/door_locked.scr::lock
level waittill spawn
level.defusing_team = "allies"
level.planting_team = "axis"
level.targets_to_destroy = 1 // only one of the two bombs in the level needs to be blown
level.bomb_damage = 300
level.bomb_explosion_radius = 1024
// set the parameters for this round/wave based match
level.dmrespawning = 0 // 1 **wave based** or 0 **round based**
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = allies // set to axis, allies, kills, or draw
level waittill roundstart
$bridge_bomb thread global/obj_dm.scr::bomb_thinker
$bridge_bomb2 thread global/obj_dm.scr::bomb_thinker
$bridge_bomb thread axis_win_bomb
$bridge_bomb thread allied_win_timer
// thread objectives_setup
end
axis_win_bomb:
while(level.targets_destroyed < level.targets_to_destroy)
waitframe
teamwin axis
end
//*** --------------------------------------------
//*** "Allied Victory"
//*** --------------------------------------------
allied_win_timer:
level waittill allieswin
end
//THIS PORTION OF SCRIPT NOT READY TO IMPLEMENT
//objectives_setup:
//
// waitthread global/objectives.scr::blank_objectives
// waitthread global/objectives.scr::add_objectives 1 2 "Axis forces must destroy the bridge" $bridge.origin
// wait 2
// waitthread global/objectives.scr::current_objectives 1
end
/////////////////////////////////////
// THE BRIDGE
// ARCHITECTURE: POWZER
// SCRIPTING: POWZER
main:
setcvar "g_obj_alliedtext1" "Defend the bridge"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "Place an explosive"
setcvar "g_obj_axistext2" "under the bridge"
setcvar "g_obj_axistext3" "to destroy it"
setcvar "g_scoreboardpic" "objdm4"
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
level.script = maps/obj/obj_team4.scr
exec global/ambient.scr obj_team4
thread global/exploder.scr::main
thread global/minefield.scr::minefield_setup
exec global/door_locked.scr::lock
level waittill spawn
level.defusing_team = "allies"
level.planting_team = "axis"
level.targets_to_destroy = 1 // only one of the two bombs in the level needs to be blown
level.bomb_damage = 300
level.bomb_explosion_radius = 1024
// set the parameters for this round/wave based match
level.dmrespawning = 0 // 1 **wave based** or 0 **round based**
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = allies // set to axis, allies, kills, or draw
level waittill roundstart
$bridge_bomb thread global/obj_dm.scr::bomb_thinker
$bridge_bomb2 thread global/obj_dm.scr::bomb_thinker
$bridge_bomb thread axis_win_bomb
$bridge_bomb thread allied_win_timer
// thread objectives_setup
end
axis_win_bomb:
while(level.targets_destroyed < level.targets_to_destroy)
waitframe
teamwin axis
end
//*** --------------------------------------------
//*** "Allied Victory"
//*** --------------------------------------------
allied_win_timer:
level waittill allieswin
end
//THIS PORTION OF SCRIPT NOT READY TO IMPLEMENT
//objectives_setup:
//
// waitthread global/objectives.scr::blank_objectives
// waitthread global/objectives.scr::add_objectives 1 2 "Axis forces must destroy the bridge" $bridge.origin
// wait 2
// waitthread global/objectives.scr::current_objectives 1
end
objekt spawn
hi all , i have a question about my spawn skript
i use a spawnskript like this :
it spawns a plank in bazzar
it use a variable x coord "local.plank" for origin
now i try to suse a y coord and x coord same time
i tryed this one - it dosnt work :S
can anyone help?
(sorry my english is not the best
)
i use a spawnskript like this :
Code: Select all
for (local.plank = 500; local.plank < 1050; local.plank += 39) //plank
{
local.planks = spawn script_model "model" "static/cratelid2.tik" //model used
local.planks.origin = ( local.plank -2392 310 ) //origin of start
local.planks.angles = ( 0 90 0 ) //orientation of model
local.planks show
local.planks.scale = 1.3 //size up/down depending on needs
}it use a variable x coord "local.plank" for origin
now i try to suse a y coord and x coord same time
i tryed this one - it dosnt work :S
Code: Select all
for (local.plank = 500; local.plank < 1050; local.plank += 39) //plank
(local.plankx = 500; local.plankx < 1050; local.plankx += 39) //plank
{
local.planks = spawn script_model "model" "static/cratelid2.tik" //model used
local.planks.origin = ( local.plank local.plankx 310 ) //origin of start
local.planks.angles = ( 0 90 0 ) //orientation of model
local.planks show
local.planks.scale = 1.3 //size up/down depending on needs }(sorry my english is not the best
Hi!
Your "for" loop has an incorrect syntax. Try:
for (local.plank = 500;local.plank < 1050; local.plank+=39)
{
for (local.planky = 500;local.planky < 1050; local.planky+=39)
{
local.planks = spawn script_model "model" "static/cratelid2.tik" //model used
local.planks.origin = ( local.plank local.planky 310 ) //origin of start
// why "plankX" for an y coordinate?! ^^ it doesn't make a difference
//for the game, but for human-readers, it does.
local.planks.angles = ( 0 90 0 ) //orientation
local.planks show
local.planks.scale = 1.3
}
}
But be careful: with [500-105] range by 39 step, twice, you'll have around 200 models spawned. The game limit for all models is maximum 1024, lowered to around 800 due to non-removable entities. So, take care about this limit
Enjoy!
Your "for" loop has an incorrect syntax. Try:
for (local.plank = 500;local.plank < 1050; local.plank+=39)
{
for (local.planky = 500;local.planky < 1050; local.planky+=39)
{
local.planks = spawn script_model "model" "static/cratelid2.tik" //model used
local.planks.origin = ( local.plank local.planky 310 ) //origin of start
// why "plankX" for an y coordinate?! ^^ it doesn't make a difference
//for the game, but for human-readers, it does.
local.planks.angles = ( 0 90 0 ) //orientation
local.planks show
local.planks.scale = 1.3
}
}
But be careful: with [500-105] range by 39 step, twice, you'll have around 200 models spawned. The game limit for all models is maximum 1024, lowered to around 800 due to non-removable entities. So, take care about this limit
Enjoy!
Tried adding curtain but not show
I tried adding a curtain to my mohdm6.scr but it does not show up on the server. Can someone help me by telling me what I've done wrong? Here is a portion of my mohdm6.scr file for you to look at. I added the section in red.
// STALINGRAD
// ARCHITECTURE: ZIED, POWZER
// SCRIPTING: POWZER
// **********************************************************************
// Extended-Gametype Mapscript Version 1.2.2 (05-14-05)
// By Mark Follett (Mefy)
// email: mef123@geocities.com
// web: www.planetmedalofhonor.com/mefy
// You are free to modify and redistribute as long as you keep these
// credits.
// **********************************************************************
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Stalingrad"
setcvar "g_obj_alliedtext2" "WELCOME TO <|MMC|>"
setcvar "g_obj_alliedtext3" "PLAY FAIR AND HAVE FUN"
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "mohdm6"
switch (waitthread global/libmef/util.scr::get_gametype)
{
case "ctf":
case "ftctf":
thread setup_randomized_ctf_bases
break
case "ft":
case "rbm":
waitthread global/libmef/spawn.scr::spawnblock_begin
break
case "dem":
case "ftdem":
waitthread setup_dem_bases
break
}
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
exec global/door_locked.scr::lock
level.script = maps/dm/mohdm6.scr
exec global/ambient.scr mohdm6
level waittill spawn
if (level.mef_baseversion == "sh" || level.mef_baseversion == "bt")
{
$world commanddelay 0 farclipoverride -1
}
//curtain1 east bld. 1st floor
local.static = spawn script_model
local.static.model "static/curtain.tik"
local.static.origin = (-615.75 -493.78 32.20)
local.static.angles = (8.98 89.88 0.00)
local.static.scale = 1.0
local static notsolid
local static nodamage
end
//-----------------------------------------------------------------------------
setup_dem_bases:
level.mef_settings["ticktime"] = 60
// STALINGRAD
// ARCHITECTURE: ZIED, POWZER
// SCRIPTING: POWZER
// **********************************************************************
// Extended-Gametype Mapscript Version 1.2.2 (05-14-05)
// By Mark Follett (Mefy)
// email: mef123@geocities.com
// web: www.planetmedalofhonor.com/mefy
// You are free to modify and redistribute as long as you keep these
// credits.
// **********************************************************************
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Stalingrad"
setcvar "g_obj_alliedtext2" "WELCOME TO <|MMC|>"
setcvar "g_obj_alliedtext3" "PLAY FAIR AND HAVE FUN"
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "mohdm6"
switch (waitthread global/libmef/util.scr::get_gametype)
{
case "ctf":
case "ftctf":
thread setup_randomized_ctf_bases
break
case "ft":
case "rbm":
waitthread global/libmef/spawn.scr::spawnblock_begin
break
case "dem":
case "ftdem":
waitthread setup_dem_bases
break
}
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
exec global/door_locked.scr::lock
level.script = maps/dm/mohdm6.scr
exec global/ambient.scr mohdm6
level waittill spawn
if (level.mef_baseversion == "sh" || level.mef_baseversion == "bt")
{
$world commanddelay 0 farclipoverride -1
}
//curtain1 east bld. 1st floor
local.static = spawn script_model
local.static.model "static/curtain.tik"
local.static.origin = (-615.75 -493.78 32.20)
local.static.angles = (8.98 89.88 0.00)
local.static.scale = 1.0
local static notsolid
local static nodamage
end
//-----------------------------------------------------------------------------
setup_dem_bases:
level.mef_settings["ticktime"] = 60
Correct me if i'm wrong but I placed it after wait til spawn.neillomax wrote:didn't test it but what if you put it after wait til spawn instead of prespawn ?
level waittill spawn
if (level.mef_baseversion == "sh" || level.mef_baseversion == "bt")
{
$world commanddelay 0 farclipoverride -1
}
//curtain1 east bld. 1st floor
local.static = spawn script_model
local.static.model "static/curtain.tik"
local.static.origin = (-615.75 -493.78 32.20)
local.static.angles = (8.98 89.88 0.00)
local.static.scale = 1.0
local static notsolid
local static nodamage
end
the first thing i noticed was the ( " " ) in the script
"static/curtain.tik"
try removing them.
then i used an old script of mine and no curtain showed up but an end piece to the sandbag did....... lower floor closet doorway. Is that the location ?
don't know why that happened. Will get on a computer that has my scripting stuff on it when i get a chance and see what I can come up with. Tinker around a little bit and see if you can get it to work. I can't get to it now.
"static/curtain.tik"
try removing them.
then i used an old script of mine and no curtain showed up but an end piece to the sandbag did....... lower floor closet doorway. Is that the location ?
don't know why that happened. Will get on a computer that has my scripting stuff on it when i get a chance and see what I can come up with. Tinker around a little bit and see if you can get it to work. I can't get to it now.
-
BatteryAziz
- Moderator
- Posts: 82
- Joined: Tue Jun 15, 2010 4:44 pm
It might be easy to you, but to me it's not. I made the corrections as you suggested but the curtain still does not show. The following script is how I typed it in. Look over the entire script line by line and make the corrections for me, please. I want to add other objects but for now I'm learning with just one curtain. Thanks for any help I may receive.saaaimen wrote:this one's easyit should be local.static model "xxx.tik" instead of local.static.model
also, instead of using the local.static variable, use local.mycurtain or something like that. (because static/nonstatic is also an entity property which could confuse things)
local.mycurtain = spawn script_object
local.mycurtain model "static/curtain.tik"
local.mycurtain.origin = (-615.75 -493.78 32.20)
local.mycurtain.angles = (8.98 89.88 0.00)
local.mycurtain.scale = 1.0
local mycurtain notsolid
local mycurtain nodamage