SOC "Check if touching wall"

Status
Not open for further replies.

A-star

now Known as Player 1.1
I'm trying to have an object that will only stay in existence if it's touching a wall. How would I go about doing that?
 
Unfortunately only the opposite is really possible. An object with MF_MISSILE will die (Not vanish, but go to its deathstate) on contact with a wall, which is how Senku's walljump works, but you can't have an object die when it stops touching the wall. (Though you could probably have the object in question spawn a replica of itself each tic, and vanish the next. That would produce a similar effect, but the object wouldn't be able to be animated, or really do much of anything.)
 
Would Spawning a new copy and destroy itself in it's Death State in the same Tic work? And the next frame would destroy it?
 
Draykon said:
Unfortunately only the opposite is really possible. An object with MF_MISSILE will die (Not vanish, but go to its deathstate) on contact with a wall, which is how Senku's walljump works, but you can't have an object die when it stops touching the wall. (Though you could probably have the object in question spawn a replica of itself each tic, and vanish the next. That would produce a similar effect, but the object wouldn't be able to be animated, or really do much of anything.)
Couldn't you have the death state start the object's thinker, and the normal states lead to state 314? In fact, you could have a different thing for each state, and have each thing spawn the next upon reaching deathstate. That way it could check whether it was on the wall or not every single state.

EDIT: Also, you could use A_BubbleCheck (IIRC) and line the walls with water, though that may not be the best way, even though it's the easiest.
 
Kaysakado said:
Draykon said:
Unfortunately only the opposite is really possible. An object with MF_MISSILE will die (Not vanish, but go to its deathstate) on contact with a wall, which is how Senku's walljump works, but you can't have an object die when it stops touching the wall. (Though you could probably have the object in question spawn a replica of itself each tic, and vanish the next. That would produce a similar effect, but the object wouldn't be able to be animated, or really do much of anything.)
Couldn't you have the death state start the object's thinker, and the normal states lead to state 314? In fact, you could have a different thing for each state, and have each thing spawn the next upon reaching deathstate. That way it could check whether it was on the wall or not every single state.


Wait, isn't that what I just said but worded differently?
 
Draykon said:
Kaysakado said:
Draykon said:
Unfortunately only the opposite is really possible. An object with MF_MISSILE will die (Not vanish, but go to its deathstate) on contact with a wall, which is how Senku's walljump works, but you can't have an object die when it stops touching the wall. (Though you could probably have the object in question spawn a replica of itself each tic, and vanish the next. That would produce a similar effect, but the object wouldn't be able to be animated, or really do much of anything.)
Couldn't you have the death state start the object's thinker, and the normal states lead to state 314? In fact, you could have a different thing for each state, and have each thing spawn the next upon reaching deathstate. That way it could check whether it was on the wall or not every single state.


Wait, isn't that what I just said but worded differently?
then im bad at reading posts argle fargle

In any case, the thing about water wasn't said before.
 
Besides that, A_BubbleCheck only makes things invisible, not disappear. You might be able to work that out with MF_FIRE, but you'd be better off just using MF_MISSILE.
 
wait, no I didn't.

Anyway, can A_LOOK be used by the player or the Seestate used specially in hardcoding?
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top