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

Pages: 1 2 3
1
News / Re: Stencyl 3.1 - What's coming next?
« on: March 23, 2014, 01:07:06 pm »
To me, one major improvement would be in how information is passed from Actor to Scene to Game. Yes, there are Game Attributes, but they are limited in usefulness. For instance, there does not appear to be any way for an Actor to detect if it is inside a specific region in a scene. The scene can detect if a specific actor is in a region, but then it requires several steps to get that information back to the actor.  Likewise, it seems to be hard to set an actor as the "target" of scene actions unless it was either the last created actor or you set the actor as the target before the scene started. It would be nice if there were a built-in way for an actor to set itself as "it" that the scene would immediately detect.

2
Ask a Question / How to move the camera slowly?
« on: March 23, 2014, 12:59:59 pm »
I have a scene where I want to show the player the goal, and then have the camera move back to where they start, but when I use "Move Camera" in my event, it jumps immediately to the new coordinates instead of panning to them. Is there any built-in way to control the camera move speed or do I just need to write a routine that issues a set of Move commands that direct the camera one step at a time?

3
I'm trying to have actors of a certain type become the "target" actor (i.e. is if they were "last created actor" as far as the scene is concerned) when they cross into a certain region. I feel like there is some way to use an "Actor Attribute" to set this, but I can't see how to do it.

I would be happy to just use "If {actor of type] is inside {region]", but on the scene level the block under "get region" only offers "last created actor" or to choose a specific actor that is in the scene editor view. But this would be something that would be set dynamically. 

I can use this either as something the scene itself detects, or as something the actor tells the scene, but I can't understand how to do this.

Specifically, I want to be able to use the "Push [actor] [gently] towards...etc" block, but I want the target actor to be the actor that just entered this region. How do I set that as the target?

4
What is the trick to getting sin and cos to return the values you would expect for them?

I'm trying to set x and y of an actor rotating around a point using the radius and angle through sin and cos. But as a vary the angle from 0-90, the returning value of sin and cos seems to jump all over the place. I was just testing with a literal text output and a fixed number.

draw text [[cos] [15]] at (x:[900] y:[320])  returns the value  -0.7596
draw text [[sin] [45]] at (x:[900] y:[340])  returns the value 0.8509

cos (15) should be .966
sin (45) should be .707

If I change the values by 10 degrees, that results jump all over the place (the cos value goes from -0.759 to +0.999, for instance). I also tried to use [25] as [degrees] but that didn't make it right either. What is up?

5
Ask a Question / Putting a delay in "for each actor of type"
« on: March 01, 2014, 08:56:27 pm »
I'm trying to use "for each actor of type" to put a marker on each of certain actors. I don't want them all to pop up at once, but instead to pop up in sequence with a slight delay in between each. I tried to use "do after [  ] seconds", but instead of delaying each one, it just waits that much time and does them all then.

Any suggestions?

6
Ask a Question / Advice on improving performance of this launcher
« on: March 01, 2014, 01:26:18 pm »
Working on a physics puzzle where I want to use a spring type launcher instead of the typical slingshot seen in so many. I've put this together and it works OK, but I think it isn't smooth enough to seem like a polished game. If you click and drag the mouse fast enough, the tile can fall out of the launcher. Some times if you point it all the way up (but not always) it can just freeze up. If you look at the events, you'll see one thing I did to try to offset this was to limit the amount (ChangeX, ChangeY) that it can move in one step, but when I limit it enough to completely prevent the tile from falling out, it's too slow.

I'm thinking that I could actually use trig functions to make the tile move and rotate, but I'd prefer to keep the tile movement based on the physics and movement of the launcher if possible. Is there already a good example of this kind of behavior out there?

To test, click on any of the tiles in the upper left, then click-drag anywhere on screen to compress the spring and aim. Use the button in the upper right to reset.

http://deadbat.com/LauncherTest.html

7
Isn't step 5 supposed to be "Profit"? :)

Thanks. I'm still learning to think more comfortably in Stencyl, a few months from now I might have figured that out on my own but I'm impatient...

8
Is there any built-in behavior to display a number with a forced number of columns, even when it is low? That is, so you can have a score display with a full set of digits even when most of them are zeros. I can see that this could be done with custom code, but can't find a function for it built in to Stencyl. Any help?

