sundabar21 Posted October 5, 2013 Share Posted October 5, 2013 Hi! I'm new on it and i need some help. I want to optimize a horse-follow-wait-wander stuff script as it seems to be too large. This is the script scn aaHBScript ref rEnemy short Button short HVar ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin OnLoad if IsActionRef player SetIgnoreFriendlyHits 1 SetOwnership endif EvaluatePackage playGroup Idle 1 end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin OnStartCombat ;make sure not to attack friends after accidental hits. set rEnemy to getCombatTarget if GetShouldAttack rEnemy == 0 && Player.GetShouldAttack rEnemy == 0 StopCombat StopCombatAlarmOnActor playGroup Idle 1 Set HVar to 1 endif end begin onActivate MessageBox "*Gesturing*" "Come On" "Be Careful" "Wait here" "Mount" Set HVar to 1 end begin GameMode if ( HVar == 1 ) Set Button to GetButtonPressed endif if ( Button == 0 ) AddScriptPackage "aaBlissFollow" StopWaiting aaBlissFollow Wait aaaBlissWanderAround Wait aaBlissWander Set HVar to -1 Return elseif ( Button == 1 ) AddScriptPackage "aaaBlissWanderAround" StopWaiting aaaBlissWanderAround Wait aaBlissWander Wait aaBlissFollow Set HVar to -1 Return elseif ( Button == 2 ) Wait aaBlissWander Wait aaBlissFollow Wait aaaBlissWanderAround EvaluatePackage Set HVar to -1 Return elseif ( Button == 3 ) activate Return endif end The EvaluatePackage points to a Package "inside?" the horseIf someone has the know how, plese tell me. Link to comment Share on other sites More sharing options...
Recommended Posts