UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Lukkie1998

Hi guys,

I was converting .tanims today, when i noticed something strange happening to the animations. I converted the .tanims as shown in elfenliedtopfan5's tutorial. When i convert the animation in AssMan, no errors pop up. But the .XANIMEXPORT has 87 joints, the one converted in AssMan only has 85? Tag_camera and Tag_cambone are missing in the converted one.



The .Tanims are converted in Maya 2012 and exported by Aidan's tools.

Why does AssMan remove these 2 joints?

Lukkie1998
9 years ago
Hi Guys,

I was trying to convert a model with a physicspreset, but AssMan gives me two weird errors.

1. When i try to select the physicspreset file, it says:


Alright Assman, i did what you asked me. So when I press F10 to convert the model, after I moved the file to share/main/physic/, it says:


I can't get this error to disappear. Anyone else had this problem before, and knows how to solve it?

Lukkie1998
9 years ago
Hi Guys,

I was porting the Stakeout and I encountered a weird problem. When I move away from the gun is Asset Viewer, some parts turn black. Only if I zoom in, the parts are textured.


When zoomed in


When zoomed out

These black textures only occur at the parts which have the same material. This material is converted with these settings:



The weapon models are converted as animated, I made all the surfaces white in maya.
Both View- and World model turn black on the same places.
These black parts will turn invisible in-game.

Lukkie1998
10 years ago
Hi guys,

I ported the MM1 Grenade Launcher from BO2, converted .tanims etc.. etc... When i go in game, the viewmodel looks fine. But when i use 3rd person mode ("cg_thirdperson",2) it looks like the player is holding a grenade. I tried to change the PlayerAnim to every option available, but no results.

This is how it looks in game:


