binding something to a door?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
General_DisArray
Warrant Officer
Posts: 142
Joined: Tue Dec 17, 2002 4:17 am
Location: magnolia, texas

binding something to a door?

Post by General_DisArray »

i was wanting to add something i haven't seen yet to a door in my map. i have a room with an mg42 mounted just inside it. and i was wanting the door to explode as someone shot it.

what i did. i created a func_door that looked torn up from gunfire. then i created func_crate to the blown up parts to fill in to make it look like a whole door.

i also gave these objects targetnames; door, doorpiece1,2,3.

this is what i did in the script file:

thread door

end

door:
$doorpiece1 bind $door
$doorpiece2 bind $door
$doorpiece3 bind $door

it worked fine. but for some reason after about 3-10 minutes of play(varied on how soon the door was shot out), spearhead would crash to desktop.

what did i do wrong:?: :?:
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

haven't got SH, but...

have you made sure it was that, that made MOH crash, if you put // infront of the lines in the script, and it still crashes then i'll help ya next week (i'll b getting my copy of SH then) :D:D:D
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
General_DisArray
Warrant Officer
Posts: 142
Joined: Tue Dec 17, 2002 4:17 am
Location: magnolia, texas

Post by General_DisArray »

to be honest i didn't try that. i will see what happens.

could there be a problem with the doorpiece being shot out and the script looking for it w/in the map, and not being able to find it, crashing?

just a thought.
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

not really looking at that script, if the door is only being triggered when MOH 1st runs, it's not looking for it anymoreeven though this isn't causing a problem you should have scripted

