Page 1 of 1

Trying to create a mini level.

PostPosted: Thu Nov 15, 2007 12:53 am
by egrimaldi
Hello all,

I am writing a "pokemon" style RPG and am placing dwellings and buildings in my game. The game consists of streets with cobble stone borders that detect the collisions with the main player to keep him on the path, as well as opening into small grassy and wooded areas where one might encounter a dwelling. My goal is to allow the character to "enter" the dwelling.

What I have done so far (unsuccessfully) is place an event at the door that causes the "view" to move to (using MoveTo at a velocity of 10000) a part of the world where I have designed the interior of a building. I wanted to take the main player there in the same fashion, but he bumps into any one of a million things on the way and never gets there.

So second, I attempt to DestroyActor on the Main Player and CreateActor again in the correct coordinate in the interior of the building. The problem however, when I create the new Main_Player, is that the cobblestone border collision events that fire perfectly with the original Main_Player, no longer recognize the spawned Main_Player.

I believe I can create my game using a single GED in this fashion if I can overcome this odd behavior.

Any help would be appreciated.

Re: Trying to create a mini level.

PostPosted: Thu Nov 15, 2007 12:49 pm
by makslane
Can you post the game?

Re: Trying to create a mini level.

PostPosted: Fri Nov 16, 2007 5:50 pm
by tufif
Instead of using move, have you tried making a script to change the x and y of the player? That way the actor doesn't have to pass through all of the stuff in between positions.

Re: Trying to create a mini level.

PostPosted: Mon Nov 19, 2007 3:55 am
by egrimaldi
Thanks! Changing the Main_Player.x and Main_Player.y using scripting worked perfectly. I discovered another bug in my program however that I can not seem to figure out. The cobble stone borders on my path prevents the main player from wandering into no-man's land. This is done by simply manipulating and correcting the x and y of the main character with top, bottom, left and right collission. My character walks using the arrow keys. I notices that the character can walk "diagonally" when holding down an up or down AND A left or right. (Does that make sense???) That is quite fine with me...I don't mind that behavior at all. However, when my character approaches a "corner" where the path may turn, for instance the path is turning left resulting in an upper right corner.... If I arrow up and right and walk diagonally toward the corner... the character passes freely though the cobblestone wall into the wilderness and can not return unless he finds another corner to renter through in the same fashion.

I am trying to upload the game for review but it will not accept the extensions...