This is my weaponfile:
Code Snippet
Plaintext
WEAPONFILE\weaponType\grenade\weaponClass\grenade\impactType\grenade_explode\guidedMissileType\None\inventoryType\primary\fireType\Single Shot\stickiness\Don't stick\maxSteeringAccel\3000\displayName\MM1 Grenade Launcher\AIOverlayDescription\\modeName\\playerAnimType\autorifle\gunModel\lukkie_mm1_view\gunModel2\\gunModel3\\gunModel4\\gunModel5\\gunModel6\\gunModel7\\gunModel8\\gunModel9\\gunModel10\\gunModel11\\gunModel12\\gunModel13\\gunModel14\\gunModel15\\gunModel16\\handModel\viewmodel_hands_no_model\isHandModelOverridable\0\idleAnim\lukkie_mm1_idle\emptyIdleAnim\lukkie_mm1_idle\fireAnim\lukkie_mm1_fire\lastShotAnim\lukkie_mm1_fire\rechamberAnim\\reloadAnim\lukkie_mm1_reload_empty\reloadStartAnim\\reloadEndAnim\\raiseAnim\lukkie_mm1_pullout\dropAnim\lukkie_mm1_putaway\firstRaiseAnim\lukkie_mm1_first_raise\altRaiseAnim\lukkie_mm1_pullout\altDropAnim\lukkie_mm1_putaway\quickRaiseAnim\lukkie_mm1_pullout_quick\quickDropAnim\lukkie_mm1_putaway_quick\emptyRaiseAnim\lukkie_mm1_pullout_quick\emptyDropAnim\lukkie_mm1_putaway_quick\sprintInAnim\lukkie_mm1_sprint_in\sprintLoopAnim\lukkie_mm1_sprint_loop\sprintOutAnim\lukkie_mm1_sprint_out\nightVisionWearAnim\\nightVisionRemoveAnim\\adsFireAnim\lukkie_mm1_fire\adsLastShotAnim\lukkie_mm1_fire\adsRechamberAnim\\adsUpAnim\lukkie_mm1_ads_up\adsDownAnim\lukkie_mm1_ads_down\meleeAnim\viewmodel_knife_slash\meleeChargeAnim\viewmodel_knife_stick\meleeTime\0.7\meleeChargeTime\1\meleeDelay\0.25\meleeChargeDelay\0.2\meleeDamage\150\playerDamage\30\meleeSwipeSound\melee_swing\meleeSwipeSoundPlayer\melee_swing_plr\meleeHitSound\melee_hit\meleeMissSound\\locNone\1\locHelmet\1\locHead\1\locNeck\1\locTorsoUpper\1\locTorsoLower\1\locRightArmUpper\1\locRightArmLower\1\locRightHand\1\locLeftArmUpper\1\locLeftArmLower\1\locLeftHand\1\locRightLegUpper\1\locRightLegLower\1\locRightFoot\1\locLeftLegUpper\1\locLeftLegLower\1\locLeftFoot\1\locGun\0\moveSpeedScale\0.8\adsMoveSpeedScale\1\sprintDurationScale\1\maxHorTurnSpeed\0\maxVertTurnSpeed\0\gunMaxPitch\30\gunMaxYaw\30\lowAmmoWarningThreshold\0.33\damage\600\fireDelay\0.1\fireTime\0.5\reloadTime\3.1\reloadEmptyTime\3.1\reloadEmptyAddTime\0\reloadShowRocketTime\0\reloadStartTime\2\reloadEndTime\1.1\reloadAddTime\0\reloadStartAddTime\1.3\rechamberTime\0.1\rechamberBoltTime\0\dropTime\1\raiseTime\0.8\altDropTime\0\altRaiseTime\0.7\quickDropTime\0.25\quickRaiseTime\0.65\firstRaiseTime\1\emptyDropTime\0.5\emptyRaiseTime\0.5\sprintInTime\0.35\sprintLoopTime\0.7\sprintOutTime\0.6\nightVisionWearTime\0\nightVisionWearTimeFadeOutEnd\0\nightVisionWearTimePowerUp\0\nightVisionRemoveTime\0\nightVisionRemoveTimePowerDown\0\nightVisionRemoveTimeFadeInStart\0\fuseTime\0\aiFuseTime\0\timedDetonation\0\clipOnly\0\adsTransInTime\0.5\adsTransOutTime\0.5\adsZoomInFrac\0.5\adsZoomOutFrac\0.5\adsOverlayShader\\adsOverlayReticle\none\adsOverlayInterface\none\adsOverlayWidth\0\adsOverlayHeight\0\adsBobFactor\1\adsViewBobMult\0\hipSpreadStandMin\5\hipSpreadDuckedMin\3.5\hipSpreadProneMin\2\hipSpreadMax\6\hipSpreadDuckedMax\6\hipSpreadProneMax\6\hipSpreadDecayRate\2.5\hipSpreadFireAdd\0.4\hipSpreadTurnAdd\0\hipSpreadMoveAdd\2.3\hipSpreadDuckedDecay\1.375\hipSpreadProneDecay\1.6\hipReticleSidePos\0\adsSpread\1.7\adsIdleAmount\25\hipIdleAmount\15\hipIdleSpeed\5\adsIdleSpeed\1\idleCrouchFactor\0.5\idleProneFactor\0.15\adsAimPitch\0\adsCrosshairInFrac\1\adsCrosshairOutFrac\0.2\adsReloadTransTime\0.6\adsGunKickPitchMin\-30\adsGunKickPitchMax\-20\adsGunKickYawMin\-17\adsGunKickYawMax\17\adsGunKickAccel\250\adsGunKickSpeedMax\1000\adsGunKickSpeedDecay\10\adsGunKickStaticDecay\1\adsViewKickPitchMin\20\adsViewKickPitchMax\95\adsViewKickYawMin\-10\adsViewKickYawMax\30\adsViewKickCenterSpeed\2500\hipGunKickPitchMin\-5\hipGunKickPitchMax\-3\hipGunKickYawMin\-15\hipGunKickYawMax\15\hipGunKickAccel\250\hipGunKickSpeedMax\500\hipGunKickSpeedDecay\15\hipGunKickStaticDecay\1\hipViewKickPitchMin\100\hipViewKickPitchMax\150\hipViewKickYawMin\-50\hipViewKickYawMax\-80\hipViewKickCenterSpeed\1500\swayMaxAngle\4\swayLerpSpeed\4\swayPitchScale\0.1\swayYawScale\0.1\swayHorizScale\0.1\swayVertScale\0.1\swayShellShockScale\5\adsSwayMaxAngle\2\adsSwayLerpSpeed\4\adsSwayPitchScale\0.1\adsSwayYawScale\0.1\adsSwayHorizScale\0.1\adsSwayVertScale\0.1\hudIcon\hud_icon_kamikaze\killIcon\hud_icon_kamikaze\dpadIcon\\ammoCounterIcon\hud_icon_kamikaze\hudIconRatio\2:1\killIconRatio\2:1\dpadIconRatio\1:1\ammoCounterIconRatio\1:1\ammoCounterClip\Shotgun\flipKillIcon\1\worldModel\lukkie_mm1_world\worldModel2\\worldModel3\\worldModel4\\worldModel5\\worldModel6\\worldModel7\\worldModel8\\worldModel9\\worldModel10\\worldModel11\\worldModel12\\worldModel13\\worldModel14\\worldModel15\\worldModel16\\worldClipModel\\rocketModel\\ammoName\mm1\maxAmmo\48\startAmmo\0\clipName\mm1\clipSize\24\dropAmmoMin\24\dropAmmoMax\24\viewFlashEffect\weapon/muzzleflashes/fx_ptrs_view\worldFlashEffect\weapon/muzzleflashes/fx_ptrs\shellEjectEffect\\lastShotEjectEffect\\worldClipDropEffect\\pickupSound\weap_pickup\pickupSoundPlayer\weap_pickup_plr\ammoPickupSound\ammo_pickup\ammoPickupSoundPlayer\ammo_pickup_plr\projectileSound\\fireSound\weap_mm1_fire\fireSoundPlayer\weap_mm1_fire_npc\lastShotSound\weap_mm1_fire\lastShotSoundPlayer\weap_mm1_fire_npc\emptyFireSound\pistol_dryfire\emptyFireSoundPlayer\pistol_dryfire_plr\rechamberSound\\rechamberSoundPlayer\\reloadSound\\reloadSoundPlayer\\reloadEmptySound\\reloadEmptySoundPlayer\\reloadStartSound\\reloadStartSoundPlayer\\reloadEndSound\\reloadEndSoundPlayer\\altSwitchSound\\altSwitchSoundPlayer\\raiseSound\weap_raise\raiseSoundPlayer\weap_raise_plr\firstRaiseSound\weap_raise\firstRaiseSoundPlayer\weap_raise_plr\putawaySound\weap_putaway\putawaySoundPlayer\weap_putaway_plr\bounceSound\\nightVisionWearSound\\nightVisionWearSoundPlayer\\nightVisionRemoveSound\\nightVisionRemoveSoundPlayer\\reticleCenter\gl_crosshair_center\reticleSide\\reticleCenterSize\80\reticleSideSize\1\reticleMinOfs\0\enemyCrosshairRange\1000\crosshairColorChange\1\altWeapon\\boltAction\0\armorPiercing\0\aimDownSight\1\rechamberWhileAds\0\noADSAutoReload\0\adsViewErrorMin\0\adsViewErrorMax\0\adsFire\0\noAdsWhenMagEmpty\0\avoidDropCleanup\0\cancelAutoHolsterWhenEmpty\0\suppressAmmoReserveDisplay\0\blocksProne\0\noPartialReload\1\segmentedReload\0\reloadAmmoAdd\0\reloadStartAdd\0\autoAimRange\0\aimAssistRange\1000\aimAssistRangeAds\1000\fightDist\720\maxDist\1400\aiVsAiAccuracyGraph\\aiVsPlayerAccuracyGraph\\sprintOfsF\0\sprintOfsR\0\sprintOfsU\0\sprintRotP\0\sprintRotY\0\sprintRotR\0\sprintBobH\0\sprintBobV\0\sprintScale\0.8\standMoveF\0\standMoveR\0\standMoveU\0\standRotP\2\standRotY\0\standRotR\-2\duckedOfsF\-1\duckedOfsR\0.8\duckedOfsU\-0.2\duckedMoveF\0\duckedMoveR\0\duckedMoveU\0\duckedRotP\2\duckedRotY\0\duckedRotR\-2\proneOfsF\-2\proneOfsR\0\proneOfsU\0.8\proneMoveF\-100\proneMoveR\3\proneMoveU\-100\proneRotP\0\proneRotY\300\proneRotR\-300\posMoveRate\6\posProneMoveRate\25\standMoveMinSpeed\110\duckedMoveMinSpeed\60\proneMoveMinSpeed\0\posRotRate\6\posProneRotRate\30\standRotMinSpeed\110\duckedRotMinSpeed\60\proneRotMinSpeed\0\explosionRadius\200\explosionInnerDamage\600\explosionOuterDamage\75\damageConeAngle\180\projectileSpeed\2400\projectileSpeedUp\10\projectileActivateDist\0\projectileLifetime\30\projectileModel\bo1_projectile_m203grenade\projExplosionType\grenade\projExplosionEffect\\projExplosionEffectForceNormalUp\0\projExplosionSound\wpn_grenade_explode\projDudEffect\\projDudSound\wpn_grenade_bounce_flesh\projImpactExplode\1\canUseInVehicle\0\projTrailEffect\\projectileDLight\200\projectileRed\0.75\projectileGreen\0.3\projectileBlue\1\projIgnitionDelay\0\projIgnitionEffect\\projIgnitionSound\\destabilizationRateTime\0\destabilizationCurvatureMax\5\destabilizeDistance\0\parallelDefaultBounce\0.5\parallelAsphaltBounce\0.6\parallelBarkBounce\0.6\parallelBrickBounce\0.6\parallelCarpetBounce\0.6\parallelCeramicBounce\0.5\parallelClothBounce\0.3\parallelConcreteBounce\0.6\parallelCushionBounce\0.5\parallelDirtBounce\0.45\parallelFleshBounce\0.2\parallelFoliageBounce\0.05\parallelFruitBounce\0.5\parallelGlassBounce\0.4\parallelGrassBounce\0.35\parallelGravelBounce\0.5\parallelIceBounce\0.6\parallelMetalBounce\0.6\parallelMudBounce\0.2\parallelPaintedMetalBounce\0.5\parallelPaperBounce\0.2\parallelPlasterBounce\0.5\parallelPlasticBounce\0.5\parallelRockBounce\0.6\parallelRubberBounce\0.5\parallelSandBounce\0.3\parallelSnowBounce\0.2\parallelWaterBounce\0.2\parallelWoodBounce\0.6\perpendicularDefaultBounce\0.25\perpendicularAsphaltBounce\0.25\perpendicularBarkBounce\0.25\perpendicularBrickBounce\0.25\perpendicularCarpetBounce\0.25\perpendicularCeramicBounce\0.5\perpendicularClothBounce\0.2\perpendicularConcreteBounce\0.25\perpendicularCushionBounce\0.5\perpendicularDirtBounce\0.225\perpendicularFleshBounce\0.2\perpendicularFoliageBounce\0.05\perpendicularFruitBounce\0.5\perpendicularGlassBounce\0.2\perpendicularGrassBounce\0.15\perpendicularGravelBounce\0.25\perpendicularIceBounce\0.3\perpendicularMetalBounce\0.25\perpendicularMudBounce\0.1\perpendicularPaintedMetalBounce\0.5\perpendicularPaperBounce\0.2\perpendicularPlasterBounce\0.25\perpendicularPlasticBounce\0.5\perpendicularRockBounce\0.25\perpendicularRubberBounce\0.5\perpendicularSandBounce\0.1\perpendicularSnowBounce\0.1\perpendicularWaterBounce\0.2\perpendicularWoodBounce\0.25\bayonet\0\fireRumble\damage_heavy\adsDofStart\0\adsDofEnd\14\requireLockonToFire\0\worldKnifeModel\weapon_usa_kbar_knife\knifeModel\viewmodel_usa_kbar_knife\adsZoomFov\40\adsTransBlendTime\0.5\clipType\bottom\penetrateType\large\offhandClass\None\twoHanded\1\shotCount\1\hipGunKickReducedKickBullets\0\hipGunKickReducedKickPercent\0\adsGunKickReducedKickBullets\0\adsGunKickReducedKickPercent\0\reloadEmptyAnim\lukkie_mm1_reload_empty\hideTags\j_round\notetrackSoundMap\knife_stab_plr knife_stab_plr
knife_pull_plr knife_pull_plr
Knife_slash_plr Knife_slash_plr
bowie_swing bowie_swing
bowie_stab bowie_stab
bowie_pull bowie_pull
sndnt#fly_gl_open weap_mm1_open
sndnt#fly_gl_gren_out weap_mm1_grenade_out
sndnt#fly_gl_gren_in weap_mm1_grenade_in
sndnt#fly_gl_close weap_mm1_close

