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 - BMJ

Pages: 1 2 3 4 ... 12
Ask a Question / Re: show X percent of an image/actor?
« on: December 09, 2016, 09:48:19 am »
I think the easiest (and best looking) solution is to use a black colored actor on top of the health bar. Set its origin to the right and "grow" it from the right towards the left as your character's health is depleted, covering up more and more of the health bar. That way, the green disappears incrementally, you get to use your gradient, *and* you get to use easing on the black actor grow tween to make the change in health look slick and professional. All those benefits plus one more -- it's easy.

I think the only advantage that image API holds is that you could make the empty health bar space transparent.

Ask a Question / Re: How to play sounds only once, opon collisions, etc?
« on: December 06, 2016, 11:49:48 am »
You need to use a control Boolean, such as [Can Play Collision SFX?]. Create this attribute, define it as boolean. Set the default to TRUE. Use an "if" block to only allow the sfx to play if the control Boolean [Can play Collision SFX?] = TRUE.  Then set the boolean to FALSE. You'll also need a way to reset it to TRUE to allow the sound to play again in the future. The simplest way would be to do this on a timer. (After n seconds, set the Boolean back to TRUE). Do this just after the sound is played. There is a more sophisticated way to reset it, but if you are new then this is probably the easiest way.

In the bottom drawing event you need 'if draw text = true'

That shouldn't be necessary. He's already got "If {DRAW TEXT}". That's the same check.

Ask a Question / Re: Background scrolling Issue
« on: November 29, 2016, 07:04:28 am »
That's definitely an artifact in your image, not a Stencyl issue. I had the same problem. I don't know what caused it, but I re-made the image and everything was fine.

