Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: on Mon 26/07/2004 21:39:18

Title: Walk on walls
Post by: on Mon 26/07/2004 21:39:18
Hello everybody.

I would like to give the player the ability to walk on walls. In order to do that I made 90°-rotatedÃ,  copies of the normal player views. Because the player coordinates are measured from the bottom middle of the sprite there where heavy problems making a proper walkable area on the wall.Ã, 

Offseting it a bit doesn't really solve the problem, since it makes the walkable area on the wall overlap with the one on the ground.

So i'd like to know if there's a way to let AGS measure the coordinates of the player from the right middle of the sprite.
Or if it's possible to offset the sprite, while the coordinate-measure-point remains unchanged. ???

In addition I need to know if there is a way to make the continous-scaling-area work from left to right rather from the top to the bottom.Ã, Ã,  :-[


Title: Re: Walk on walls
Post by: Darth Mandarb on Tue 27/07/2004 05:41:18
About Character Control Points
I, and others before me, asked about this and I believe it might be on CJ's Todo List.Ã,  I also requested the same thing for objects I think ... can't remember, it was quite awhile ago.

Left to Right Scaling
There's no way to script it I don't think ... but you could always use multiple walkable areas each with different Zoom levels.
Title: Re: Walk on walls
Post by: on Tue 27/07/2004 08:54:17
Thanks for the quick reply, Darth Mandarb!  :)

I found the thread where similar things have been discussed.
If anyone is interested: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=10790.0

I will try Sorpiorus' advice to use the SetCharacterViewEx()/SetCharacterViewOffset() script functions as a workaround.

But still the 'control point'-menu you suggested would be much more comfortable...

If the workaround doesn't work around, I'll have to consider making a new room which is rotated by 90 degrees, so that the walls are on the bottom and the ground is on the left of the screen.
Title: Re: Walk on walls
Post by: TheGoldeagle on Wed 28/07/2004 19:50:25
The Scolling left to right is possible. In fact I have it in my game.

Code: Here (http://a-v-o.privat.t-online.de/ags/)
Title: Re: Walk on walls
Post by: Gilbert on Thu 29/07/2004 02:24:05
It's scaling not scrolling.
Title: Re: Walk on walls
Post by: TheGoldeagle on Thu 29/07/2004 02:52:25
Stupid me. Sorry ignore it.
Title: Re: Walk on walls
Post by: Proskrito on Thu 29/07/2004 10:06:39
Have anyone tried to use SetAreaScaling, changing the scaling depending on the x position of the character? it could only work well with one character in the walkable area, but maybe its worth a try
Title: Re: Walk on walls
Post by: Darth Mandarb on Thu 29/07/2004 18:17:50
Quote from: Proskrito on Thu 29/07/2004 10:06:39
Have anyone tried to use SetAreaScaling, changing the scaling depending on the x position of the character? it could only work well with one character in the walkable area, but maybe its worth a try
I looked through the help file but was searching for SetScaling and SetCharacterScaling ... didn't search for SetAreaScaling!

That is exactly what I was thinking about when I first read this ... the greater the X the greater the scaling (or the opposite).  Thanks!
Title: Re: Walk on walls
Post by: on Thu 29/07/2004 21:34:48
I have achieved my goal, thank you!

Now the player can walk on walls!
As you Darth and Proskrito suggested I use SetCharacterViewOffset and SetAreaScaling.

Thanku veryverymuch!Ã,  :) ;) :D :-* :D ;) :D :) ;D ;) :D :D ;) :) :D :) :) :D
Title: Re: Walk on walls
Post by: Pie-rat on Thu 29/07/2004 22:29:02
i'm not really good at scripting so if i was to do that effect for like,,,, walking on the wall for a room where you could not pass(like a broken floor/no floor) couldn't you just re do the room like the original floor was the wall and the original wall was the floor? and run like????
reset room or something simular
or even using global ints to determin if you have or know a specific thing then you can activate the walk on wall 'trick' and if timer expired  switch it back?
Title: Re: Walk on walls
Post by: on Fri 30/07/2004 08:11:54
of course, the simpler way is to create a similar room with the background bitmap rotated by 90°.

But I want to implement both methods in my game.

The method you described will probably confuse the player a bit. In order to prevent this, when the room changes I have a video sequence showing how the room (or the camera) rotates.
Title: Re: Walk on walls
Post by: Pie-rat on Fri 30/07/2004 16:21:09
that would look a lot better having it all rotate. ok i c your point.