Lukkie1998
10 years ago
Hello Guys,

Me and Toxic72 were wondering if UGX has a team speak server? Maybe it would be nice, so people could just talk to each other, instead of typing in chat (as chat has the habit of kicking out people with a too high ping)?

Lukkie1998
10 years ago
Hey guys,
I tried to port the HK21 with scope, but I cant get the scope lens right.
This is my gun:

This are my settings in AssMan:


Who knows how to fix this?

Lukkie1998
10 years ago
Hi guys,
There's another free game on the steam market right now. It's Sniper Elite V2.
You can download the game in the Steam Store

Lukkie1998
10 years ago
Hello guys,
I just ported the viewhands from black ops 1 (viewmodel_usa_pow_arms), but when I use them in game, some meshes get invisible and the Hidetags don't work. Here are some pics:
Picture with the standard CoD5 viewhands:



Picture with ported Black Ops 1 viewhands:


Somebody help please!?

Lukkie1998
10 years ago
Hi guys,

Whenever I create a weaponfile, I can't knife while holding that weapon. With all the other weapons is knifing possible, just not with this weapon. How can I fix this?

I have already added the knifing animations to the weaponfile, but still no luck:
Code Snippet
Plaintext
meleeAnim - viewmodel_knife_slash
meleeChargeAnim - viewmodel_knife_stick

