UGX-Mods

Call of Duty 5: World at War => Help Desk => Topic started by: A Devious Lobster on August 06, 2016, 02:27:00 am

Title: Need help trigger for ee song not working via script
Post by: A Devious Lobster on August 06, 2016, 02:27:00 am
Hi i need input / help because 90% of my script works although because im doing the Easter egg trigger via script instead of the map editor by entering the keys and values i cant get the trigger to trigger unlike a standard easteregg song which i can do if i put the keys and values in the entity box.

For the record i probs will get people complaining asking me why i am doing it like that when you can use the map editor entity box for those value and key inputs.

The reason is because if for instance your making a mod for a map that already exists like the bo1 treyarch built maps its the same in general for the perks like what had been done in rollonmath42's natch der untoten 4.0 mod with the perks and pack a punch in the map. However because its slightly different from perks its implementing the easter egg trigger to activate the song. You cant do it with maps like that as there already compiled and no one has the original source map file for the offical treyarch maps.

This is the code the only general part of it that doesn't work is the actual trigger tried trigger use didn't work tried trigger radius use didn't work and damage although i prefer the trigger use.

If anyone can give me input its much appreciated. why its so difficult is because if the getent doesn't refer to a model targetname it doesnt work since it needs origin to base it on.
Code Snippet
Plaintext
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;

main()
{

level.wolf_origin = (0, 0, 0);
level.wolf_angles = (0, 0, 0);
spawnmodel_dog_and_clip();
}

spawnmodel_dog_and_clip()
{
PrecacheModel("zombie_wolf_bo3");
PrecacheModel("collision_geo_64x64x256");

wolf = Spawn( "script_model", level.wolf_origin );
wolf.angles = level.wolf_angles;
wolf setModel( "zombie_wolf_bo3" );
wolf.targetname = "zombie_wolf";

wolf_trigger = Spawn("trigger_radius", level.wolf_origin + (0 , 0, 30), 0, 20, 70 );
wolf_trigger.spawnflags = 55;
wolf_trigger = getEnt("zombie_wolf","targetname");
wolf_trigger thread Spawn_music();

wolf_clip = spawn( "script_model", level.wolf_origin );
wolf_clip.angles = level.wolf_angles;
wolf_clip SetModel( "collision_geo_64x64x256" );
wolf_clip Hide();
}

Spawn_music()
{
self PlayLoopSound("meteor_loop");
self SetCursorHint("HINT_NOICON");
self waittill("trigger");
self StopLoopSound();
self PlaySound("meteor_affirm","sound_done");
self waittill("sound_done");
self Delete();
players = getplayers();
for(i = 0; i < players.size; i++)
{
players[i] PlaySound("iheay_song");
players[i] Giveweapon("mw2_intervention");
players[i] SwitchToWeapon("mw2_intervention");
}
}
For the record since im trying something new its really out of interest and scripting practise.