Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Gameplay.UseableObject


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
class UseableObject extends Engine.Actor;

var(UseableObject) localized string	 prompt			"Prompt shown to the user when they are within range of using this object. Specific objects may specify other prompts, this is the default.";
var(UseableObject) float	priority		"What priority this Useableobject has over another if they are conflicting";
var(UseableObject) Vector	markerOffset	"The offset of the objects representation in the game world from the useable object center";

// true implies this object should always be used regardless of priority
var bool bAlwaysUse;

// true implies this object should never be shown if it cannot be used
var bool bDoNotPromptWhenNotUseable;

function InventoryStationAccess getCorrespondingInventoryStation()
{
	return None;
}

function UsedBy(Pawn user)
{
	if (owner != None)
		owner.dispatchMessage(new class'MessageUsed'(owner.Label, user.Label));
	else
		dispatchMessage(new class'MessageUsed'(Label, user.Label));
}

//
// Called to check if the UseableObject can be used
// by a specific actor.
//
function bool CanBeUsedBy(Pawn user)
{
	return true;
}

function class<Actor> GetPromptDataClass()
{
	return None;
}

simulated function Vector GetUseablePoint()
{
	return Location + (markerOffset >> Rotation);
}

function byte GetPromptIndex(Character PotentialUser)
{
	if(CanBeUsedBy(PotentialUser))
		return 0;
	else
		return 255;
}

// returns a prompt string based on the prompt index
static function string GetPrompt(byte PromptIndex, class<Actor> dataClass)
{
	if(PromptIndex == 255)
		return "";

	return default.prompt;
}

defaultproperties
{
	bHidden=true
	bCollideActors=true
	Texture=Texture'Engine_res.S_Trigger'
	bAlwaysUse=false

	prompt="Press '%1' to use this object"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: ne 5.9.2004 15:53:06.000 - Creation time: st 23.5.2018 00:10:49.798 - Created with UnCodeX