Lukkie1998

10 years ago
Hi Guys,

Today I ported the RPK out of Black ops, so I could re-texture it. Eventually, when I try to convert my .MODEL_EXPORT to an xmodel, Asset Manager gives me the error:
Code Snippet
Plaintext
Converting 1 assets, reason: 'missing cache entry'
Converting 'bo1_t5_weapon_rpk_viewmodel' (xmodel 2 of 1)...
Converting xmodel 'C:\Program Files (x86)\Activision\Call of Duty - World at War
\model_export/BO1\t5_weapon_rpk_viewmodel\t5_weapon_rpk_viewmodel_LOD_0.XMODEL_E
XPORT'...

Surface summary:
bo1_mtl_t5_weapon_rpk (124 tris, 74 verts, 34 unique verts)
bo1_mtl_t5_weapon_rpk (4694 tris, 3863 verts, 2328 unique verts)
bo1_mtl_t5_weapon_rpk (172 tris, 105 verts, 53 unique verts)
bo1_mtl_t5_weapon_rpk (4390 tris, 1956 verts, 1227 unique verts)
bo1_mtl_t5_weapon_rpk (700 tris, 294 verts, 194 unique verts)
bo1_mtl_t5_weapon_rpk (3142 tris, 3047 verts, 1871 unique verts)
bo1_mtl_t5_weapon_rpk (1016 tris, 302 verts, 282 unique verts)
bo1_mtl_t5_weapon_kobra_mw2_mount (432 tris, 194 verts, 116 unique verts)
bo1_mtl_t5_weapon_rpk_plastic (860 tris, 282 verts, 224 unique verts)
bo1_mtl_t5_weapon_rpk_plastic (2512 tris, 1230 verts, 747 unique verts)

