Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Biiiscoito

Pages: 1 2
Ask a Question / Re: How can I make a simple text input?
« on: June 07, 2019, 01:03:01 am »
Sorry for the super late response.
For the font, make sure it is .ttf if you set it up like that on the game, or .otf if you set it like it.
The names need to be exactly equal. Even capital letters.
I see your font has a '-' between two words. Have you tried renaming it to another name? Stencyl trips on custom characters like mad. Unfortunately, that's as far as my knowledge goes, I'm afraid. I've used Stencyl for a very short time in comparisson to other experienced members "^-^

Ask a Question / Re: Actor crawling on walls and platforms
« on: May 28, 2019, 11:32:03 pm »
Took me a while to get it to work with 0 friction for me too, but trust me, it works.
When you set the friction to 0, the actor slides, right? As if they're on ice?

My character uses right, left and down to move around.
Here's the code that stops them from sliding, on the attachment.

Also, if your character can jump, you should think of the possibility of not allowing them to exploit the jump. As in, instead of jumping, they either float or can double jump, triple jump, etc.
This super quick tutorial may help on that>>

Working with behaviors would be best if you are planning on using the same logic on a lot of levels.
I learned this the painful way. Takes a while to get the gist of it, but it's soooo handy.
The print from the last post -- the code you pointed by the arrow could be on an "always" or "when updating" event.
Also, instead of enabling a game over behavior, you could create a custom event called "gave over", and, "if yBlasts<1 then trigger event game over on this scene".

Ask a Question / Re: How can I make a simple text input?
« on: May 28, 2019, 11:02:40 pm »
Such a pity that you couldn't get the Text Input Extension to work for you  :(. It's the extension I had the least amount
of trouble with. Are you sure it is enabled?
I'm attaching the piece of code I used it into, in case it helps you give it a second chance.
The When Drawing events just work to draw some rectangles where the text field will be so it actually looks like a place
where the player can type.
As for "not allowing the player to move or press other commands if he's typing"-problem, I suggest using a boolean.
Like, if you use the Text Input Extension, you can check if that text-box exists or is not null, and then turn on another boolean that renders the other commands invalid.
I usually have a GA Disable Movement that handles these situations. The codes where my key-is-pressed are always start with "if not Disable Movement", and it saves me from more trouble.

//Added a printscreen of the result from this code.
"Qual é o seu nome?" translates to "What is your name?" and "Meu nome" translates to "My name" :>

Ask a Question / Identical codes, but only works for some actors
« on: May 26, 2019, 06:09:05 pm »
Tough coming up with a tittle because it's weird to explain with just a few words, but...
Attachment bellow.

I'm creating an educational game, and I want to display information on an enemy every time a new type is killed.
Both Helicobacter and Bordetella belong to the Enemies group. Both have the Enemy AI behavior enabled and working.
As you can see, the code is the same. It works for Helicobacter every single time. But does not work for Bordetella not even once.

I'm confused. What am I missing here?
If there was no dialog chunk named "Bordetella" I'm pretty sure I would have a null pointer error. But I am also sure that I have a dialog chunk called Bordetella.
Not screenshoted it, but I noticed that there was a small chance that, if a warning was playing (boolean GA, "Warning"), the dialogue wouldn't play, but the enemy would be added to the codex, thus making it impossible to show it's information again.
The change was sooooo infimal, though. The Warning attribute was one true when an specific type of dialogue style was playing, and all interactions are cut off if Warning is true. In short: if Warning, player can't attack, so enemy can't die, so this chunk of code wouldn't play.
I changed it so that the "add xx to list Enemy Codex" part of the code is exactly under the dialogue caller, inside the "do after 1.25 secs". That solved the previously mentioned problem.

Another problem has showed up, though.

With my fix, all dialogue called through that part is... Accelarated. I don't know what word to use. The typing velocity of the dialogue is 10x times faster. I know it's not a config thing because even the pointer is blinking faster on the dialogue window, and this pointer is working normally everywhere but here.
I think there was another scene with 'bursts' of augmented game speed. Everything was faster than normal. The enemies where moving faster, dialogue was faster...
My guess is that it might be related to framerate. But not sure.

Super creepy.  :o :o

Ask a Question / Re: Backgrounds taking up massive space?
« on: March 08, 2019, 11:44:09 pm »
You can to go Game Settings -> Atlases -> (select tabs) to see which resources and scenes are using the most memory. RAM usage and file size correlate pretty well, albeit not perfect, but well enough that it could help you pinpoint which images or sounds are most demanding. If you're generating a desktop build then you can look in the generated assets folder and see the individual files.

