UE1 - UT Custom enumeration

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

SimonDenton

New Member
Mar 23, 2009
13
0
0
Australia
Hey all,

I am programming for a Deus Ex mod which uses UE1 and I have a problem that is very odd.

I declare an enumeration:
Code:
enum summerBarks
{
BM_Idle,
BM_CriticalDamagePlayer,
BM_CriticalDamageGeneric,
etc...
}

var summerBarks sB;

In a separate class I call a function involving this variable:
Code:
function bool SummerStartAIBarkConversation(Actor conOwner,SummerBarkManager.summerBarks sB)
Where SummerBarkManager is a variable within this different class.

I get this error:

: Error, Missing variable name
Failed due to errors. for the above line involving the function. If I simply make it
Code:
function bool SummerStartAIBarkConversation(Actor conOwner,summerBarks sB)


I get: : Error, Unrecognized type 'summerBarks'

Please tell me what I am doing wrong and notify me of a strategy to make this work. Thanks in advance.
 

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
Enums and structs are only known in subclasses of the class they are declared in. Unlike later engine generations, UE1 doesn't provide any way reasonable around that limitation.

Even UT2004 has identical ESurfaceTypes declarations in the Actor and Material classes. However, I think that's mainly for reasons concerning the native code. Due to the new DependsOn() class modifier, UE2 classes can actually share structs and enums.
 

SimonDenton

New Member
Mar 23, 2009
13
0
0
Australia
Thanks for the reply :D Yeah Actor.uc consists of the enum that was used for the original functions...would that mean I'd have to code for a custom Actor class thus recoding EVERYTHING?