ERROR: Code Error - Model has one or more surfaces which exceed TRI_VERT_RATIO (
10.0927).
aborting....


Conversion failed with 1 errors. Hit key to continue.

Did someone had this error before, or knows how to solve it???

Lukkie1998]

Post Merge: February 07, 2014, 07:47:29 pm
Already Solved!!!
Just used the other .MODEL_EXPORT which came with lime.

Lukkie1998
10 years ago
Hey guys,

If I buy the random box, there only comes a raygun. It's also the only weapon in the random box. Does someone have the same problem or knows how to solve this?

Also, in the beginning of the game, it lags a second when the round number goes down.

Lukkie1998
10 years ago


Hello guys,
 
This is my first self-made map on Call of Duty: World at War. This is just a map made from scratch, and won't be anything special for you. But since this is my first map, I would really like to get your feedback about the map and my personal work to the map. This map has a couple of features, such as:
  • 7 Perks
  • Working Kino-Style Teleporter
  • Different starting weapon
  • Little Easteregg for the real detectives ;)
  • Some Black Ops weapons ported into WAW

This is just a map about a school. Nothing special, just that.

Here are some pictures to show you a little bit around the map  :rainbow:






So as you guys can see, this is my map! Hope you like it a bit and you can download the map:
Mega:Click here to download!
MediaFire:Click here to download!