Thanks, Merrak.

At the moment I don't have a clue of what atlases are and how they work, so I believe my next task should be finding tutorials for that ASAP!
However, just after I posted this (seems like this happens every time, as soon as I post a topic I stumble upon the most simple solution).
What happened, was that I went to Run > Clean Up Project. The export after that dropped to 26Mb. Which is just fantastic! So it might as well have been a cache error.

What I can't phatom is the fact that Avast keeps interruping my game as it compiles (over accusations of viruses!), so I need disable it in order to work.

That apart everything seems fine for now. I'm having loads of fun with Stencyl and I don't think I ever learned this much in my life, even with all those 4 years in college.
Thanks again!!

Ask a Question / Backgrounds taking up massive space?
« on: March 08, 2019, 11:21:11 pm »
My game's screen is 640x480px, but all of my scenes are 1920x1440px (60 by 45 tiles).
I have decided to make parallax backgrounds on every scene as working with tiles simply wasn't working.
Which means I'm drawing images at 1920x1440px. They're all .jpg (despite the loss of quality), and have around 1.5 Mb each.

Despite that I've been importing them at 1x scale, I was stumbling on that "Stencyl has reached 90% usage" and had to do that little trick with the .bat file to alocate more memory for Java. Until now.

I had 3 backgrounds and my game's export was around 200Mb. I added 4 other backgrounds yesterday and the export grew to an overwhelming size of 700Mb. Like. What in heavens?!?

I gave a short break on drawing and went back to coding. Made a new function, tested, and hooray! Time for a break. When I came back and restarted Stencyl I kept getting the error "Your game could not be built, because one of your images is too large to be included. Check your backgrounds and actors with large sprite sheets. (max_string_size reached)", and with that I couldn't even open any scene anymore.  :(

After some reading, I decided to uncheck the scaling on the Settings tab and go into Debug>Game>Clean up unused files.
After that, I was able to test the scenes again. But the game's export is still HUGE!

Those 7 scenes are the tutorial only!
I can't have a game that occupies so much space. I don't even have any actors moving around yet except for the player! What about when I finally add in the enemies? I can't even imagine.

Is there a fix to this? I can't end up with a 10Gb game :/
How could I even back that up?

Also, I'm not planning on releasing on mobiles. It'll be PC only, so I can discard a lot of things, I imagine. But how???

Ask a Question / Re: Actors of the same group are NOT colliding.
« on: March 03, 2019, 08:33:13 pm »
So, if there is one box, the player can push it, but if there are two boxes (one right next to another), he's not supposed to push both at the same time, is that what you need...?

I have this situation where my player pushes boxes too, but I had no issues, I just made the box heavier so he can't overdo it.

Yup, just tested it in my game. My player is from the players group, but I enabled the group to collide with actors. So my 'Big Crate' is a normal actor with no special code. It just has normal moving and gravity behavior, and on that same tab, on the heaviness property, I have it up to about 12kg. Takes a while to push, but the player can't push both at the same time because it is just way too heavy.

Not sure if that helps, though   :-\

Wow! Thank you once again, Justin. I'll be giving that a try :)

Phew, this question was hard to squeeze with the characters limit, so I'm going to try to explain it better.

