CanTeleportState virtual

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

CanTeleportState virtual

Postby Major Cooke » Fri Jul 20, 2018 2:57 pm

A virtual that can be used to allow or deny entities that teleport to go to their Teleport states.

I find myself in a bit of an odd circumstance at the moment where I've got some monsters that are designed for interruption when they're leaping through the air, i.e. the baron of hell and hell knight in D4D. As I was working on this however, I noticed that if they're pushed over a line or something else causes them to teleport, it'll interrupt states that are not supposed to be interrupted.

So here's what I propose is a function that can indicate what caused the actor to teleport. That way if we don't want the teleport state to be jumped into, returning false will block the state jump.

This is only called if teleportation was successful.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: CanTeleportState virtual

Postby Matt » Fri Jul 20, 2018 7:51 pm

Is there a way (I mean theoretically as a new feature) to make certain states ininterruptible? That could provide a general solution against all these pain overrides and whatnot.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: CanTeleportState virtual

Postby Graf Zahl » Sat Jul 21, 2018 12:52 am

No, there isn't. Because states are single entries in the list. The labels are just that: labels. They do not propagate any information to any state in the following sequence.
You also have to keep in mind that this would also block going to a death state, because it all calls the same code.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: CanTeleportState virtual

Postby Apeirogon » Sun Jul 22, 2018 10:09 am

Matt right in this one. Create virtual for for each particular case can(teleport/jump/attack/scratchandsniff/etc.) is a bad idea.

Why just dont make labels less....labelless, I think?
Like "state name".uninterrupted(or continuous) and make death states like death.caninterrupt(or breaking).
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: CanTeleportState virtual

Postby Major Cooke » Sun Jul 22, 2018 10:23 pm

No, that's not okay Apeirogon.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007


Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest