Jump to content

Script for horse


sundabar21

Recommended Posts

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 horse

If someone has the know how, plese tell me.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...