what variable type is the first parameter for loopanim

  • 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.

gbluntzer

New Member
Sep 6, 2004
8
0
0
Hello,

I am trying to do something that should be really simple.

I want to define a user definable variable of a String (if string is the correct data type) , define it in the default properties and then use it in the loopanim(WaitingAnim); I want to be able to change the value in the unreal editor.

var() String WaitingAnim;
...
LoopAnim( WaitingAnim);
...
defaultProperties{
WaitingAnim='idle'
}

where idle is the name of the animation seq

I get this error
: Error, Call to 'LoopAnim': type mismatch in parameter 1

Thanks for any help
 

meowcat

take a chance
Jun 7, 2001
803
3
18
gbluntzer said:
Hello,
var() String WaitingAnim;
...
LoopAnim( WaitingAnim);
...
defaultProperties{
WaitingAnim='idle'
}
the variable should actually be type 'name' not 'string'. take a look in the base pawn code for the best examples. and then in the default porperties it would be: WaitingAnim=idle // without the single quotes
 

Angel_Mapper

Goooooooats
Jun 17, 2001
3,532
3
38
Cape Suzette
www.angelmapper.com
It should be var() name WaitingAnim;

In the default properties names are surrounded with " not '

For example, the xPawn class:

CrouchAnims(0)="CrouchF"
CrouchAnims(1)="CrouchB"
CrouchAnims(2)="CrouchL"
CrouchAnims(3)="CrouchR"
WalkAnims(0)="WalkF"
WalkAnims(1)="WalkB"
WalkAnims(2)="WalkL"
WalkAnims(3)="WalkR"
AirAnims(0)="JumpF_Mid"
AirAnims(1)="JumpB_Mid"
AirAnims(2)="JumpL_Mid"
 
Last edited: