Modme Forums

Bridge from the giant script

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: rossdaboss
Does anyone know how I would script something like the bridge that’s on Der Riese and the Giant where it would activate and come down when I turn the power on and then become a traversable area after that?


ModmeBot:

Reply By: mathfag
Have you considered just copying the code from the giant's script?


ModmeBot:

Reply By: Harry Bo21

mathfag
Have you considered just copying the code from the giant's script?

dont think we have the script bundle or the animations, hed need to at least set that up but yes the rest is in the giant scripts we were given


ModmeBot:

Reply By: mathfag

Harry Bo21
mathfag Have you considered just copying the code from the giant's script? dont think we have the script bundle or the animations, hed need to at least set that up but yes the rest is in the giant scripts we were given

bundles are in ape


ModmeBot:

Reply By: Harry Bo21
yea i prob should have known that on account of the fact we can compile the giant lol

yea just copy everything you need from the giant mapfile over and get the code from the giant scripts we were given in raw


ModmeBot:

Reply By: rossdaboss
this was the only script i could find related to it and i got an error when linking my map. what other scripts do you think i would need?

zm_giant_fx::main();
init_clientfields();

//Setup callbacks for bridge fxanim
scene::add_scene_func("p7_fxanim_zm_factory_bridge_lft_bundle", &bridge_disconnect , "init" );
scene::add_scene_func("p7_fxanim_zm_factory_bridge_lft_bundle", &bridge_connect , "done" );
scene::add_scene_func("p7_fxanim_zm_factory_bridge_rt_bundle", &bridge_disconnect , "init" );
scene::add_scene_func("p7_fxanim_zm_factory_bridge_rt_bundle", &bridge_connect , "done" );


ModmeBot:

Reply By: mathfag

rossdaboss
this was the only script i could find related to it and i got an error when linking my map. what other scripts do you think i would need? zm_giant_fx::main(); init_clientfields(); //Setup callbacks for bridge fxanim scene::add_scene_func("p7_fxanim_zm_factory_bridge_lft_bundle", &bridge_disconnect , "init" ); scene::add_scene_func("p7_fxanim_zm_factory_bridge_lft_bundle", &bridge_connect , "done" ); scene::add_scene_func("p7_fxanim_zm_factory_bridge_rt_bundle", &bridge_disconnect , "init" ); scene::add_scene_func("p7_fxanim_zm_factory_bridge_rt_bundle", &bridge_connect , "done" );

zm_giant.gsc
line 420: function bridge_init()


ModmeBot:

Reply By: rossdaboss
I'm not sure if its possible to do. i got the script to a point where i wasn't getting any errors but i can't get it to work in game. this is the scripts i have:

in my .gsc:

//Setup callbacks for bridge fxanim
scene::add_scene_func("p7_fxanim_zm_factory_bridge_lft_bundle", &bridge_disconnect , "init" );
scene::add_scene_func("p7_fxanim_zm_factory_bridge_lft_bundle", &bridge_connect , "done" );
scene::add_scene_func("p7_fxanim_zm_factory_bridge_rt_bundle", &bridge_disconnect , "init" );
scene::add_scene_func("p7_fxanim_zm_factory_bridge_rt_bundle", &bridge_connect , "done" );

function bridge_init()
{
level flag::init( "bridge_down" );

bridge_audio = struct::get( "bridge_audio", "targetname" );
// wait for power
level flag::wait_till( "power_on" );
level util::clientnotify ("pl1");

level thread scene::play( "p7_fxanim_zm_factory_bridge_lft_bundle" );
level scene::play( "p7_fxanim_zm_factory_bridge_rt_bundle" );
// wait until the bridges are down.

level flag::set( "bridge_down" );
wnuen_bridge_clip = getent( "wnuen_bridge_clip", "targetname" );
wnuen_bridge_clip connectpaths();
wnuen_bridge_clip delete();
warehouse_bridge_clip = getent( "warehouse_bridge_clip", "targetname" );
warehouse_bridge_clip connectpaths();
warehouse_bridge_clip delete();
wnuen_bridge = getent( "wnuen_bridge", "targetname" );
wnuen_bridge connectpaths();
wait(14);
}
function bridge_disconnect( a_parts )
{
foreach( part in a_parts )
{
part DisconnectPaths();
}
}
function bridge_connect( a_parts )
{
foreach( part in a_parts )
{
part ConnectPaths();
}
}

in my .zone:

scriptparsetree,scripts/zm/zm_giant_fx.gsc
scriptparsetree,scripts/zm/zm_giant_fx.csc