I'm using the Dialogue Extension. So far so good. I only need to fix some issues regarding portraits/faces (and I believe TheIndieStation has tutorials on that, so I'll work on that later on) and special characters such as á, à, ã, ä, ç, ñ, etc., since right now they make my game crash and not using them would be gramatically unnaceptable (my game is in.... portuguese  :-[).

But my question is another.

Let's suppose that, at the start of the game, I prompt the player to type their name. I'll store that into a GA.
But how to I use/refer to it in the dialogue?

Example of some dialogue chunk:
--- "Hi [[player's name]]! Have you had a nice sleep?

If it's not doable I'll drop it, but it would be nice to have that option.
AlsoI would still need to investigate  this name's input and how to display it.
But anyways.

I know you can change game attributes through dialogues, but how can you display Attribute's values in-dialog?
Is it even possible...?

Ask a Question / Re: Save/Load blocks not working properly
« on: February 26, 2019, 10:11:52 pm »
Well, looks like... I solved another problem  :o :-[

Maybe I'm being too hasty, but believe me when I say -- my project is running against the clock, and my graduation counts on it, so, yeah... Anything that starts misbehaving sends me all the way inside the realm of desperation and chaos.

This time I wasn't able to solve it by myself though. A partner actually searched some tutorials for me. And this one did it:

The block "get scene with name" no longer exists with that name, and you just need to place a "scene with name" + GA.

My game has very few GAs. In fact, it already saves all of them automatically and the only one I need to save manually is the scene name, nothing more.

The saving system is now working so nicely it even saves the actor's X and Y (despite the fact that I don't remember saving them, but that's a plus, I guess) and the Health, so Scene Switch Behavior and Health Manager Behaviors are miracles too.

Ask a Question / Re: Save/Load blocks not working properly
« on: February 26, 2019, 11:27:00 am »
So, a few minutes after this (I had forgotten to actually post the topic, hence the weird timing), I decided to change my workspace, see if that changed anything.
Put it on "My Documents" instead.

It didn't correct it. What it *did* do is make Avast start tripping on every single .exe on the process and mess up the entire compiling system. And then, my game was broken again.

Several deep inalations later. I deleted the game and re-imported from the save from yesterday, just before implementing the save/load features. I put the exat same codes back in.

The saving works, because the 'draw text' is saying it was successful.
However, on my main menu (which only have a New Game and Load Game options, when I click the Load game, which has the LoadGame behavior from the post above, nothing happens. In fact, it doesn't even say if the save failed or succeeded. It is just... dead inside?

What is going on here, guys? I usually use Cppia to test it, but Cppia doesn't show any possible exceptions. For this test I was using Flash. But nothing pops up. There are no "errors". So why?

A few hours after this. I decided to do a thing I haven't done in years because it has never worked anywhere I tried. But I deleted the Load Game actor (it's an image that says Load Game, and it is an actor) and put a new one at the exact same place.

Now it's back to saying "load successful". But since there is no scene transition, I wonder:
-- What exactly has been saved? What is being loaded?

My game is a 2d platformer, but it has story. I don't want a level selection screen unless I really have no choice. I want the player to save at certain places and when he comes back, he picks 'load game/continue' at the menu and the game puts him back on the scene he was in.

How can I achieve this?

Ask a Question / [Solved!] Save/Load blocks not working properly
« on: February 26, 2019, 11:19:03 am »
So at 2AM yesterday I decided to follow a tutorial and finally get going with the save feature for my game, as it is basically the only main function missing right now.  I was folowing this tutorial >> and everything was doing fine.
That is. Until my computer decided to bluescreen on me.
When I restarted the computer -- surprise!! My whole game was corrupted and I was unnable to open it. My last export was 2 weeks prior, and I had to remake the Key Items and Cutscenes feature. However, since they were pretty simple features and I had screenshots of the codes, I managed to get them back in a few minutes. And then I went back, restarted the tutorial for the save/load features and followed it through.


Before my computer bluescreened, the game was doing that fine load feature after I saved, exited and restarted. Now, after I had to recover the project from a backup and start over (and, despite that I remade the missing code exactly as it was before), the load feature is no longer working. It does say "load successful", but doesn't change scene. At all.

Here's some attachments of the codes.

Posting on this old thread just to add close this topic.
I was solving other issues on the game, so I hadn't tested the list thing out yet, but when it came down to it, it only took me about 20 minutes to get it to work.

I know, I know, it's not optmized, it doesn't check for errors... But it's just a quick solution that I'm using, and it works (which is what I need right now, so I can check this out of my to-do list).  And here's an attachment of how I worked it out, in case anyone needs a light on the subject.

Also, please note that I'm making use of the Dialogue Extension, which can be found here >> ,
and to make it work properly I heavily suggest following TheIndieStation's tutorials in here>> .

(My code is inside the Scene Events).

OK. SO. I managed to fix it. And it was actually super simple.

To help anyone having this problem in the future (or so I hope so), I'm going to post my findings here. :)

First up, I'd like to refer to this topic and this other helpful topic .

What was happening, was that since my actor was there on the scene but not on the 'visible screen', the player was being considered as 'off-screen', so the behavior wouldn't detect him and 'teleport' him.

I feel so silly! Ahhhh.... Maybe I should take a break for today ._.

The code that solved this issue was on the Player character. Under Events, put a When Created block and add a "make Self always active" and voilà!

Pages: 1 2