hi i wrote some code for a slot machine where its a simple kismet trigger then it fires off a seqcond (sequence condition)has xp but the has xp isnt working can someone tell me what im doing wrong?the weirdest part of all is tha compare integers wasnt even working but the add xp code works.
here is the video clip explaining it
class SeqCond_HasXP extends SequenceCondition;
//royces added code below
const MAX_XP = 50;
const XP_INCREMENT = 1; // Amount of XP that is added to the amount of XP required for a level, after each level progression
var int Level; // Current level
var int XPGatheredForNextXP; // Amount of XP gathered for the next level
var int XPRequiredForNextXP; // Amount of XP required for the next level
var() int Amount; // Amount of XP this action will give
var int CalculateLevelProgress;
var Actor TargetActor;
var int UnitActor;
var int XP;
event Activated()
{
/*
local XP XP;
XP = HasXP(TargetActor);
defaultproperties
{
Name=“Has XP Points”
ObjCategory=“CryoSoldier Custom codes”
ObjName=“Has XP Points”
Level = 1; //royces custom xp code
XP = 0; //royces custom xp code
class SeqCond_HasXP extends SequenceCondition;
//royces added code below
const MAX_XP = 50;
const XP_INCREMENT = 1; // Amount of XP that is added to the amount of XP required for a level, after each level progression
var int Level; // Current level
var int XPGatheredForNextXP; // Amount of XP gathered for the next level
var int XPRequiredForNextXP; // Amount of XP required for the next level
var() int Amount; // Amount of XP this action will give
var int CalculateLevelProgress;
var Actor TargetActor;
var int UnitActor;
var int XP;
event Activated()
{
local XP XP;
XP = HasXP(TargetActor);
if (XP != none)
{
if (XP.m_arrInteractPoints.Length == 0)
{
OutputLinks[0].bHasImpulse = true;
}
else
{
OutputLinks[1].bHasImpulse = true;
}
}
}
simulated function XP SlotMachineGambleXP()
{
local pawn pawn;
defaultproperties
{
Name=“Has XP Points”
ObjCategory=“CryoSoldier Custom codes”
ObjName=“Has XP Points”
Level = 1; //royces custom xp code
XP = 0; //royces custom xp code
var int XP; global in class
If you define it globally in the class. You can not use that define in a local function in that class.
you can’t define 2 types of XP in same file, not Globally and locally(only locally). Your saying the global type is an int but the local your saying it is a XP Class. That will not work.
local XP XP; use just in this function local (AS LONG AS NOT DEFINED GLOBALLY)
XP = HasXP(TargetActor);
wheres this function at? HasXP(TargetActor); what does it return?