LOST in the Walkable Areas... [Solved]

Started by I<3Pindorama!, Sat 13/12/2014 21:10:44

Previous topic - Next topic

I<3Pindorama!

Hi everyone!

Should be a sector in the forum called ULTRA BEGINNER to receive
my questions. Well, as there is, I can only ask right here... :P

I am having difficulty in AGS about the use of walkable areas.
Below a picture that illustrates the problem:


Ok. Now describing:

A room have 3 trails connected that form a unique single path:
W.A+W.B+W.C

In the Walkable Area A (id1) the character can see the Walkable Area C (Id3),
so far so good but if the player clicking in there with the walk.cursor the character
will go all the way (WA+W.B+WC) automatically until arrive in W.C

What i want is that while the character stay in W.A the W.C will be disabled to the walk.cursor.
The idea is to make the player to cross only by the W.B (Id2) to reach in W.C

I will be grateful to any help!

AnasAbdin

#1
Assuming the blue area is not an enabled walkable area..

Code: ags
cEgo.Walk(x, y, eBlock, eWalkableAreas);

st.

#2
If I understood correctly, what you need is to have area C available as a destination for walking only when the playing character is in area B; but not when it is in A.

There is a command that might help: GetWalkableAreaAt(). You can look it up in the help's index. However I have no experience with it.

I would solve your problem by substituting the standard mouse mode for walking and by checking the position of the playing character and the position of the mouse cursor when clicks are made in this substitute mouse mode. According to your drawing, you can differentiate between your walkable areas by means of the y coordinate of their bottom; this removes the need for refering to walkable areas directly.

If you are interested in this solution, please let us now. I, or someone else that can find the time to return to the forum before me, may describe it in detail. I have a strong feeling that a much easier solution using GetWalkableAreaAt() is possible and would be glad to hear about it.
springthoughts

I<3Pindorama!

#3
AnasAbdin and Springthoughtsand thanks for your help!
I apologize if my comments were not enough clear.
Springthoughts mentioned my intention better than i could.
Thanks for that!

The question is precisely access W.C just passing by W.B.



a) When the character just stay in W.A the  W.B is
acessible to respond the walk.cursor click command but the W.C don't.

b) Only when the character stay in the  W.B so W.C becomes able
to respond the walk.cursor click command.

cW.AW.B and W.C are together in a single room.
It's Like the blue area be an ocean and the Walkable Areas parts of a single bridge.



Note I: Making invisible the walk.cursor is out of the question, considering that it is necessary to reach  W.B
Note II: All the other cursors will be activated to interact with the object that stay in W.C

I will research the use of GetWalkableAreaAt ().
But the post remains open for the development of the solution presented or a new suggestion.

Once again my thanks to the friends who were willing to help.  :-D

MiteWiseacreLives!

You want to look in to RemoveWalkableArea and  RestoreWalkableArea. I am not sure if this occurs all in one room or two, but perhaps use a Region and in the WhileStandingOnRegion function you can the RemoveWalkableArea(W.C.) then RestoreWalkableArea(W.C.) when your character is on the W.B. Region.
(I always have trouble finding RemoveWalkableArea in the manual because I always look for WalkableArea.Enable etc. which doesn't exist :) Editor Request item???)

I<3Pindorama!

Dy-no-mite! 8-0

Willingness to embrace all mites in the world!
But I have asthma ...:~(

So I can only thank!
Your tip fit like a glove full of mites!
You are really wise!
Very, very, thanks !!! :-D :-D :-D

And thanks everybody for help me one more time!

MiteWiseacreLives!

Quote from: I<3Pindorama! on Sun 14/12/2014 03:18:02
Dy-no-mite! 8-0

Willingness to embrace all mites in the world!
But I have asthma ...:~(

So I can only thank!
Your tip fit like a glove full of mites!
You are really wise!
Very, very, thanks !!! :-D :-D :-D

And thanks everybody for help me one more time!

Wow! No-no, thank-you... That is the first and last time anyone ever said that about Me :-D

I<3Pindorama!

Code: ags

Function Don't say_that(!)
{ 
  If  (my.doubts = ∞) {
      you.stillhear (over and over again);
   }
    else {
       my.game= invsible;
   }
}

MiteWiseacreLives!


SMF spam blocked by CleanTalk