Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation
previous class next class | frames no frames

# Tyrion.ActionChangeGoalPriority

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

    class ActionChangeGoalPriority extends TyrionScriptAction;

    var() editcombotype(enumTyrionTargets) Name target;
    var() String goalName;
    var() int newPriority;

    // execute
    latent function Variable execute()
    {
    	local Actor a;
    	local AI_Goal goal;

    	Super.execute();

    	// todo: use the list of pawns and make a list of squadinfos to speed up search
    	ForEach parentScript.actorLabel(class'Actor', a, target)
    	{
    		goal = class'AI_Goal'.static.findGoalByName( a, goalName );
    		if ( goal != None )
    			goal.changePriority( newPriority );
    	}

    	return None;
    }

    // editorDisplayString
    function editorDisplayString(out string s)
    {
    	s = "Change priority of goal named " $ goalName $ " in " $ propertyDisplayString('target') $ " to " $ newPriority;
    }

    defaultproperties
    {
    	returnType			= None
    	actionDisplayName	= "Change Goal Priority"
    	actionHelp			= "Changes a goal's priority"
    	category			= "AI"
    }

Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation
previous class next class | frames no frames

Class file time: ne 5.9.2004 15:54:28.000 - Creation time: st 23.5.2018 00:10:40.061 - Created with UnCodeX