Ignoring States

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

RestInPieces

New Member
Sep 20, 2001
65
0
0
www.Creep-World.net
hi everybody, ive got a litte prob.
I want to code a weapon which freezes all enemies in a certain radius. These enemies will then go to a state called "frozen".
I want them to stay in this state, so i wanted to ignore all other states like this:

state Frozen
{
ignores Attacking,...// all the states i want ignored
}

But then the compiler said: Attacking is not a function.
Can't i ignores states? Is there any possibiliy to ignore states? Did i make a syntax mistatke?
 

usaar33

Un1337
Mar 25, 2000
808
0
0
Unknown
www.UsAaR33.com
Ignore states?
What do you mean by that?

If you want to freeze them, just change their physics, set their accel to (0,0,0), disable tick, and freeze their animation.
 

Bytekeeper

Last of the Brunnen G
Jul 15, 2001
181
0
0
Germany
Visit site
You can't "ignore" states,
Just ignore or overwrite the functions which would leave your state...
Those are mainly events like Timer(), Tick(), Touch() etc.
 

RestInPieces

New Member
Sep 20, 2001
65
0
0
www.Creep-World.net
Well, actually, thats what i did, but i thought ignoring the states, meaning the ignored states cannont be called on the pawn who ist in the state frozen, would be a "cleaner" solution...
Well, at least no i know that it doesn't work, thanX
 

ca

CHiMERiC Grandmaster
Oct 11, 1999
84
0
0
www.unrealscript.com
Ignore doesn't work with states, and it only works with certain (ai-related) functions. If you want a function to not be called just override it:

state Iced
{
function DoSomething()
{
}

function DoSomethingElse();
}

... etc
 

Bytekeeper

Last of the Brunnen G
Jul 15, 2001
181
0
0
Germany
Visit site
It actually work with all functions :)
But ignores are not inherited: if you overwrite the state you kill the old ignores, therefore most code which is meant to be inherited doesn't use ignore but overwrite the old functions with empty new ones ( like ie. engine.weapon does )

@Restinpeaces:
You can use a "trick" to "ignore" other states. Everytime a state is about be be left, endstate() is called, so you just put a gotostate in your state.endstate function to redirect to your state again.
 

ca

CHiMERiC Grandmaster
Oct 11, 1999
84
0
0
www.unrealscript.com
No, ignore is broken - try ignoring Fire() in a weapon state and it'll call the global version instead of not calling the function. Steve has confirmed that this is broken behaviour...
 

Bytekeeper

Last of the Brunnen G
Jul 15, 2001
181
0
0
Germany
Visit site
Yeap @ ca, I had some weird problems with my dying state for bots. At first it didn't ignore anything, then I copied the line out of bots, and even then some functions where called :( Which I then have overwritten. So I don't use ignore anymore if I can ;)
 

usaar33

Un1337
Mar 25, 2000
808
0
0
Unknown
www.UsAaR33.com
Originally posted by ca
No, ignore is broken - try ignoring Fire() in a weapon state and it'll call the global version instead of not calling the function. Steve has confirmed that this is broken behaviour...

wow, it always.... seemed... to work for me :)
 

trasko

New Member
Sep 28, 2001
7
0
0
44
the internet
blah

sorry i can't help -- i know this sounds sort of hard since bots are heavily AI driven. but, i'd imagine there is some way to interrupt all that to freeze the animation.

i'll keep my eye peeled.

trasko