Page 1 of 1

little problem <CONTINUE>

PostPosted: Tue Aug 30, 2016 2:04 pm
by filos
hello guys and ladies , 4 day ago have decided to try to make a game with game editor :D
have follow various tutorials in the forum , have just completed a couple for now.

and have try to make a little test .

have a little question for fix perimetral wall

the player passes through the wall in some places, you know how to make solid wall?

for moment have make a code in player actor

I attach the file

thanks in advance
and sorry for my eng :mrgreen:

first_program.zip
(7.88 KiB) Downloaded 125 times


first_program.rar
(7.33 KiB) Downloaded 125 times

Re: little problem

PostPosted: Wed Aug 31, 2016 1:04 pm
by ITomi
Hello Filos!

I saw your code and change the following lines in the "player -> Collision (any side of muro)" code window:
Code: Select all
x = xprevious;
y = yprevious;

In this case the player can't go through the wall.
I think, this is the simpliest solution, but there are more ways, e.g. check the collided actors before move the player and put further the player if there is not collision with certain actors.

Re: little problem

PostPosted: Thu Sep 01, 2016 2:17 pm
by filos
Thanks! for your reply , Itomi :mrgreen:

very useful code :D

sincerely I thought that this engine was abandoned , but I changed my mind

and sorry again for my eng :oops:

Re: little problem <CONTINUE>

PostPosted: Thu Sep 01, 2016 8:05 pm
by filos
UPGRADE
afer fix wall problem have add player anim, and I found another problem whith animation
the animation it does not work properly
attac file upgraded
i try to fix it
every suggestion and welcome.
La_stanza_O_0.zip
(17.99 KiB) Downloaded 122 times

Re: little problem <CONTINUE>

PostPosted: Fri Sep 02, 2016 7:01 pm
by Hares
The animations don't work properly because you are always restarting the animation while a key is being pressed.

Your code for the press down a key is:
Code: Select all
x = x -5;
ChangeAnimation("player", "charLeft", BACKWARD);


This causes the animation "charLeft" to restart all the time when the a key is pressed down.
You should use animindex (a read-only value) to check if the right animation is already playing.
The first animation in the list of animations for the actor has index 0. In your case this is the charLeft.

Change your code to this for the a key down:
Code: Select all
x = x -5;
if(animindex != 0)
ChangeAnimation("player", "charLeft", BACKWARD);

Re: little problem

PostPosted: Sat Sep 03, 2016 12:46 pm
by ITomi
filos wrote:Thanks! for your reply , Itomi


Not at all, Filos!

filos wrote:I thought that this engine was abandoned


Yes, maybe the developing of Game-Editor stopped, but there is a great tool. And you can continue its developing, if download the source code.
However maybe some functions are unfinished(?) yet - or only I don't understand its logic correctly. For example, I would like check the actors in a certain position before moving away the player actor:
Code: Select all
strcpy(collobj,getactor(x,y+height+4)->name);

but I can't evaluate the result, because I don't know how can be? If I check as a string, the player always go through the walls. If somebody could explain me functioning of getactor(), I would happy...

Re: little problem

PostPosted: Sat Sep 03, 2016 7:56 pm
by MrJolteon
ITomi wrote:
filos wrote:I thought that this engine was abandoned


Yes, maybe the developing of Game-Editor stopped,

development hasn't stopped, it's just very slow

Re: little problem

PostPosted: Sun Sep 04, 2016 8:45 am
by ITomi
MrJolteon wrote:development hasn't stopped, it's just very slow


Oh, thanks; it's good news for me. :D