Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 00158 00159 00160 00161 00162 00163 00164 00165 00166 00167 00168 00169 00170 00171 00172 00173 00174 00175 00176 00177 00178 00179 00180 00181 00182 00183 00184 00185 00186 00187 00188 00189 00190 00191 00192 00193 00194 00195 00196 00197 00198 00199 00200 00201 00202 00203 00204 00205 00206 00207 00208 00209 00210 00211 00212 00213 00214 00215 00216 00217 00218 00219 00220 00221 00222 00223 00224 00225 00226 00227 00228 00229 00230 00231 00232 00233 00234 00235 00236 00237 00238 00239 00240 00241 00242 00243 00244 00245 00246 00247 00248 00249 00250 00251 00252 00253 00254 00255 00256 00257 00258 00259 00260 00261 00262 00263 00264 00265 00266 00267 00268 00269 00270 00271 00272 00273 00274 00275 00276 00277 00278 00279 00280 00281 00282 00283 00284 00285 00286 00287 00288 00289 00290 00291 00292 00293 00294 00295 00296 00297 00298 00299 00300 00301 00302 00303 00304 00305 00306 00307 00308 00309 00310 00311 00312 00313 00314 00315 00316 00317 00318 00319 00320 00321 00322 00323 00324 00325 00326 00327 00328 00329 00330 00331 00332 00333 00334 00335 00336 00337 00338 00339 00340 00341 00342 00343 00344 00345 00346 00347 00348 00349 00350 00351 00352 00353 00354 00355 00356 00357 00358 00359 00360 00361 00362 00363 00364 00365 00366 00367 00368 00369 00370 00371 00372 00373 00374 00375 00376 00377 00378 00379 00380 00381 00382 00383 00384 00385 00386 00387 00388 00389 00390 00391 00392 00393 00394 00395 00396 00397 00398 00399 00400 00401 00402 00403 00404 00405 00406 00407 00408 00409 00410 00411 00412 00413 00414 00415 00416 00417 00418 00419 00420 00421 00422 00423 00424 00425 00426 00427 00428 00429 00430 00431 00432 00433 00434 00435 00436 00437 00438 00439 00440 00441 00442 00443 00444 00445 00446 00447 00448 00449 00450 00451 00452 00453 00454 00455 00456 00457 00458 00459 00460 00461 00462 00463 00464 00465 00466 00467 00468 00469 00470 00471 00472 00473 00474 00475 00476 00477 00478 00479 00480 00481 00482 00483 00484 00485 00486 00487 00488 00489 00490 00491 00492 00493 00494 00495 00496 00497 00498 00499 00500 00501 00502 00503 00504 00505 00506 00507 00508 00509 00510 00511 00512 00513 00514 00515 00516 00517 00518 00519 00520 00521 00522 00523 00524 00525 00526 00527 00528 00529 00530 00531 00532 00533 00534 00535 00536 00537 00538 00539 00540 00541 00542 00543 00544 00545 00546 00547 00548 00549 00550 00551 00552 00553 00554 00555 00556 00557 00558 00559 00560 00561 00562 00563 00564 00565 00566 00567 00568 00569 00570 00571 00572 00573 00574 00575 00576 00577 00578 00579 00580 00581 00582 00583 00584 00585 00586 00587 00588 00589 00590 00591 00592 00593 00594 00595 00596 00597 00598 00599 00600 00601 00602 00603 00604 00605 00606 00607 00608 00609 00610 00611 00612 00613 00614 00615 00616 00617 00618 00619 00620 00621 00622 00623 00624 00625 00626 00627 00628 00629 00630 00631 00632 00633 00634 00635 00636 00637 00638 00639 00640 00641 00642 00643 00644 00645 00646 00647 00648 00649 00650 00651 00652 00653 00654 00655 00656 00657 00658 00659 00660 00661 00662 00663 00664 00665 00666 00667 00668 00669 00670 00671 00672 00673 00674 00675 00676 00677 00678 00679 00680 00681 00682 00683 00684 00685 00686 00687 00688 00689 00690 00691 00692 00693 00694 00695 00696 00697 00698 00699 00700 00701 00702 00703 00704 00705 00706 00707 00708 00709 00710 00711 00712 00713 00714 00715 00716 00717 00718 00719 00720 00721 00722 00723 00724 00725 00726 00727 00728 00729 00730 00731 00732 00733 00734 00735 00736 00737 00738 00739 00740 00741 00742 00743 00744 00745 00746 00747 00748 00749 00750 00751 00752 00753 00754 00755 00756 00757 00758 00759 00760 00761 00762 00763 00764 00765 00766 00767 00768 00769 00770 00771 00772 00773 00774 00775 00776 00777 00778 00779 00780 00781 00782 00783 00784 00785 00786 00787 00788 00789 00790 00791 00792 00793 00794 00795 00796 00797 00798 00799 00800 00801 00802 00803 00804 00805 00806 00807 00808 00809 00810 00811 00812 00813 00814 00815 00816 00817 00818 00819 00820 00821 00822 00823 00824 00825 00826 00827 00828 00829 00830 00831 00832 00833 00834 00835 00836 00837 00838 00839 00840 00841 00842 00843 00844 00845 00846 00847 00848 00849 00850 00851 00852 00853 00854 00855 00856 00857 00858 00859 00860 00861 00862 00863 00864 00865 00866 00867 00868 00869 00870 00871 00872 00873 00874 00875 00876 00877 00878 00879 00880 00881 00882 00883 00884 00885 00886 00887 00888 00889 00890 00891 00892 00893 00894 00895 00896 00897 00898 00899 00900 00901 00902 00903 00904 00905 00906 00907 00908 00909 00910 00911 00912 00913 00914 00915 00916 00917 00918 00919 00920 00921 00922 00923 00924 00925 00926 00927 00928 00929 00930 00931 00932 00933 00934 00935 00936 00937 00938 00939 00940 00941 00942 00943 00944 00945 00946 00947 00948 00949 00950 00951 00952 00953 00954 00955 00956 00957 00958 00959 00960 00961 00962 00963 00964 00965 00966 00967 00968 00969 00970 00971 00972 00973 00974 00975 00976 00977 00978 00979 00980 00981 00982 00983 00984 00985 00986 00987 00988 00989 00990 00991 00992 00993 00994 00995 00996 00997 00998 00999 01000 01001 01002 01003 01004 01005 01006 01007 01008 01009 01010 01011 01012 01013 01014 01015 01016 01017 01018 01019 01020 01021 01022 01023 01024 01025 01026 01027 01028 01029 01030 01031 01032 01033 01034 01035 01036 01037 01038 01039 01040 01041 01042 01043 01044 01045 01046 01047 01048 01049 01050 01051 01052 01053 01054 01055 01056 01057 01058 01059 01060 01061 01062 01063 01064 01065 01066 01067 01068 01069 01070 01071 01072 01073 01074 01075 01076 01077 01078 01079 01080 01081 01082 01083 01084 01085 01086 01087 01088 01089 01090 01091 01092 01093 01094 01095 01096 01097 01098 01099 01100 01101 01102 01103 01104 01105 01106 01107 01108 01109 01110 01111 01112 01113 01114 01115 01116 01117 01118 01119 01120 01121 01122 01123 01124 01125 01126 01127 01128 01129 01130 01131 01132 01133 01134 01135 01136 01137 01138 01139 01140 01141 01142 01143 01144 01145 01146 01147 01148 01149 01150 01151 01152 01153 01154 01155 01156 01157 01158 01159 01160 01161 01162 01163 01164 01165 01166 01167 01168 01169 01170 01171 01172 01173 01174 01175 01176 01177 01178 01179 01180 01181 01182 01183 01184 01185 01186 01187 01188 01189 01190 01191 01192 01193 01194 01195 01196 01197 01198 01199 01200 01201 01202 01203 01204 01205 01206 01207 01208 01209 01210 01211 01212 01213 01214 01215 01216 01217 01218 01219 01220 01221 01222 01223 01224 01225 01226 01227 01228 01229 01230 01231 01232 01233 01234 01235 01236 01237 01238 01239 01240 01241 01242 01243 01244 01245 01246 01247 |
/** * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved. */ class UTVehicle_Scorpion extends UTVehicle native(Vehicle) abstract; /** animation for the Scorpion's extendable blades */ var UTAnimBlendByWeapon BladeBlend; /** Internal variable. Maintains brake light state to avoid extraMatInst calls. */ var bool bBrakeLightOn; /** Internal variable. Maintains reverse light state to avoid extra MatInst calls. */ var bool bReverseLightOn; /** Internal variable. Maintains headlight state to avoid extra MatInst calls. */ var bool bHeadlightsOn; /** whether or not the blades are currently extended */ var repnotify bool bBladesExtended; /** whether or not the blade on each side has been broken off */ var repnotify bool bLeftBladeBroken, bRightBladeBroken; /** how far along blades a hit against world geometry will break them */ var float BladeBreakPoint; /** material parameter that should be modified to turn the brake lights on and off */ var name BrakeLightParameterName; /** material parameter that should be modified to turn the reverse lights on and off */ var name ReverseLightParameterName; /** material parameter that should be modified to turn the headlights on and off */ var name HeadLightParameterName; /** socket names for the start and end of the blade traces if the corresponding blade is not broken anything that gets in between the start and end bone triggers a BladeHit() event */ var name RightBladeStartSocket, RightBladeEndSocket, LeftBladeStartSocket, LeftBladeEndSocket; /** damage type for blade kills */ var class<DamageType> BladeDamageType; /** blade sounds */ var SoundCue BladeBreakSound, BladeExtendSound, BladeRetractSound; /** rocket booster properties */ var float BoosterForceMagnitude; var repnotify bool bBoostersActivated; /** If true, steering is very limited (enabled while boosting) */ var bool bSteeringLimited; var Controller SelfDestructInstigator; /** Radius to auto-check for targets when in self-destruct mode */ var float BoosterCheckRadius; /** How long you can boost */ var float MaxBoostDuration; /** used to track boost duration */ var float BoostStartTime; /** How long it takes to recharge between boosts */ var float BoostChargeDuration; /** used to track boost recharging duration */ var float BoostChargeTime; var AudioComponent BoosterSound; /** Coordinates for the boost tooltip textures */ var UIRoot.TextureCoordinates BoostToolTipIconCoords; /** Coordinates for the eject tooltip textures */ var UIRoot.TextureCoordinates EjectToolTipIconCoords; var class<UTDamageType> SelfDestructDamageType; var float BoostPowerSpeed; var float BoostReleaseTime; var float BoostReleaseDelay; var SoundCue SelfDestructSoundCue; var SoundCue SelfDestructReadyCue; var SoundCue SelfDestructWarningSound; var SoundCue SelfDestructEnabledSound; var SoundCue SelfDestructEnabledLoop; var CameraAnim RedBoostCamAnim; var CameraAnim BlueBoostCamAnim; /** Sound played whenever Suspension moves suddenly */ var SoundCue SuspensionShiftSound; var AudioComponent SelfDestructEnabledComponent; var AudioComponent SelfDestructWarningComponent; var AudioComponent SelfDestructReadyComponent; var SoundCue EjectSoundCue; /** desired camera FOV while using booster */ var float BoosterFOVAngle; /** animation for the boosters */ var UTAnimBlendByWeapon BoosterBlend; /** set when boosters activated by Kismet script, so keep them active regardless of input */ var bool bScriptedBoosters; /** replicated flag indicating when self destruct is activated */ var repnotify bool bSelfDestructArmed; /** double tap forward to start rocket boosters */ var bool bTryToBoost; var bool bWasThrottle; var float ThrottleStartTime; var() float BoostUprightTorqueFactor; var() float BoostUprightMaxTorque; var float DefaultUprightTorqueFactor; var float DefaultUprightMaxTorque; /** dynamic light */ var PointLightComponent LeftBoosterLight, RightBoosterLight; var RB_ConstraintActor BladeVictimConstraint[2]; var StaticMesh ScorpionHood; /** Rocket speed is the (clamped) max speed while boosting */ var float RocketSpeed; /** Square of minimum speed needed to engage self destruct */ var float SelfDestructSpeedSquared; /** How long the springs should be when the wheels need to be locked to the ground */ var() float LockSuspensionTravel; /** How stiff the suspension should be when the wheels need to be locked to the ground */ var() float LockSuspensionStiffness; /** How much the steering should be restricted while boosting */ var() float BoostSteerFactors[3]; /** swap BigExplosionTemplate for this when self-destructing */ var ParticleSystem SelfDestructExplosionTemplate; var class<UTGib> HatchGibClass; /** The mesh to spawn when the blades are broken off **/ var StaticMesh BrokenBladeMesh; /** Last time bot tried to do blade boost */ var float LastBladeBoostTime; var bool bAISelfDestruct; replication { if (bNetDirty) bBladesExtended, bLeftBladeBroken, bRightBladeBroken, bSelfDestructArmed; if (bNetDirty) bBoostersActivated; } // (cpptext) // (cpptext) // (cpptext) // (cpptext) /** Returns true if self destruct conditions (boosting, going fast enough) are met */ native final function bool ReadyToSelfDestruct(); function bool EagleEyeTarget() { return ReadyToSelfDestruct(); } simulated function PostBeginPlay() { Super.PostBeginPlay(); if(SimObj.bAutoDrive) { SetDriving(true); } if (WorldInfo.NetMode != NM_DedicatedServer && !bDeleteMe && DamageMaterialInstance[0] != none) { // turn off headlights DamageMaterialInstance[0].SetScalarParameterValue('Green_Glows_Headlights', 0.f ); } BladeBlend = UTAnimBlendByWeapon(Mesh.Animations.FindAnimNode('BladeNode')); if (BladeBlend == None) WarnInternal("Could not find BladeNode for mesh (" $ Mesh $ ")"); BoosterBlend = UTAnimBlendByWeapon(Mesh.Animations.FindAnimNode('BoosterNode')); if (BoosterBlend == None) WarnInternal("Could not find BoosterNode for mesh (" $ Mesh $ ")"); } /** * RanInto() called for encroaching actors which successfully moved the other actor out of the way * * @param Other The pawn that was hit */ event RanInto(Actor Other) { local float BoostRemaining; if ( bBoostersActivated && !bAISelfDestruct && (Other == Controller.Enemy) && (UTBot(Controller) != None) ) { DeactivateRocketBoosters(); bBoostersActivated = FALSE; BoostRemaining = MaxBoostDuration - WorldInfo.TimeSeconds + BoostStartTime; BoostChargeTime = WorldInfo.TimeSeconds - FMin(BoostChargeDuration - 2.f, BoostRemaining * BoostChargeDuration/MaxBoostDuration); } super.RanInto(Other); } function PancakeOther(Pawn Other) { local float BoostRemaining; if ( bBoostersActivated && !bAISelfDestruct && (Other == Controller.Enemy) && (UTBot(Controller) != None) ) { DeactivateRocketBoosters(); bBoostersActivated = FALSE; BoostRemaining = MaxBoostDuration - WorldInfo.TimeSeconds + BoostStartTime; BoostChargeTime = WorldInfo.TimeSeconds - FMin(BoostChargeDuration - 2.f, BoostRemaining * BoostChargeDuration/MaxBoostDuration); } super.PancakeOther(Other); } /** * Are we allowing this Pawn to be based on us? */ simulated function bool CanBeBaseForPawn(Pawn APawn) { return bCanBeBaseForPawns && !bDriving; } /** DriverEnter() Make Pawn P the new driver of this vehicle */ function bool DriverEnter(Pawn P) { local Pawn BasedPawn; if ( super.DriverEnter(P) ) { ForEach BasedActors(class'Pawn', BasedPawn) { if(BasedPawn != Driver) { BasedPawn.JumpOffPawn(); } } return true; } return false; } simulated function SetInputs(float InForward, float InStrafe, float InUp) { Super.SetInputs(InForward, InStrafe, InUp); if (!bBoostersActivated && WorldInfo.TimeSeconds - BoostChargeTime > BoostChargeDuration) { if (bScriptedBoosters) { bTryToBoost = true; } else if (IsLocallyControlled()) { if (Throttle > 0.0) { if (Rise > 0.0) { ServerBoost(); bTryToBoost = true; } else if (!bWasThrottle) { if (WorldInfo.TimeSeconds - ThrottleStartTime < class'PlayerInput'.default.DoubleClickTime) { ServerBoost(); bTryToBoost = true; } ThrottleStartTime = WorldInfo.TimeSeconds; } bWasThrottle = true; } else if (Throttle <= 0) { bWasThrottle = false; } } } } simulated function StopVehicleSounds() { super.StopVehicleSounds(); BoosterSound.Stop(); } simulated event SuspensionHeavyShift(float Delta) { if(Delta>0) { PlaySound(SuspensionShiftSound); } } /** when called makes the wheels stick to the ground more */ simulated function LockWheels() { local SVehicleSimCar SimCar; bSteeringLimited = true; SimCar = SVehicleSimCar(SimObj); Wheels[0].SuspensionTravel = LockSuspensionTravel; Wheels[1].SuspensionTravel = LockSuspensionTravel; SimCar.WheelSuspensionStiffness= LockSuspensionStiffness; SimCar.MaxSteerAngleCurve.Points[0].OutVal = BoostSteerFactors[0]; //10.0; SimCar.MaxSteerAngleCurve.Points[1].OutVal = BoostSteerFactors[1]; //4.0; SimCar.MaxSteerAngleCurve.Points[2].OutVal = BoostSteerFactors[2]; //1.2; } /** Resets the variables that are changed in the LockWheels call */ simulated function UnlockWheels() { local SVehicleSimCar SimCar; bSteeringLimited = false; SimCar = SVehicleSimCar(SimObj); Wheels[0].SuspensionTravel = Default.Wheels[0].SuspensionTravel; Wheels[1].SuspensionTravel = Default.Wheels[1].SuspensionTravel; SimCar.WheelSuspensionStiffness = SVehicleSimCar(Default.SimObj).WheelSuspensionStiffness; } /** ActivateRocketBoosters() called when player activates rocket boosters */ simulated event ActivateRocketBoosters() { local CameraAnim UseCamAnim; bSteeringLimited = true; AirSpeed = Default.RocketSpeed; if ( WorldInfo.NetMode == NM_DedicatedServer ) return; // Play any animations/etc here if ( UTPlayerController(Controller) != none ) { UTPlayerController(Controller).StartZoom(BoosterFOVAngle,60); UseCamAnim = (Team==1) ? BlueBoostCamAnim : RedBoostCamAnim; UTPlayerController(Controller).PlayCameraAnim(UseCamAnim, 1.0, 1.0, 0.1, 0.2, FALSE, FALSE); } // play animation BoosterBlend.AnimFire('boosters_out', true,,, 'boosters_out_idle'); // activate booster sound and effects BoosterSound.Play(); if (VehicleEffects[0].EffectRef != none) { VehicleEffects[0].EffectRef.bJustAttached = TRUE; } if (VehicleEffects[1].EffectRef != none) { VehicleEffects[1].EffectRef.bJustAttached = TRUE; } VehicleEvent( 'BoostStart' ); if ( PlayerController(Controller) != None ) { Mesh.AttachComponentToSocket(LeftBoosterLight, VehicleEffects[0].EffectSocket); Mesh.AttachComponentToSocket(RightBoosterLight, VehicleEffects[1].EffectSocket); LeftBoosterLight.SetEnabled(TRUE); RightBoosterLight.SetEnabled(TRUE); } LockWheels(); DefaultUprightMaxTorque = UTVehicleSimCar(SimObj).InAirUprightMaxTorque; DefaultUprightTorqueFactor = UTVehicleSimCar(SimObj).InAirUprightTorqueFactor; UTVehicleSimCar(SimObj).InAirUprightMaxTorque = BoostUprightMaxTorque; UTVehicleSimCar(SimObj).InAirUprightTorqueFactor = BoostUprightTorqueFactor; } /** DeactivateHandbrake() called (usually by a timer) to deactivate the handbrake */ simulated function DeactivateHandbrake() { bOutputHandbrake = FALSE; bHoldingDownHandbrake = FALSE; } simulated event EnableFullSteering() { local SVehicleSimCar SimCar; bSteeringLimited = false; SimCar = SVehicleSimCar(SimObj); SimCar.MaxSteerAngleCurve.Points[0].OutVal = SVehicleSimCar(Default.SimObj).MaxSteerAngleCurve.Points[0].OutVal; SimCar.MaxSteerAngleCurve.Points[1].OutVal = SVehicleSimCar(Default.SimObj).MaxSteerAngleCurve.Points[1].OutVal; SimCar.MaxSteerAngleCurve.Points[2].OutVal = SVehicleSimCar(Default.SimObj).MaxSteerAngleCurve.Points[2].OutVal; } /** DeactivateRocketBoosters() called when player deactivates rocket boosters or they run out */ simulated event DeactivateRocketBoosters() { local UTPlayerController PC; // Set handbrake to decrease the possibility of a rollover // bOutputHandbrake = TRUE; // bHoldingDownHandbrake = TRUE; // SetTimer(3.0f, FALSE, 'DeactivateHandbrake'); AirSpeed = Default.AirSpeed; EnableFullSteering(); if ( WorldInfo.NetMode == NM_DedicatedServer ) return; PC = UTPlayerController(Controller); if ( PC != none ) { PC.StartZoom(PC.DefaultFOV,120); } // play animation BoosterBlend.AnimStopFire(); // deactivate booster sound and effects BoosterSound.Stop(); VehicleEvent( 'BoostStop' ); LeftBoosterLight.SetEnabled(FALSE); RightBoosterLight.SetEnabled(FALSE); Mesh.DetachComponent(LeftBoosterLight); Mesh.DetachComponent(RightBoosterLight); UnlockWheels(); UTVehicleSimCar(SimObj).InAirUprightMaxTorque = DefaultUprightMaxTorque; UTVehicleSimCar(SimObj).InAirUprightTorqueFactor = DefaultUprightTorqueFactor; } function OnActivateRocketBoosters(UTSeqAct_ActivateRocketBoosters BoosterAction) { bScriptedBoosters = true; } reliable server function ServerBoost() { bTryToBoost = true; } simulated function float AdjustFOVAngle(float FOVAngle) { if (bBoostersActivated) { return Lerp( FOVAngle, BoosterFOVAngle, FMin(WorldInfo.TimeSeconds - BoostStartTime, 1.0) ); } else { return Lerp( BoosterFOVAngle, FOVAngle, FMin(WorldInfo.TimeSeconds - BoostChargeTime, 1.0) ); } } /** Self destruct immediately if activated and hit by EMP */ simulated function bool DisableVehicle() { local bool bResult; bResult = super.DisableVehicle(); if ( SelfDestructInstigator != None ) { SelfDestruct(None); return true; } return bResult; } simulated function BlowupVehicle() { if (bBoostersActivated) { bBoostersActivated=FALSE; DeactivateRocketBoosters(); } Super.BlowupVehicle(); } event SelfDestruct(Actor ImpactedActor) { Health = -100000; if(SelfDestructWarningComponent != none) { SelfDestructWarningComponent.Stop(); } if(SelfDestructEnabledComponent != none) { SelfDestructEnabledComponent.Stop(); } KillerController = SelfDestructInstigator; BlowUpVehicle(); if ( ImpactedActor != None ) { ImpactedActor.TakeDamage(600, SelfDestructInstigator, GetTargetLocation(), 200000 * Normal(Velocity), SelfDestructDamageType,, self); } HurtRadius(600,600, SelfDestructDamageType, 200000, GetTargetLocation(), ImpactedActor, SelfDestructInstigator); PlaySound(SelfDestructSoundCue); BoostStartTime = WorldInfo.TimeSeconds; } // The pawn Driver has tried to take control of this vehicle function bool TryToDrive(Pawn P) { return (SelfDestructInstigator == None) && Super.TryToDrive(P); } simulated event ReplicatedEvent(name VarName) { if (VarName == 'bBladesExtended') { SetBladesExtended(bBladesExtended); } else if (VarName == 'bLeftBladeBroken') { BreakOffBlade(true); } else if (VarName == 'bRightBladeBroken') { BreakOffBlade(false); } else if (VarName == 'bBoostersActivated') { if ( bBoostersActivated ) { ActivateRocketBoosters(); } else { DeActivateRocketBoosters(); } } else if (VarName == 'bSelfDestructArmed') { PlaySelfDestruct(); } else { Super.ReplicatedEvent(VarName); } } simulated function bool OverrideBeginFire(byte FireModeNum) { if (FireModeNum == 1) { if (Role == ROLE_Authority && !bBladesExtended) { SetBladesExtended(true); } // note: the blade hit checks are in native tick return true; } return false; } simulated function bool OverrideEndFire(byte FireModeNum) { if (FireModeNum == 1) { if (Role == ROLE_Authority && bBladesExtended) { SetBladesExtended(false); } return true; } return false; } /** extends and retracts the blades */ simulated function SetBladesExtended(bool bExtended) { local int i; bBladesExtended = bExtended; if (bBladesExtended) { BladeBlend.AnimFire('Blades_out', true,,, 'Blades_out_idle'); PlaySound(BladeExtendSound, true); } else { for (i = 0; i < 2; i++) { if (BladeVictimConstraint[i] != None) { BladeVictimConstraint[i].Destroy(); BladeVictimConstraint[i] = None; } } BladeBlend.AnimStopFire(); PlaySound(BladeRetractSound, true); } } simulated function PlaySelfDestruct() { local UTGib HatchGib; local SkelControlBase SkelControl; DeadVehicleLifeSpan = BurnOutTime + 0.01; UTVehicleSimCar(SimObj).bDriverlessBraking = false; // play sound PlaySound(SelfDestructEnabledSound); if(SelfDestructWarningComponent == none) { SelfDestructWarningComponent = CreateAudioComponent(SelfDestructWarningSound, FALSE, TRUE); if ( SelfDestructWarningComponent != None ) { SelfDestructWarningComponent.Location = Location; SelfDestructWarningComponent.bUseOwnerLocation = true; AttachComponent(SelfDestructWarningComponent); } } if ( SelfDestructWarningComponent != None ) { SelfDestructWarningComponent.Play(); } if(SelfDestructEnabledComponent == None) { SelfDestructEnabledComponent = CreateAudioComponent(SelfDestructEnabledLoop, FALSE, TRUE); if ( SelfDestructEnabledComponent != None ) { SelfDestructEnabledComponent.Location = Location; SelfDestructEnabledComponent.bUseOwnerLocation = true; AttachComponent(SelfDestructEnabledComponent); } } if ( SelfDestructEnabledComponent != None ) { SelfDestructEnabledComponent.FadeIn(1.0f,1.0f); } // blow off the hatch SkelControl = Mesh.FindSkelControl('Hatch'); if (SkelControl != None) { SkelControl.BoneScale = 0.0; HatchGib = Spawn(HatchGibClass, self,, Mesh.GetBoneLocation('Hatch_Slide'), rot(0,0,0)); if(HatchGib != none) { HatchGib.Velocity = 0.25*Velocity; HatchGib.Velocity.Z = 400.0; HatchGib.GibMeshComp.WakeRigidBody(); HatchGib.GibMeshComp.SetRBLinearVelocity(HatchGib.Velocity, false); } } BigExplosionTemplates.length = 1; BigExplosionTemplates[0].Template = SelfDestructExplosionTemplate; BigExplosionTemplates[0].MinDistance = 0.0; } simulated function DisplayHud(UTHud Hud, Canvas Canvas, vector2D HudPOS, optional int SeatIndex) { local PlayerController PC; super.DisplayHud(HUD, Canvas, HudPOS, SeatIndex); PC = PlayerController(Seats[0].SeatPawn.Controller); if (PC != none) { if (Throttle > 0.0 && !bBoostersActivated && (WorldInfo.TimeSeconds - BoostChargeTime > BoostChargeDuration)) { Hud.DrawToolTip(Canvas, PC, "GBA_Jump", Canvas.ClipX * 0.5, Canvas.ClipY * 0.95, BoostToolTipIconCoords.U, BoostToolTipIconCoords.V, BoostToolTipIconCoords.UL, BoostToolTipIconCoords.VL, Canvas.ClipY / 768); } else if (ReadyToSelfDestruct()) { Hud.DrawToolTip(Canvas, PC, "GBA_Use", Canvas.ClipX * 0.5, Canvas.ClipY * 0.95, EjectToolTipIconCoords.U, EjectToolTipIconCoords.V, EjectToolTipIconCoords.UL, EjectToolTipIconCoords.VL, Canvas.ClipY / 768); } } } function DriverLeft() { if ( ReadyToSelfDestruct() ) { SelfDestructInstigator = (Driver != none) ? Driver.Controller : None; bShouldEject = true; if ( PlayerController(SelfDestructInstigator) != None ) { PlayerController(SelfDestructInstigator).ClientPlaySound(EjectSoundCue); } BoostStartTime = WorldInfo.TimeSeconds - MaxBoostDuration + 1.0; bSelfDestructArmed = true; PlaySelfDestruct(); } else if (bBladesExtended) { SetBladesExtended(false); } Super.DriverLeft(); } /** * Extra damage if hit while boosting */ simulated event TakeDamage(int Damage, Controller EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType, optional TraceHitInfo HitInfo, optional Actor DamageCauser) { local PlayerController PC; if (Role == ROLE_Authority) { if ( SelfDestructInstigator != None ) { PC = PlayerController(SelfDestructInstigator); Damage *= 2.0; } else if ( bBoostersActivated ) Damage *= 1.5; } Super.TakeDamage(Damage, EventInstigator, HitLocation, Momentum, DamageType, HitInfo, DamageCauser); if ( (Role == ROLE_Authority) && (Health < 0) && (SelfDestructInstigator != None) && (EventInstigator != PC) ) { if ( PC != None ) PC.ReceiveLocalizedMessage(class'UTLastSecondMessage', 1, PC.PlayerReplicationInfo, None, None); if ( PlayerController(EventInstigator) != None ) { PlayerController(EventInstigator).ReceiveLocalizedMessage(class'UTLastSecondMessage', 1, PC.PlayerReplicationInfo, None, None); } } } /** called when the blades hit something (not called for broken blades) */ simulated event BladeHit(Actor HitActor, vector HitLocation, bool bLeftBlade) { local TraceHitInfo HitInfo; local vector VelDir; local Pawn P; local int index; if (HitActor.bBlockActors) { if (Vehicle(HitActor) != None) { if (HitActor.IsA('UTVehicle_Hoverboard')) { P = Vehicle(HitActor).Driver; } } else { P = Pawn(HitActor); if ( UTPawn(P) != None && UTPawn(P).IsHero() ) { // heroes break blades P = None; } } // if we hit a vehicle or a non-pawn, break off the blade and do no damage if (P == None) { if (Role == ROLE_Authority) { if (bLeftBlade) { bLeftBladeBroken = true; } else { bRightBladeBroken = true; } BreakOffBlade(bLeftBlade); } } // else we hit a pawn and we are now going to do damage to said pawn else { if (Role == ROLE_Authority) { P.TakeDamage(1000, Controller, HitLocation, Velocity * 100.f, BladeDamageType); } if ( P.Health <= 0 && !P.bDeleteMe && P.Physics == PHYS_RigidBody && P.Mesh != None && P.Mesh.PhysicsAssetInstance != None ) { // grab ragdoll VelDir = Normal(Velocity); P.CheckHitInfo( HitInfo, P.Mesh, VelDir, HitLocation ); if ( HitInfo.BoneName == '' ) { P.CheckHitInfo( HitInfo, P.Mesh, Normal(P.Location - HitLocation), HitLocation ); } if ( HitInfo.BoneName != '' ) { index = 0; if ( BladeVictimConstraint[index] != None ) { index = 1; if ( BladeVictimConstraint[index] != None ) { index = 0; BladeVictimConstraint[index].Destroy(); BladeVictimConstraint[index] = None; } } BladeVictimConstraint[index] = Spawn(class'RB_ConstraintActorSpawnable',,,HitLocation); BladeVictimConstraint[index].InitConstraint( self, P, '', HitInfo.BoneName, 200.f); BladeVictimConstraint[index].LifeSpan = 1 + 4*FRand(); } } } } } /** If exit while boosting, boost out of the vehicle Try to exit above */ function bool FindAutoExit(Pawn ExitingDriver) { local vector X,Y,Z; local float PlaceDist; if ( bBoostersActivated ) { GetAxes(Rotation, X,Y,Z); Y *= -1; PlaceDist = 150 + 4*ExitingDriver.GetCollisionHeight(); if ( TryExitPos(ExitingDriver, GetTargetLocation() + PlaceDist * Z, false) ) return true; } return Super.FindAutoExit(ExitingDriver); } //======================================== // AI Interface function byte ChooseFireMode() { local UTVehicle V; local float Dist; local vector FacingDir, EnemyDir; if ( bAISelfDestruct ) { if ( !bTryToBoost ) bAISelfDestruct = false; else return 0; } if ( Pawn(Controller.Focus) != None && Controller.MoveTarget == Controller.Focus && Controller.InLatentExecution(Controller.LATENT_MOVETOWARD) ) { V = UTVehicle(Controller.Focus); if ( V == None ) { Dist = VSize(Controller.FocalPoint - Location); if ( Dist < 1200.0 && Controller.LineOfSightTo(Controller.Focus) ) { if ( (WorldInfo.TimeSeconds - LastBladeBoostTime > 5) && (Dist > 200.0) ) { LastBladeBoostTime = WorldInfo.TimeSeconds; FacingDir = vector(Rotation); FacingDir.Z = 0; EnemyDir = Controller.Focus.Location - Location; EnemyDir.Z = 0; bTryToBoost = (Normal(FacingDir) dot Normal(EnemyDir) > 0.93) && (FRand() < 0.5); } return 1; } } else if ( (V.Health > 300 || V.ImportantVehicle()) && Controller.LineOfSightTo(Controller.Focus) ) { // self destruct to take out highly armored vehicle bTryToBoost = true; bAISelfDestruct = true; SetTimer(0.3, true, 'CheckScriptedSelfDestruct'); } } else if ( UTOnslaughtNodeObjective(Controller.Focus) != None && Controller.MoveTarget == Controller.Focus && Controller.InLatentExecution(Controller.LATENT_MOVETOWARD) ) { // self destruct to take out highly armored vehicle bTryToBoost = true; bAISelfDestruct = true; SetTimer(0.3, true, 'CheckScriptedSelfDestruct'); } return 0; } function bool TooCloseToAttack(Actor Other) { if (Pawn(Other) != None && Vehicle(Other) == None) { return false; } return Super.TooCloseToAttack(Other); } event Touch(Actor Other, PrimitiveComponent OtherComp, vector HitLocation, vector HitNormal) { local UTBot B; // tell AI to boost through a slow volume if (Other.IsA('UTSlowVolume')) { B = UTBot(Controller); if (B != None && B.Skill >= 2.0) { bTryToBoost = true; } } } function IncomingMissile(Projectile P) { local UTBot B; B = UTBot(Controller); if (Health < 200 && B != None && B.Skill > 4.0 + 4.0 * FRand() && VSize(P.Location - Location) < VSize(P.Velocity)) { DriverLeave(false); } } simulated function TeamChanged() { super.TeamChanged(); // clear out the flags since we have a new material: bBrakeLightOn = false; bReverseLightOn = false; bHeadlightsOn=false; } function OnSelfDestruct(UTSeqAct_SelfDestruct Action) { bScriptedBoosters = true; SetTimer(0.5, true, 'CheckScriptedSelfDestruct'); } function CheckScriptedSelfDestruct() { if ( ReadyToSelfDestruct() ) { DriverLeave(true); ClearTimer('CheckScriptedSelfDestruct'); bAISelfDestruct = false; } } simulated event RigidBodyCollision( PrimitiveComponent HitComponent, PrimitiveComponent OtherComponent, const out CollisionImpactData RigidCollisionData, int ContactIndex ) { // only process rigid body collision if not hitting ground, or hitting at an angle if ( (Abs(RigidCollisionData.ContactInfos[0].ContactNormal.Z) < WalkableFloorZ) || (Abs(RigidCollisionData.ContactInfos[0].ContactNormal dot vector(Rotation)) > 0.8) || (VSizeSq(Mesh.GetRootBodyInstance().PreviousVelocity) * GetCollisionDamageModifier(RigidCollisionData.ContactInfos) > 5) ) { super.RigidBodyCollision(HitComponent, OtherComponent, RigidCollisionData, ContactIndex); } } /** breaks off the given blade by scaling the bone to zero and spawning effects */ simulated function BreakOffBlade(bool bLeftBlade) { local SkelControlBase SkelControl; local vector BoneLoc; PlaySound(BladeBreakSound, true); SkelControl = Mesh.FindSkelControl(bLeftBlade ? 'LeftBlade' : 'RightBlade'); BoneLoc = Mesh.GetBoneLocation(bLeftBlade? 'Blade_L2' : 'Blade_R2'); if (SkelControl != None) { SkelControl.BoneScale = 0.0; } else { WarnInternal("Failed to find skeletal controller named" @ (bLeftBlade ? 'LeftBlade' : 'RightBlade') @ "for mesh" @ Mesh); } if (WorldInfo.NetMode != NM_DedicatedServer && !IsZero(BoneLoc)) { SpawnGibVehicle(BoneLoc, Rotation, BrokenBladeMesh, BoneLoc, true, vect(0,0,0), None, None); } } simulated function CauseMuzzleFlashLight(int SeatIndex) { Super.CauseMuzzleFlashLight(SeatIndex); //@FIXME: should have general code for this in UTVehicle if (SeatIndex == 0) { VehicleEvent('MuzzleFlash'); } } /** * We override here as the scorpion uttlery destroys itself when it blows up! So we need to turn off the damage effects as they * are out of place just floating in the air. **/ simulated function SetBurnOut() { Super.SetBurnOut(); if( DeathExplosion != none ) { DeathExplosion.ParticleSystemComponent.DeactivateSystem(); } VehicleEvent( 'NoDamageSmoke' ); } function bool IsGoodTowTruck() { return true; } function bool RecommendCharge(UTBot B, Pawn Enemy) { local UTVehicle V; if ( Enemy.bCanFly ) { return false; } V = UTVehicle(Enemy); return (V == None) || V.ImportantVehicle() || (V.Health > 300); } /** Recommend high priority charge at enemy */ function bool CriticalChargeAttack(UTBot B) { return (UTVehicle(B.Enemy) != None) && RecommendCharge(B, B.Enemy); } /** returns true if vehicle should charge attack this node (also responsible for setting up charge) */ function bool ChargeAttackObjective(UTBot B, UTGameObjective O) { local vector FacingDir, EnemyDir; local float Dist; Dist = VSize(O.Location - Location); if ( bAISelfDestruct || (Dist < 200.0) ) { if ( !bTryToBoost ) bAISelfDestruct = false; } if ( !bAISelfDestruct ) { // only charge if already facing right if close FacingDir = vector(Rotation); FacingDir.Z = 0; EnemyDir = O.Location - Location; EnemyDir.Z = 0; bTryToBoost = (Normal(FacingDir) dot Normal(EnemyDir) > 0.9); if ( bTryToBoost ) { bAISelfDestruct = true; SetTimer(0.3, true, 'CheckScriptedSelfDestruct'); } if ( !bTryToBoost && (Dist < 600) ) return false; } B.GoalString = "Charge Objective"; return B.Squad.FindPathToObjective(B, O); } defaultproperties { BladeBreakPoint=0.800000 BoosterForceMagnitude=450.000000 BoosterCheckRadius=150.000000 MaxBoostDuration=2.000000 BoostChargeDuration=5.000000 BoostChargeTime=-10.000000 BoostPowerSpeed=1800.000000 BoostReleaseDelay=0.150000 BoosterFOVAngle=105.000000 BoostUprightTorqueFactor=-45.000000 BoostUprightMaxTorque=50.000000 RocketSpeed=2000.000000 SelfDestructSpeedSquared=810000.000000 LockSuspensionTravel=37.000000 LockSuspensionStiffness=62.500000 BoostSteerFactors(0)=10.000000 BoostSteerFactors(1)=4.000000 BoostSteerFactors(2)=1.200000 bStickDeflectionThrottle=True bLightArmor=True bLookSteerOnNormalControls=True bLookSteerOnSimpleControls=True bReducedFallingCollisionDamage=True DeflectionReverseThresh=-0.300000 Begin Object Class=DynamicLightEnvironmentComponent Name=MyLightEnvironment ObjName=MyLightEnvironment Archetype=DynamicLightEnvironmentComponent'UTGame.Default__UTVehicle:MyLightEnvironment' ObjectArchetype=DynamicLightEnvironmentComponent'UTGame.Default__UTVehicle:MyLightEnvironment' End Object LightEnvironment=MyLightEnvironment MaxDesireability=0.400000 ObjectiveGetOutDist=1500.000000 VehicleIndex=10 LookSteerSensitivity=2.200000 LookSteerDamping=0.070000 ConsoleSteerScale=1.100000 StolenAnnouncementIndex=5 VehiclePositionString="in a Scorpion" VehicleNameString="Scorpion" SpawnRadius=125.000000 TeamBeaconOffset=(X=0.000000,Y=0.000000,Z=60.000000) DefaultFOV=80.000000 CameraLag=0.070000 Begin Object Class=UTVehicleSimCar Name=SimObject ObjName=SimObject Archetype=UTVehicleSimCar'UTGame.Default__UTVehicleSimCar' TorqueVSpeedCurve=(Points=((InVal=-600.000000),(InVal=-300.000000,OutVal=80.000000),(OutVal=130.000000),(InVal=950.000000,OutVal=130.000000),(InVal=1050.000000,OutVal=10.000000),(InVal=1150.000000))) EngineRPMCurve=(Points=((InVal=-500.000000,OutVal=2500.000000),(OutVal=500.000000),(InVal=549.000000,OutVal=3500.000000),(InVal=550.000000,OutVal=1000.000000),(InVal=849.000000,OutVal=4500.000000),(InVal=850.000000,OutVal=1500.000000),(InVal=1100.000000,OutVal=5000.000000))) bAutoHandbrake=True SteeringReductionFactor=0.000000 NumWheelsForFullSteering=4 SteeringReductionSpeed=1400.000000 SteeringReductionMinSpeed=1100.000000 HardTurnMotorTorque=0.700000 FrontalCollisionGripFactor=0.180000 SpeedBasedTurnDamping=20.000000 AirControlTurnTorque=40.000000 InAirUprightTorqueFactor=-30.000000 InAirUprightMaxTorque=15.000000 MaxSteerAngleCurve=(Points=((OutVal=45.000000),(InVal=600.000000,OutVal=15.000000),(InVal=1100.000000,OutVal=10.000000),(InVal=1300.000000,OutVal=6.000000),(InVal=1600.000000,OutVal=1.000000))) SteerSpeed=110.000000 EngineBrakeFactor=0.025000 MaxBrakeTorque=5.000000 StopThreshold=100.000000 WheelSuspensionStiffness=100.000000 WheelSuspensionDamping=3.000000 WheelSuspensionBias=0.100000 WheelLatExtremumValue=0.900000 WheelLatAsymptoteValue=0.900000 WheelInertia=0.200000 bClampedFrictionModel=True AutoDriveSteer=0.300000 Name="SimObject" ObjectArchetype=UTVehicleSimCar'UTGame.Default__UTVehicleSimCar' End Object SimObj=SimObject Begin Object Class=UTVehicleScorpionWheel Name=RRWheel ObjName=RRWheel Archetype=UTVehicleScorpionWheel'UTGame.Default__UTVehicleScorpionWheel' SkelControlName="B_R_Tire_Cont" BoneName="B_R_Tire" BoneOffset=(X=0.000000,Y=20.000000,Z=0.000000) Name="RRWheel" ObjectArchetype=UTVehicleScorpionWheel'UTGame.Default__UTVehicleScorpionWheel' End Object Wheels(0)=RRWheel Begin Object Class=UTVehicleScorpionWheel Name=LRWheel ObjName=LRWheel Archetype=UTVehicleScorpionWheel'UTGame.Default__UTVehicleScorpionWheel' SkelControlName="B_L_Tire_Cont" BoneName="B_L_Tire" BoneOffset=(X=0.000000,Y=-20.000000,Z=0.000000) Name="LRWheel" ObjectArchetype=UTVehicleScorpionWheel'UTGame.Default__UTVehicleScorpionWheel' End Object Wheels(1)=LRWheel Begin Object Class=UTVehicleScorpionWheel Name=RFWheel ObjName=RFWheel Archetype=UTVehicleScorpionWheel'UTGame.Default__UTVehicleScorpionWheel' SteerFactor=1.000000 SkelControlName="F_R_Tire_Cont" BoneName="F_R_Tire" BoneOffset=(X=0.000000,Y=20.000000,Z=0.000000) LatSlipFactor=3.000000 HandbrakeLongSlipFactor=0.800000 HandbrakeLatSlipFactor=0.800000 Name="RFWheel" ObjectArchetype=UTVehicleScorpionWheel'UTGame.Default__UTVehicleScorpionWheel' End Object Wheels(2)=RFWheel Begin Object Class=UTVehicleScorpionWheel Name=LFWheel ObjName=LFWheel Archetype=UTVehicleScorpionWheel'UTGame.Default__UTVehicleScorpionWheel' SteerFactor=1.000000 SkelControlName="F_L_Tire_Cont" BoneName="F_L_Tire" BoneOffset=(X=0.000000,Y=-20.000000,Z=0.000000) LatSlipFactor=3.000000 HandbrakeLongSlipFactor=0.800000 HandbrakeLatSlipFactor=0.800000 Name="LFWheel" ObjectArchetype=UTVehicleScorpionWheel'UTGame.Default__UTVehicleScorpionWheel' End Object Wheels(3)=LFWheel COMOffset=(X=-40.000000,Y=0.000000,Z=-36.000000) bCanFlip=True Begin Object Class=RB_StayUprightSetup Name=MyStayUprightSetup_12 ObjName=MyStayUprightSetup_12 Archetype=RB_StayUprightSetup'UTGame.Default__UTVehicle:MyStayUprightSetup' Name="MyStayUprightSetup_12" ObjectArchetype=RB_StayUprightSetup'UTGame.Default__UTVehicle:MyStayUprightSetup' End Object StayUprightConstraintSetup=RB_StayUprightSetup'UTGame.Default__UTVehicle_Scorpion:MyStayUprightSetup_12' Begin Object Class=RB_ConstraintInstance Name=MyStayUprightConstraintInstance_12 ObjName=MyStayUprightConstraintInstance_12 Archetype=RB_ConstraintInstance'UTGame.Default__UTVehicle:MyStayUprightConstraintInstance' Name="MyStayUprightConstraintInstance_12" ObjectArchetype=RB_ConstraintInstance'UTGame.Default__UTVehicle:MyStayUprightConstraintInstance' End Object StayUprightConstraintInstance=RB_ConstraintInstance'UTGame.Default__UTVehicle_Scorpion:MyStayUprightConstraintInstance_12' HeavySuspensionShiftPercent=0.750000 UprightLiftStrength=280.000000 UprightTorqueStrength=500.000000 UprightTime=1.250000 bSeparateTurretFocus=True bHasHandbrake=True MomentumMult=0.500000 NonPreferredVehiclePathMultiplier=1.500000 GroundSpeed=950.000000 AirSpeed=1100.000000 Health=300 Begin Object Class=SkeletalMeshComponent Name=SVehicleMesh ObjName=SVehicleMesh Archetype=SkeletalMeshComponent'UTGame.Default__UTVehicle:SVehicleMesh' ObjectArchetype=SkeletalMeshComponent'UTGame.Default__UTVehicle:SVehicleMesh' End Object Mesh=SVehicleMesh Begin Object Class=CylinderComponent Name=CollisionCylinder ObjName=CollisionCylinder Archetype=CylinderComponent'UTGame.Default__UTVehicle:CollisionCylinder' ObjectArchetype=CylinderComponent'UTGame.Default__UTVehicle:CollisionCylinder' End Object CylinderComponent=CollisionCylinder Components(0)=CollisionCylinder Components(1)=SVehicleMesh Components(2)=MyLightEnvironment Components(3)=SimObject CollisionComponent=SVehicleMesh Name="Default__UTVehicle_Scorpion" ObjectArchetype=UTVehicle'UTGame.Default__UTVehicle' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |