little problem <CONTINUE>

Learn how to start making games.

little problem <CONTINUE>

Postby filos » Tue Aug 30, 2016 2:04 pm

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
Last edited by filos on Thu Sep 01, 2016 7:56 pm, edited 2 times in total.
filos
 
Posts: 3
Joined: Mon Aug 29, 2016 12:32 am
Score: 0 Give a positive score

Re: little problem

Postby ITomi » Wed Aug 31, 2016 1:04 pm

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.
User avatar
ITomi
 
Posts: 48
Joined: Sun Aug 21, 2016 1:56 pm
Location: Hungary
Score: 5 Give a positive score

Re: little problem

Postby filos » Thu Sep 01, 2016 2:17 pm

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:
filos
 
Posts: 3
Joined: Mon Aug 29, 2016 12:32 am
Score: 0 Give a positive score

Re: little problem <CONTINUE>

Postby filos » Thu Sep 01, 2016 8:05 pm

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
filos
 
Posts: 3
Joined: Mon Aug 29, 2016 12:32 am
Score: 0 Give a positive score

Re: little problem <CONTINUE>

Postby Hares » Fri Sep 02, 2016 7:01 pm

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);
User avatar
Hares
 
Posts: 105
Joined: Fri Dec 20, 2013 8:39 pm
Location: Belgium
Score: 14 Give a positive score

Re: little problem

Postby ITomi » Sat Sep 03, 2016 12:46 pm

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...
User avatar
ITomi
 
Posts: 48
Joined: Sun Aug 21, 2016 1:56 pm
Location: Hungary
Score: 5 Give a positive score

Re: little problem

Postby MrJolteon » Sat Sep 03, 2016 7:56 pm

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
Join us on Discord!
Game Editor 2
These are the best ways to reach me these days


Your local Community Janitor, always lurking in the shadows...
User avatar
MrJolteon
 
Posts: 2326
Joined: Sat Aug 09, 2008 3:25 pm
Location: Stranded under endless sky
Score: 105 Give a positive score

Re: little problem

Postby ITomi » Sun Sep 04, 2016 8:45 am

MrJolteon wrote:development hasn't stopped, it's just very slow


Oh, thanks; it's good news for me. :D
User avatar
ITomi
 
Posts: 48
Joined: Sun Aug 21, 2016 1:56 pm
Location: Hungary
Score: 5 Give a positive score


Return to Getting Started

Who is online

Users browsing this forum: No registered users and 1 guest