The square outline in the scene editor

I am wondering if inside that square outline is where my platformer level should start. I have the top blue positioning dot all the way over to the left hand side of the screen, and have started my level there. It is going to be like Mario Bro’s 2 in that there will be stuff going on all over the place. The problem is even though I have the tutorial code which should make a very nice checkpoint for my flag sprite. Regardless of where my platformer is when he dies, he is always regenerated back to a point that is within the square outline I see in the scene editor. I would like him to at least go back to position -5320 and 5174 which is where he was placed originally (probably in error because of the negative number). All of my flag code is in there to set the platformer’s x and y position to the flag’s x and y position, but until I can get him to at least return to where I put him originally, without a flag for a checkpoint, I will not add the flag to the level

Any help will be greatly appreciated.

There must be an error in the code, no matter what you should be able to put your character wherever you want, maybe an events screenshot? :slight_smile:

I would love to but I do not know how to insert the jpg here.

There is an “Upload attachment” button under the writing area (second tab at the right of “Options”), if the file is an image it will be automatically shown :wink:

Ok so here is the screen shot of my events. I put everythin g in according to the tutorial on making a platform game. I went through it step by step. I’m jjust lucky I had a platform under the spot he regenerates to whenever he gets killed otherwise he would fall forever. :slight_smile:

The problem is the last event, you are using the expression “variable(flagX)” instead “Variable(flagX)” with capital “V”, the same for the Y, that’s all :slight_smile:
Invalid expressions are replaced by zero, moving the player to the point (0, 0).

Ok, fixed the variable error you pointed out, but still when he falls off into the abyss so to speak, he does not regenerate where he starts the level. He starts back inside the framed square area I mentioned earlier. Am going through it now to see if possibly when I had my player there before, it still has an instance of player but I doubt it.

Ok when I asctually touch the flagpole, and then he dies, it puts me where I wanted it to, but it did not set it right to start up back at the checkpoint. Never the less, it is closer to working right.

Thanks for all of your help.

I can’t see the “Falls off into the abyss” code, you set the “flagX” and “flagY” variables = the player position at the beginning, so you have a default value, so without more code, I have no idea :confused:

Btw, not related but does the score thing works?, because you are using the variable “Score” as a number (+ 100 to variable Score) but then convert it into a string ("Score: "+ToString(Variable(Score)) to the text of Score), in another frame you’ll try to add 100 to this string and so… To avoid strange behaviors you should save the “Score:”+ToString() in another variable as ScoreString.

I will look over the score code. As far as falling off into the abyss, what I meant was if I dropped him off of a platform he used to regenerate in a wrong spot. I have worked most of the bugs out of it, and yes the score works. I did just as the tutorial on the Gdevelop site instructed me to do. However I know when I tell it to dwelete an object it works on an instance by instance basis, but what I did was I added an Exclamation square block that he can hit from underneath like when mario hits the questionmark blocks. Ok so if I hit it, it first was set to destroy the object and replace it with a sign in it’s place, and then if I did the same thing to the sign, it would disappear and turn back into the white exclamation point . That worked. However I decided to have both on the screen at the same time and just hide or show the block that is supposed to be there. The problem is with the hide command it works ok too, but then if I want another sign somewhere else in my level, and I try to us another white exclamation mark block it doesn’t work because the colision doesn’t understand instance, it only sees the player in collision with the white exclamation block. I guess I’ll have to have other exclamation mark blocks of various colors in the sane scene so I can have more than one sign per level if I choose.

Anyway thanks for all of your help.

But this code is not in the screenshot, what does it do?, something like:

Conditions: Player Y position is > 6000 // 6000 is the bottom limit (the abyss) Actions: Do = Variable(flagX) ; = Variable(flagY) to the position of Player
?

About the other problem, to work with multiples linked instances maybe you want to take a look here: [url]Really need to learn how to do this...] (from the :exclamation: :exclamation: :exclamation: part)

I’m not clear what’s supposed to happen with the slime. Presumably the slime should die if you jump on it, but the player dies (gets sent back to start) if they just touch the slime.

You have three separate events that check for a collision with slime when it seems like it would be simpler to have one event with two sub-events, one to check if the player is jumping (should that be falling?) and one to check if not.

Player is in collision with slime | No conditions |_Player is jumping | Delete slime |_ Player is on floor | Set player position to flagX, flagY

flagX and flagY should already be set to the Player object’s starting position by the “At the beginning of the scene” event, so no need to use the -5320 and 5174 at all.