And because it's december, to Everyone merry Christmas and a happy new year!!!

10 years ago
Can someone help with my kino-style teleporter? Everytime I try to teleport, it doesn't take me to the black boxes. This is my script:
Code Snippet
Plaintext
#include common_scripts\utility; 
#include maps\_utility;
#include maps\_zombiemode_utility;

init()
{
    thread level_players();
    addItems();
    thread handleTriggers(level.kts["teleporter_trigger"], level.kts["mainframe_trigger"]);
    flag_wait("electricity_on");
    thread teleport_room_fx();
    thread main();
}
addItems()
{
    // Create Kino Teleporting System array
    level.kts = [];
    // Set variables needed for the teleporting system (using the setVar function)
   
    // DO NOT EDIT THESE
    setVar("teleporter_trigger", getEnt("kino_teleporter_trigger","targetname")); //done
    setVar("mainframe_trigger", getEnt("kino_mainframe_trigger","targetname")); //done
    setVar("teleporter_fxspot", getEnt("kino_teleporter_fxspot","targetname"));
    setVar("mainframe_fxspot", getEnt("kino_mainframe_fxspot","targetname"));
    setVar("zombie_goto", getEnt("kino_teleporter_zombiegoto","targetname"));
    setVar("mainframe_spawn", getEntArray("kino_mainframe_spawn","targetname")); //done
    setVar("pap_room_spawn", getEntArray("kino_paproom_spawn","targetname")); //done
    setVar("transfer_room_structs", getEntArray("kino_image_room","targetname")); //done
    setVar("teleporter_status", 0);
    level.paping = false;
    level.disable_pap = true;
    level.kts["zombie_goto"] create_zombie_point_of_interest( 1536, 96, 10000, true );
    level.kts["zombie_goto"].attract_to_origin = false;
   
    // You CAN edit these
    setVar("teleporter_cooldown_time", 10); // After a teleport, this is how long a wait until you can use it again 60
    setVar("teleport_lag", 2); // When you go to teleport, this is how long it will wait until it actually teleports 2
    setVar("pap_room_time", 20); // This is how long you are in the pack-a-punch room
    setVar("wait_for_pap", true); // If false, you can be teleported out of the room even if there is a gun in the slot of the pap machine
    setVar("teleport_cost", 500); // This is the amount of money it costs to teleport
   
    // You MUST change these to be correct
    setVar("room_is_pap", true); // If the room you go to when teleporting does NOT have the pack-a-punch in it, set this to false
   
    if(!level.kts["room_is_pap"])
        level.disable_pap = false;
}
level_players()
{
    while(1)
    {
        level.players = get_players();
        wait 0.5;
    }
}
teleport_room_fx()
{
    //points = level.kts["transfer_room_structs"];
    points = getEntArray("kino_image_room","targetname");
    for(i=0;i<points.size;i++)
    {
        points[i].struct = Spawn( "script_model", points[i].origin );
        points[i].struct SetModel( "tag_origin_animate" );
        points[i].struct.angles = points[i].angles;
        PlayFxOnTag( level._effect["zombie_flashback_american"], points[i].struct, "tag_origin" );
    }
}
main()
{
    while(1)
    {
        setVar("teleporter_status", 1);
        level.kts["teleporter_trigger"] waittill("trigger");
        setVar("teleporter_status", 2);
        level.kts["mainframe_trigger"] waittill("trigger");
        setVar("teleporter_status", 3);
        while(1)
        {
            level.kts["teleporter_trigger"] waittill("trigger", who);
            if(level.kts["teleport_cost"] == 0)
                break;
           
            if(who.score < level.kts["teleport_cost"])
            {
                who playsound("deny");
                continue;
            }
            who playsound("purchase");
            who maps\_zombiemode_score::minus_to_player_score( level.kts["teleport_cost"] );
            break;
        }
        setVar("teleporter_status", 4);
        level.kts["teleporter_trigger"] do_teleport();
        setVar("teleporter_status", 5);
        wait level.kts["teleporter_cooldown_time"];
    }
}
do_teleport()
{
    // start fps fx
    self thread teleport_pad_player_fx();

    // Activate the TP zombie kill effect
    self thread teleport_nuke( 20, 300, false); // Max 20 zombies and range 300
   
    // 3rd Person Beam
    level.kts["teleporter_fxspot"] thread pad_explosion();
   
    // Teleport the players
    self teleport_players();
}
teleport_players()
{
    //thread do_mainframe_explode();
    wait level.kts["teleport_lag"];
    self notify( "fx_done" );
    players_in = [];
    attract = false;
    for ( i = 0; i <level.players.size; i++ )
    {
        if( self player_is_near_pad( level.players[i] ) )
        {
            players_in[players_in.size] = level.players[i];
            level.players[i] SetTransported( 2 );
            level.players[i] SetStance( "stand" );
            level.players[i] disableOffhandWeapons();
            level.players[i] disableweapons();
            image_room = getent( "teleport_room_" + i, "script_noteworthy" );
            level.players[i].teleport_origin = spawn( "script_origin", level.players[i].origin );
            level.players[i].teleport_origin.angles = level.players[i].angles;
            level.players[i] linkto( level.players[i].teleport_origin );
            level.players[i].teleport_origin.origin = image_room.origin + (0,-70,-60); // 0, -70, -60
            level.players[i].teleport_origin.angles = image_room.angles + (0,180,0);
            setClientSysState("levelNotify", "t2d", level.players[i]);
            level.players[i] FreezeControls( true );
            wait_network_frame();
        }
    }
    if(players_in.size == level.players.size)
    {
        attract = true;
        level.kts["zombie_goto"].attract_to_origin = true;
    }
    wait 2;
    for ( i = 0; i <players_in.size; i++ )
    {
        players_in[i].teleport_origin delete();
        players_in[i].teleport_origin = undefined;
        players_in[i] SetTransported( 0 );
        players_in[i] FreezeControls( false );
        players_in[i] enableOffhandWeapons();
        players_in[i] enableweapons();
        players_in[i] setOrigin(level.kts["pap_room_spawn"][i].origin);
    }
    if(level.kts["room_is_pap"])
        level.disable_pap = false;
    wait(level.kts["pap_room_time"] - 2);
    if(level.kts["room_is_pap"] && level.kts["wait_for_pap"])
        while(level.paping)
        {
            wait 0.5;
        }
    for ( i = 0; i <players_in.size; i++ )
        players_in[i] SetTransported( 2 );
    if(level.kts["room_is_pap"])
        level.disable_pap = true;
    level.kts["mainframe_fxspot"] thread do_mainframe_explode();
    wait 2;
    for ( i = 0; i <players_in.size; i++ )
    {
        players_in[i] SetTransported( 2 );
        players_in[i] SetStance( "stand" );
        players_in[i] disableOffhandWeapons();
        players_in[i] disableweapons();
        image_room = getEnt( "teleport_room_" + i, "script_noteworthy" );
        players_in[i].teleport_origin = spawn( "script_origin", players_in[i].origin );
        players_in[i].teleport_origin.angles = players_in[i].angles;
        players_in[i] linkto( players_in[i].teleport_origin );
        players_in[i].teleport_origin.origin = image_room.origin + (0,-70,-60);
        players_in[i].teleport_origin.angles = image_room.angles + (0,180,0);
        players_in[i] FreezeControls( true );
        setClientSysState("levelNotify", "t2d", players_in[i]);
        wait_network_frame();
    }
    wait 2;
    for ( i = 0; i <players_in.size; i++ )
    {
        players_in[i].teleport_origin delete();
        players_in[i].teleport_origin = undefined;
        players_in[i] SetTransported( 0 );
        players_in[i] FreezeControls( false );
        players_in[i] enableOffhandWeapons();
        players_in[i] enableweapons();
        players_in[i] setOrigin(level.kts["mainframe_spawn"][i].origin);
    }
    if(attract)
    {
        level.kts["zombie_goto"].attract_to_origin = false;
    }
}
handleTriggers(self1, self2)
{
    self1 SetCursorHint( "HINT_NOICON" );
    self2 SetCursorHint( "HINT_NOICON" );
    while(1)
    {
        hint1 = "";
        hint2 = "";
        switch(level.kts["teleporter_status"])
        {
            case 0: // Need power
                hint1 = "You need to activate the power before using the teleporter";
                hint2 = "You need to activate the power before using the teleporter";
                break;
            case 1: // Startup
                hint1 = "Press &&1 to initiate link to mainframe";
                hint2 = "Waiting for initial link to mainframe";
                break;
            case 2: // Waiting for link
                hint1 = "Waiting for confirmation";
                hint2 = "Press &&1 to link pad to mainframe";
                break;
            case 3: // Linked
                if(level.kts["teleport_cost"] == 0)
                    hint1 = "Press &&1 to teleport";
                else
                    hint1 = "Press &&1 to teleport [Cost: " + level.kts["teleport_cost"] + "]";
                hint2 = "Search for the other station";
                break;
            case 4: // Teleporting
                hint1 = "Teleporting in progress";
                hint2 = "Teleporting in progress";
                break;
            case 5: // Cooling down
                hint1 = "The teleporter is cooling down";
                hint2 = "The teleporter is cooling down";
                break;
            default: // Failsafe
                hint1 = " ";
                hint2 = " ";
                break;
        }
        self1 setHintString(hint1);
        self2 setHintString(hint2);
        wait 0.5;
    }
}
setVar(var, value)
{
    // Sets the value on the array
    level.kts[var] = value;
}
teleport_pad_player_fx()
{
    self endon( "fx_done" );

    while ( 1 )
    {
        players = getplayers();
        for ( i = 0; i < players.size; i++ )
        {
            if ( isdefined( players[i] ) )
            {
                if ( self player_is_near_pad( players[i] ) )
                {
                    players[i] SetTransported( 2 );
                }
                else
                {
                    players[i] SetTransported( 0 );
                }
            }
        }
        wait ( .05 );
    }
}
player_is_near_pad( player )
{
    radius = 44;
    scale_factor = 2;

    dist = Distance2D( player.origin, self.origin );
    dist_touching = radius * scale_factor;

    if ( dist < dist_touching )
    {
        return true;
    }

    return false;
}
teleport_nuke( max_zombies, range, end_after_one )
{
    self endon( "fx_done" );
    if(!isDefined(end_after_one))
        end_after_one = false;
    while(1)
    {
        zombies = getaispeciesarray("axis");

        zombies = get_array_of_closest( self.origin, zombies, undefined, max_zombies, range );

        for (i = 0; i < zombies.size; i++)
        {
            wait (randomfloatrange(0.2, 0.3));
            if( !IsDefined( zombies[i] ) )
            {
                continue;
            }

            if( is_magic_bullet_shield_enabled( zombies[i] ) )
            {
                continue;
            }

            if( !( zombies[i] enemy_is_dog() ) )
            {
                zombies[i] maps\_zombiemode_spawner::zombie_head_gib();
            }

            zombies[i] dodamage( 10000, zombies[i].origin );
            playsoundatposition( "nuked", zombies[i].origin );
        }
        if(end_after_one)
            return;
        wait 0.01;
    }
}
pad_explosion()
{
    self thread pad_explosion_sound();
    playfx(level._effect["transporter_pad_start"], self.origin);
    wait level.kts["teleport_lag"];
    playfx(level._effect["transporter_beam"], self.origin);
}
pad_explosion_sound()
{
    count = 0;
    while(1)
    {
        count ++;
        if(count == 5)
            return;
        sound = "top_spark" + count + "_warmup";
        playsoundatposition(sound, self.origin);
        wait 0.1;
        if(count == 4)
            return;
    }
}
do_mainframe_explode()
{
    playfx(level._effect["zombie_mainframe_beam_start"], self.origin);
    wait 4;
    earthquake(0.3, 2, self.origin, 1024);
    playfx(level._effect["zombie_mainframe_beam"], self.origin);
    self thread teleport_nuke( 20, 300, true);
}
10 years ago
Loading ...