Posted By: Nicholas
hole in the wall? - 08/23/10 21:37
I'm sure everyone is familiar with the cartoon holes in the wall. Pick up a black circle, throw it onto a wall and now you can walk through the wall.
I'm looking for a code that'll let me do that.
I know I can just create an entity at the throw point that will just move me to the new location, but I want to smoothly walk through it. So I can be halfway through the wall as opposed to being in one spot and then just appearing in another.
I also need to make sure that the hole will show up only on parts where there is enough space on that texture surface. I.e. not on the corners where it'll overlap the edge. I would assume a c_trace would work for this, just not sure how to do it.
thanks
Posted By: Ottawa
Re: hole in the wall? - 08/24/10 00:12
Hi!
Interesting project creating a hole in the wall.
I would do the hole in the wall and then fill it with a bloc (same texture)
Then I would make a sprite and have the entity move it.
When the sprite touches the wall it would make the block become invisible and
passable.
The entity would only have to walk through
Is this what your looking for?
Posted By: Nicholas
Re: hole in the wall? - 08/24/10 04:44
not quite, I was wanting to make it dynamic where they could throw it on any wall with a certain texture.
Posted By: Widi
Re: hole in the wall? - 08/24/10 06:49
That is not possible with blocks.
Posted By: EvilSOB
Re: hole in the wall? - 08/24/10 10:00
As a crude idea for the hole itself, get the hole attached to the wall as a decal.
These are just ideas, open to everyone for comments. Ive never tried any of them...
Then while the player is 'touching' it, or 'penetrating' it, try one of the following...
1> move the player with the IGNORE_WORLD switch in its c_move.
2> move the player with the wall set to YOU, and the IGNORE_YOU in players c_move.
3> move the player with simple XYZ adjustments rather than c_move.
4> make that wall PASSABLE. If its a level-block, try setting 'level_ent' to passable,
or do the players c_move with IGNORE_WORLD.
5> make the wall and the player have the same "group" property so they ignore collisions
with each other (check the manual under c_move, 'IGNORE_PUSH' section).
Posted By: Nicholas
Re: hole in the wall? - 08/24/10 17:09
that's not a bad idea and probably what I might end up trying, but I don't see how that would work if I only want the player to go through the hole. from what I can tell that would make the entire wall passable, not just the area with the hole in it.
Posted By: EvilSOB
Re: hole in the wall? - 08/24/10 18:35
Yes it would make the entire wall passable, but if it is only set
passable DURING the players action, then no other entities can make use of it.
The tricky part of all this is to have the player action be able to recognise
when it is inside the hole, and therefore ignore the wall...
No ideas on that part yet...
Posted By: Nicholas
Re: hole in the wall? - 08/24/10 19:28
That's not a bad idea. I'm trying to get something working like portal so a hole in the wall linked to one in the floor might be kinda weird.
solution to recognizing if it's in the hole is to have an invisible entity attached to the hole that uses collision detection only with the player to know if it's within the right area to run the code. as for making the wall and floor work properly, I could make it so that only the one wall I am currently in will be passable until I go 50%+ through the hole and then the other one will be passable.as for the visuals I was going to add a 3d view entity on the wall and hope that would work for both sides.
If they have the same texture though, I don't know how to do that, since I was thinking of using a trace funtion to see if there was still enough space around the hole based on the texture and which ones would be shootable.
Posted By: EvilSOB
Re: hole in the wall? - 08/24/10 20:06
Sounds possible, even though Ive never tried anything like it.
Logic sounds good to me...