$door remove (if it's actually being deleted) it's decrease the number of faces on the map

and also i don't know if you've just shown us part of the script but you will need a little bit more than that

main:
level waittill spawn
thread door
end

door:
$doorpiece1 bind $door
$doorpiece2 bind $door
$doorpiece3 bind $door
end //<-- if you have no end that'll be why it's crashing the script will loop constantly :D
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
General_DisArray
Warrant Officer
Posts: 142
Joined: Tue Dec 17, 2002 4:17 am
Location: magnolia, texas

Post by General_DisArray »

just a bit of it. here is the whole enchilada.



--------------------------------------------------------------------------
//Battle of Nutech Energy
//architecture Major A.Hole
//scripting Major A.Hole

main:

//set scoreboard messages
setcvar "g_obj_alliedtext1" "The historical battle of"
setcvar "g_obj_alliedtext2" "NutechEnergy,many lost "
setcvar "g_obj_alliedtext3" "their lives for cubicle"
setcvar "g_obj_axistext1" "freedom.This is only a"
setcvar "g_obj_axistext2" "reenactment of the horrific"
setcvar "g_obj_axistext3" "battle for office supremacy!"

setcvar "g_scoreboardpic" "nutech.tga"


// call additional stuff for playing this map round based is needed
if(level.roundbased)
thread roundbasedthread

level waittill prespawn


//*** Precache Dm Stuff
exec global/DMprecache.scr
exec global/ambient.scr nutech
exec global/exploder.scr // initialize the exploder subsystem
exec global/door_locked.scr::lock


//*** Fog parms
$world farplane 5400
$world farplane_color (.333 .333 .359)
$world farplane_cull 1

level.script = maps/dm/nutech.scr




level waittill spawn


thread fan1
thread door


end



fan1:
$blade1 bind $fan1 //got this cool gadget from nemesis
$blade2 bind $fan1
$blade3 bind $fan1
$blade4 bind $fan1
$fan1 rotatey 350 // the number indicates speed. (-) rotates other way. use rotate(?) z,x,y on which axis to rotate.

door:
$doorpiece1 bind $door
$doorpiece2 bind $door
$doorpiece3 bind $door




end

//-------------------------------------------------------------------------------

roundbasedthread:

// Can specify different scoreboard messages for round based games here.

level waittill prespawn

level waittill spawn

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

level waittill roundstart

end
-------------------------------------------------------------------------------



i don't want the door to disappear, only the pieces. to give it a blown to S#@T look after the mg42 is done with it.
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

everything seems to be in order...

looking at your script, there's no end to your fan, but looking at the fan script it doesn't look like it'll work anyway, if ya wanna email me your .map and .scr i'll take a look 4 ya :D

that binding on the door with the seperate 1,2,3 pieces, i can't c y u would need that, you should make all the door entities into 1 entity, without having to bind any

if you have something threading to something else, i.e. our roundbasedthread, you should remove the level waiittill's (spawn and prespawn) they'll be ignored anyway as that level script will keep reading the rest of the file
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

I don't know it it will make a differenct but you can make the pieces a func_fencepost and they will dissapear when shot . or use the exploder.scr make the door an exploder if you don't need it to open .
User avatar
General_DisArray
Warrant Officer
Posts: 142
Joined: Tue Dec 17, 2002 4:17 am
Location: magnolia, texas

Post by General_DisArray »

i was wanting a usable door with or without the blown out pieces.

to shed more light on this subject. i took this completely out of my map, and it still crashed. :x

i ran the logfile 2 command in the console and it said something about an ubersound error. this is what it says:
ERROR PlaySound: dm_hit_notify needs an alias in ubersound.scr or uberdialog.scr - Please fix.

ERROR PlaySound: dm_kill_notify needs an alias in ubersound.scr or uberdialog.scr - Please fix.

SkeletorCacheFileCallback: Could not open binary file 'newanim/models/player/allied_oss.skc' or 'models/player/allied_oss.skc'
SkeletorCacheFileCallback: Could not open binary file 'newanim/models/player/allied_oss_fps.skc' or 'models/player/allied_oss_fps.skc'
^~^~^ Box data is corrupted for 'models/human/allied_pilot/allied_pilot.skd'
^~^~^ Morph targets data is corrupted for 'models/human/allied_pilot/allied_pilot.skd'
SkeletorCacheFileCallback: Could not open binary file 'newanim/models/player/german_elite_gestapo.skc' or 'models/player/german_elite_gestapo.skc'
SkeletorCacheFileCallback: Could not open binary file 'newanim/models/player/german_elite_gestapo_fps.skc' or 'models/player/german_elite_gestapo_fps.skc'
SkeletorCacheFileCallback: Could not open binary file 'newanim/models/player/german_winter1.skc' or 'models/player/german_winter1.skc'
SkeletorCacheFileCallback: Could not open binary file 'newanim/models/player/german_winter1_fps.skc' or 'models/player/german_winter1_fps.skc'
SkeletorCacheFileCallback: Could not open binary file 'newanim/models/player/german_winter2.skc' or 'models/player/german_winter2.skc'
SkeletorCacheFileCallback: Could not open binary file 'newanim/models/player/german_winter2_fps.skc' or 'models/player/german_winter2_fps.skc'

now this is not the order they were in. i cut and paste the things that seemed to have been errors. if anyone is interested i can send my qconsole.log to them to have a look.

heck if anyone would like to overlook my map they can. this is puzzling.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

The log ends with these errors?

Weird... :?
Image
User avatar
General_DisArray
Warrant Officer
Posts: 142
Joined: Tue Dec 17, 2002 4:17 am
Location: magnolia, texas

Post by General_DisArray »

no. this is within the log. i cut and paste the erred parts.

to my original question.. would this make my machine crash?
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Tutorial map

Post by tltrude »

I have a tutorial map that has exploding doors. It is for Mohaa, but they should work in Spearhead too. The map file, script, and a playable pk3 are included. Everyone is free to use whatever they like from it.

http://pages.sbcglobal.net/tltrude/Temp ... ngdoor.zip


Image
Tom Trude,

Image
User avatar
General_DisArray
Warrant Officer
Posts: 142
Joined: Tue Dec 17, 2002 4:17 am
Location: magnolia, texas

Post by General_DisArray »

ya, i have looked through this one before. good stuff in it.
Post Reply