9
In working on a game, some times you might start off with an element or behavior that seems fairly benign, but then later on in your game you might want to have many copies of it on screen at once and you find out that it slows way down. So I was wondering if there's some good method for testing (say by turning different things on and off and seeing the difference) the total processor load your game is creating?

10
OK, to remove confusion--apparently I misunderstood what "Actor Value" means, and that is not what I'm trying to set.

The attribute of type Actor creates a setter for which actor to address. What I need is a way to set an attribute that belongs to that actor from outside that actor.  When I am using a behavior attached to an actor, I can already select that actor just by choosing "Self" in the setter blocks, and I can change things like X and Y and even "kill [Self]", but I want to be able to change the value of an attribute I have created for that actor.

That is, if my Actor has a boolean attribute named "CanDie", if I am editing an event from within that actor itself, I can choose a setter that says, "set CanDie to [  ]" to set it to true or false. I can use the behavior module "for [Self] set [text] to [anything] for behavior [text]" if I want to pass a value from the actor to the behavior. I could also set a Game Attribute if I wanted to be able to pass a value from the actor to the scene. What I'm trying to find is how to pass/set the value of an actor-level Attribute into the actor from the scene or even from a behavior attached to the actor.

11
OK, that seems like it helps except... how can I set an Actor's attribute from inside a behavior?

That is, there's the block "for [Self] set [  ] to [  ] for behavior [  ]", but I don't see the reverse. That is, from within a behavior, something equivalent to "for [Self] set attribute [  ] to [  ]".

Is the only way to make this work to change the attribute from being actor-level to being a behavior level attribute?

12
I am having a problem similar to this, so I thought I would post here to make it part of this discussion.

I have created detectors in certain actors that say once they have stopped moving for 1 second, they die. When these actors first appear on the screen, they are in a staging area where they don't move, so I have set an Actor Attribute that is essentially "Can Die", which is off but then switched on when the actor leaves the staging area.

The problem I'm encountering is that they leave the staging area through an Event at the Scene level, so I need to be able to set the "Can Die" attribute for the actor to true from inside a Scene event.

I have tried using the "set actor value [  ] for [Actor] to [  ]" block to do this, by manually typing the name of the "Can Die" attribute into the first set of brackets and setting a True boolean block in the second, but that does not seem to work. Am I misunderstanding what the term "actor value" in this block means?

As a secondary approach, I thought I could use the "trigger event [  ] in behavior [  ] for [Actor]" block and then create a behavior for the actor itself which would set the value of "Can Die" to True, but I can't see how to create an event in the behavior itself that receives the trigger (i.e. in the "Add Event" pulldown there is no "when triggered" option). If you use that block, can it trigger any event, just overriding the first "if" or "when" part of that block? In the help manual, it shows some blocks that start with "tell" instead of "trigger", so it wasn't helpful.

13
Ask a Question / Degradation of aliasing in 3.0?
« on: February 27, 2014, 06:53:22 pm »
I downloaded 3.0 and tried to import my game in progress. Overall, the performance when I exported the game slowed way, way down even after I used the "clean" feature. Also I found that actors on a background level which were set to "no physics" were being collided with, and see that "no physics" option has been replaced with "simple physics" which doesn't seem to be the same thing. Is there no longer an option for "no physics"?

I also noticed that the on-screen rendering seems to be lower quality. I took this screen shot because this element showed it most dramatically (left is 2.2, right is 3.0).  Is there some option now to turn aliasing on and off that was defaulted to on before?

Overall, I just decided to go back to working with 2.2 until 3.0 is shored up more, because I don't want to waste time re-creating my whole game from scratch just for something that will output a slower-performing game. I'll probably wait to use 3.0 until I hear it's been cleaned up more or until I start a new game from scratch.

14
Yeah, sorry I did mean 2D arrays, i.e. more like reading from a database than just a list.

Thank you for the info on the extension, I will check that out.

15
Ask a Question / Re: Glow effect in Stencyl
« on: February 27, 2014, 04:00:40 pm »
Make the glow as a separate layer in Photoshop, export it as a transparent PNG file, put it on a layer under the actor with transparency set to less than 100%, make a behavior to have it exactly match the movement of the main actor?

Pages: 1 2 3