Ask a Question / Re: Switch back to a scene where you left off
« on: November 15, 2016, 11:10:13 am »
For switching to a shop inside another scene, I *highly* recommend you simply make the shop in a different part of the scene (somewhere it can be neither reached nor seen) and "teleport" your player actor to it. You can use an image or background layer or even an actor (put in the foreground) to make a transitional "fade to black" effect (or any other effect) before the teleporting happens. This way all the actors will not be deleted & recreated. You can either freeze them or let them keep simulating. If performance is an issue, freeze them. (Actually, you may want to freeze them no matter what - otherwise your player might take unfair damage as they leave the shop and there is an enemy in front of the door where there wasn't one when s/he entered.) This is so so so so so so much easier than recording all the x/y data of every actor currently alive in the scene and then recreating them when leaving the shop. That is really not worth the effort unless you actually need it.

Ask a Question / Re: This Plataform requires OGG sound - How to solve it ?
« on: November 02, 2016, 09:22:09 pm »
I recommend downloading Audacity to accomplish this filetype conversion. It's free and works very well. Not only will you be able to convert the file to an OGG, but you'll be able to process your sounds with filters/effects, etc ...

Ask a Question / Re: How to change the group ID of an actor.
« on: October 27, 2016, 06:07:16 am »
I can think of two fairly easy ways to accomplish this without changing anyone's groups:

1) You can either create an actor attribute for all your actors and have your Ally/Enemy actors check this attribute before firing. As in: (I've called this attribute [alignment]in my example)

If {Get [alignment] in behavior [actor events ####] for [neutral structure]} not= [alignment]
           Firing code goes here

In the above code, the firing is only executed if the firing actor's alignment is not equal to the other actor's alignment.

2) Or, when a neutral structure is captured, you could kill it and spawn a new actor that is in the correct group, based on the group of the actor that killed him. You would just need to keep track of which actor group fired each missile to do this.

Ask a Question / Re: One-Time Music
« on: October 26, 2016, 06:05:45 am »
Are you certain that both scenes (the menu and the other scene) are using the same sound resource on the same channel? If so, can you share a picture of the code that plays your music? (from both scenes)

Ask a Question / Re: Draw text incrementally
« on: October 24, 2016, 08:54:44 pm »
Check out the Dialog Extension by Justin. It does the whole RPG-style, letter-by-letter typing really well. It's very versatile and customizable.

Ask a Question / Re: One-Time Music
« on: October 23, 2016, 10:47:08 am »
Use the "Play [sound] On Channel [   ] " block instead of the "Play [sound]" block and Stencyl will automatically detect if the music is already playing on that channel. If it is, the music will continue uninterrupted.

(When you use the "Play [sound]" block, Stencyl just picks the first available channel to play the sound resource on, so this results in multiple instances of the music playing.)

Ask a Question / Re: Actor on tile detection?
« on: October 23, 2016, 08:26:34 am »
Something else must be going on -- I just checked this in my game and it works perfectly for me. In my game, it doesn't matter if the player actor is entirely inside the other actor. If my overworld player actor is anywhere inside my overworld water actor at all,  my Boolean [In Water] = TRUE the entire time until the player actor exits the water completely, for example.  My code is super-simple, too. It's nothing more than a simple collision event (in the player actor's logic) which reads:

If [Overworld Player Actor] hits an [Overworld Water Actor]
      Set [In Water] = TRUE

Then [In Water] is set back to FALSE at the end of the 'updating' event, just as I've described above. (Again, see Liberado's method for a more versatile way of doing this).

Where are you testing for this collision? (Is it in the player actor's logic, the environmental actor's logic or is it a scene event?) Also, what are the physics settings for both of the actors in question?

Ask a Question / Re: SSD vs HDD with Stencyl?
« on: October 22, 2016, 10:32:02 am »
I'll just add to my previous post -- the faster times are related to reading/writing of files only ... it won't have any effect whatsoever on things like processing times for filters or transformations in graphics programs nor performance of testing games from within Stencyl (except for load times of atlases). Not sure about compiling - I don't remember, but I *think* this was faster, too.

Ask a Question / Re: SSD vs HDD with Stencyl?
« on: October 22, 2016, 07:03:34 am »
The computer I work on came with a hybrid HDD/SDD. I was not happy with it and upgraded to a SSD and immediately noticed a difference in the speed of almost every program I use, Stencyl and Illustrator included. Regardless, I think upgrading to a SSD is a no-brainer for everyone, as far as I'm concerned. Anything to do with reading/writing files is generally faster and on top of that, the added safeguard of a much lower rate of drive failure makes a SSD one of the smartest upgrades a person could make to their computer - and as you pointed out, the price has become quite affordable. Overall, I think it's safe to say that the performance benefits of upgrading to a SSD are going to be proportional to how large your game is. Everyone benefits from the much lower rate of drive failure, however. That, alone, is worth the price to me.

Ask a Question / Re: Actor on tile detection?
« on: October 21, 2016, 09:35:18 am »
Actually, Liberado has described a better way to handle the "test for no collision" dilemma in this thread:,49280.msg272803.html#msg272803

His way accounts for the need to reference the attribute from any event at any point in the logical frame (there are other behaviors that have 'updating' events as well as other actors that may need to reference this actor's Collision attribute) , and is more reliable. I must have only been referencing my Collision attributes in ways that were compatible with my method, but I can certainly see how his method is quite a bit better, for sure.

Ask a Question / Re: Actor on tile detection?
« on: October 20, 2016, 08:07:33 am »
The way to test for "no collision" is to have a Boolean attribute (call it "Collided", for example) that is set to FALSE at the end of the "when updating" loop. Also, in your actor's collision event, set the attribute Collided = TRUE. Collisions events happen first, then 'updating' then 'drawing', so that will result in the default state being Collided = FALSE and will only equal true if the actor is currently colliding.  It will stay true for the duration of the logical frame and then automatically be reset to FALSE at the end of the logical frame.

As for the many actors stuff -- also make *certain* that continuous collisions is turned off for all these actors. This will help reduce the processor workload dramatically. (Continuous collisions is only necessary for very fast moving small actors (like bullets or something similar). It is also turned on by default when you create a character  (something I think the Stencyl team should seriously reconsider. )

When you say the screen will be filled with actors -- how many, roughly, would that be on screen at any one time?

Pages: 1 2 3 4 ... 12