I have two huge doors that I want to be a TOW objective, I want them to open or close depending on which team hits the switch, kinda similar to the hangar doors in Flughafen, cept mine are rotating doors not sliding.
I have no clue how to do this, anyone care to wise me up ?
Jack
Animated Doors !
Moderator: Moderators
Animated Doors !
Philip II of Macedon sent a message to Sparta:
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
-
nuggets
- General
- Posts: 1006
- Joined: Fri Feb 28, 2003 2:57 am
- Location: U-england-K (england in the UK) :P
- Contact:
i'll give you the simplest of answers, how to rather than the script
you will need...
brushes for the door (sliding doors don't need origins, but you will need to set the right angle)
then script... similar to not exact thought...
level.doorpos = 1 //will set your current door position to 1 (hoping this is currently closed)
if ("level.playerteam" == 1) //this being the opposing team
(
$door_trigger triggerable
)
else
$door_trigger nottiggerable
//and then vica versa for the other team, seems simple enough? it is really but it's already 3am here and i'm goin 2 bed, i'll read this again tomorrow and if ya need it (hopefully you won't, but...) i'll post a fuller script on here for you,
but for now... good night!!!
you will need...
brushes for the door (sliding doors don't need origins, but you will need to set the right angle)
then script... similar to not exact thought...
level.doorpos = 1 //will set your current door position to 1 (hoping this is currently closed)
if ("level.playerteam" == 1) //this being the opposing team
(
$door_trigger triggerable
)
else
$door_trigger nottiggerable
//and then vica versa for the other team, seems simple enough? it is really but it's already 3am here and i'm goin 2 bed, i'll read this again tomorrow and if ya need it (hopefully you won't, but...) i'll post a fuller script on here for you,
but for now... good night!!!
hope this helps, prob not cos it's all foreign 2 me :-/
Let me just get this straight, position 1 would say be closed for the allies, for the axis I trigger the doors to move to position 2 ? If thats right then I really did learn something,
Nice one
Jack
Nice one
Jack
Philip II of Macedon sent a message to Sparta:
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
-
nuggets
- General
- Posts: 1006
- Joined: Fri Feb 28, 2003 2:57 am
- Location: U-england-K (england in the UK) :P
- Contact:
i've just deleted everything i wrote cos of pressing "tab" + then "delete"!!!
bugger it!!!
oh well here it comes again
i'll just write the bloody script
main:
level.doorposition = 0 //assuming the doors closed when you compiled
local.player = $player
end
doors_open:
$door_trigger nottriggerable
$myleftdoor time 5 //time it takes for doors to open
$myleftdoor moveLeft 48 //may need changing (to moveRight, moveUp... etc)
$myleftdoor move
$myrightdoor time 5
$myrightdoor moveRight 48
$myrightdoor waitmove
level.doorposition = 1 //now noted as open
$door_trigger triggerable
end
//visa versa of open
doors_close:
$door_trigger nottriggerable
$myleftdoor time 5
$myleftdoor moveRight 48
$myleftdoor move
$myrightdoor time 5
$myrightdoor moveLeft 48
$myrightdoor waitmove
level.doorposition = 0 //now noted as closed again
$door_trigger triggerable
end
//the tricky bit
doors_move:
if (local.player.dmteam == allies)
{
if (level.doorposition == 0) //doors already closed
{
thread doors_open
}
else
if (local.player.dmteam == axis)
{
if (level.doorposition == 1) //doors already open
{
thread doors_close
}
}
end
//nuggets was here!!!
lol, and then in the map...
on the door trigger put these
key: targetname
value: door_trigger
key: setthread
value: doors_move
on the left door put
key: targetname
value: myleftdoor
and on the right door put
key: targetname
value: myrightdoor
and on the players put
key: targetname
value: player
then fingers crossed this'll b just what your looking for
bugger it!!!
oh well here it comes again
i'll just write the bloody script
main:
level.doorposition = 0 //assuming the doors closed when you compiled
local.player = $player
end
doors_open:
$door_trigger nottriggerable
$myleftdoor time 5 //time it takes for doors to open
$myleftdoor moveLeft 48 //may need changing (to moveRight, moveUp... etc)
$myleftdoor move
$myrightdoor time 5
$myrightdoor moveRight 48
$myrightdoor waitmove
level.doorposition = 1 //now noted as open
$door_trigger triggerable
end
//visa versa of open
doors_close:
$door_trigger nottriggerable
$myleftdoor time 5
$myleftdoor moveRight 48
$myleftdoor move
$myrightdoor time 5
$myrightdoor moveLeft 48
$myrightdoor waitmove
level.doorposition = 0 //now noted as closed again
$door_trigger triggerable
end
//the tricky bit
doors_move:
if (local.player.dmteam == allies)
{
if (level.doorposition == 0) //doors already closed
{
thread doors_open
}
else
if (local.player.dmteam == axis)
{
if (level.doorposition == 1) //doors already open
{
thread doors_close
}
}
end
//nuggets was here!!!
lol, and then in the map...
on the door trigger put these
key: targetname
value: door_trigger
key: setthread
value: doors_move
on the left door put
key: targetname
value: myleftdoor
and on the right door put
key: targetname
value: myrightdoor
and on the players put
key: targetname
value: player
then fingers crossed this'll b just what your looking for
hope this helps, prob not cos it's all foreign 2 me :-/
