Tilemap (Creator-Defined Displayable)

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Message
Author
User avatar
bonnie_641
Regular
Posts: 89
Joined: Sat Jan 13, 2018 10:57 pm
Projects: Código C.O.C.I.N.A.
Deviantart: rubymoonlily
Contact:

Re: Tilemap (Creator-Defined Displayable)

#31 Post by bonnie_641 » Tue Jul 30, 2019 6:21 pm

M-77 wrote:
Tue Jul 23, 2019 4:06 pm
Hello bonnie_641, can you tell us some more how to implement your above code?
Just copy+paste it to the "Softwar" rpg code? And to where to exactly?
Sorry for not answering in time (I didn't have internet access during those days).
What I wrote was a hypothesis that can be implemented in my code (the zankizuna code I couldn't put in my game, so I'll look for another alternative).
When I get it ready, I'll bring it up.
zankizuna wrote:
Thu Jul 25, 2019 2:38 am
Assuming our player is at the true center position:
Depending on what key is clicked, there will be a resulting reaction from the sidekick, in position and direction.
(..)
Good luck uguu
Will try to code this too if i get time on PC.
Hihi
I give you good luck with that task (if you do it is because you are a genius, because as you say is a very complicated method -as far as code is concerned-).

What I'll do is link two images by event per coordinate to give the illusion that there are two characters, but in practice will be only one. If it works, I'll share it :D

User avatar
luat1995
Newbie
Posts: 19
Joined: Mon Nov 07, 2016 8:27 am
Completed: Home Alone
Github: https://github.com/luatsenpai
itch: https://luatsenpai.i
Location: vietnamese
Contact:

Re: Tilemap (Creator-Defined Displayable)

#32 Post by luat1995 » Wed Jan 27, 2021 10:27 pm

zankizuna wrote:
Thu Jul 25, 2019 2:38 am
The sidekick following around can be pretty hard.
Let me try to explain.
Assuming our player is at the true center position:
Depending on what key is clicked, there will be a resulting reaction from the sidekick, in position and direction.
Sidekick should always be behind the player, so when you move north, he/she also moves north
They will execute the previous movement you made.


We should be recording which direction was clicked before. That's what the sidekick should use as a reference to what direction he/she should face to.

Include sidekick in the same screen where the player image is. Sidekick has multiple directional sprites, a dynamic displayable with Player's previous direction to change direction

give the sidekick an "at" statement that references a transform you define that has variables whose values change upon movement .

When you press up, the sidekick will be on south of the player, left, then they go east. And so on.

We are only making an illusion of movement as only the tileset background is actually moving.

Good luck uguu
Will try to code this too if i get time on PC.
Hihi
Hi, I tried your code and succeeded
But i have some problem
How to switch control with key to mouse?
I want to make some mobile games
Sorry I'm not good at English and code too
Thank :D

User avatar
zankizuna
Veteran
Posts: 416
Joined: Fri May 04, 2012 2:20 am
Projects: Softwar
Deviantart: raseru09
itch: ZanKizuna
Location: Manilaaaaaaaa
Contact:

Re: Tilemap (Creator-Defined Displayable)

#33 Post by zankizuna » Fri Jan 29, 2021 10:55 pm


Hi, I tried your code and succeeded
But i have some problem
How to switch control with key to mouse?
I want to make some mobile games
Sorry I'm not good at English and code too
Thank :D
Hello!
if you need directional buttons just replace

Code: Select all

key
inside the controls screen with your new corresponding up, down, left, and right

Code: Select all

imagebutton
i don't have a code to make the character walk to the place your mouse clicks to.

Post Reply

Who is online

Users browsing this forum: No registered users