UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: smasher248 on November 08, 2018, 07:43:50 pm

Title: Vehicle help
Post by: smasher248 on November 08, 2018, 07:43:50 pm
How do i apply screen shake to players.

How do I rotate the vehicle in a large circle on death.

Why is this deathmodel not applying on vehicle death.

Code Snippet
cs
#include maps\_vehicle;
#include maps\_vehicle_aianim;
#using_animtree( "vehicles" );
main( model, type )
{
build_template( "blackhawk", model, type );
build_localinit( ::init_local );

//build_deathmodel( "vehicle_blackhawk" );
build_deathmodel( "little_bird_model", "little_bird_bench" ); //THIS LINE
//build_deathmodel( "vehicle_blackhawk_low" );
//build_deathmodel( "vehicle_blackhawk_low_thermal" );
//build_deathmodel( "vehicle_blackhawk_hero_sas_night" );
//build_deathmodel( "vehicle_blackhawk_hero" );

build_drive( %little_bird_rotor_anim, undefined, 0 );

blackhawk_death_fx = [];
blackhawk_death_fx[ "little_bird_model" ] = "maps/zombie/fx_zombie_flashback_american";


build_deathfx( "maps/zombie/fx_zombie_flashback_american", "tag_engine", "littlebird_helicopter_secondary_exp", undefined, undefined, undefined, 0.0, true );
build_deathfx( "fire/fire_smoke_trail_L", "tag_engine", "littlebird_helicopter_dying_loop", true, 0.05, true, 0.5, true );
build_deathfx( "explosions/helicopter_explosion_secondary_small", "tag_engine", "littlebird_helicopter_secondary_exp", undefined, undefined, undefined, 2.5, true );
build_deathfx( "explosions/helicopter_explosion_little_bird", undefined, "littlebird_helicopter_crash", undefined, undefined, undefined, - 1, undefined, "stop_crash_loop_sound" );
build_mainturret();
build_treadfx();
build_deathquake( 1.3, 2, 500 );
build_life( 100 );
Title: Re: Vehicle help
Post by: codmoddd1234 on November 09, 2018, 09:47:45 pm
Add deathmodel to a csv if you havent already. Check appdata/.../mods/mapname/missing_assets.csv for anything related to your vehicle, ignore everything else in it.
If the rotation happens after death you can get "classname" "script_vehicle_corpse" and check the targetname to be sure its the right one but you cant use functions like rotate on the corpse so you need to spawn a new script_model at the corpse.origin, delete or hide the corpse, rotate the script_model.
Another option would be to give the vehicle (X*2) health and in gsc wait until (X) dmg was done, rotate the script_vehicle or use a crash animation then kill it through script.
If you need a gsc example for either i can upload one in a few hours when im home.