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

Pages: 1 ... 36 37 38
News / Re: StencylWorks 1.0.3
« on: July 21, 2011, 01:57:15 am »
Alright, this is really noticeable difference, and while I don't need to use Pivot Points right now, I must say it is quite important. Also, blocks simplification is a nice thing, too, though there's one change I'd like. I mean, I don't know how technically difficult it would be, but could you make it so that when you choose an option from menu its width in design mode is set to the width of this text, rather than maximum width of possibly chosen option? O.o I mean, I use X and Y coordinates quite often, and now places where I've used it are terribly wide. ^^'
(oh, in fact in actors choice menu there's no problem with that; Self is about as wide as Self and Last Created Actor is about as wide as Last Created Actor O.o)

Also, this POST thingy sounds nice to me. I just wonder... when you need to get the POST value, you use "response from website" and find it in this response? O.o

Last thing: part of "cat" starting from "1" ending at "2" still shows "a" instead of "at", and I don't see any changes in Help Center (in fact, HC is quite old, there are still informations about Game > Scoring blocks O.o).

Wait, is this "IsPaused" thing really necessary?
I mean, what about disabling behaviors?

At the beginning, you create a Global Attribute where all behaviors to be activated/deactivated during pause are listed (naturally, you would update them at the initial scene). Then, you make a function "disable behaviors enlisted in [ list ]" or whatever you want to call it, and similar "enable behaviors enlisted in [ list ]". Of course, as long as none of behaviors contains things you would like to keep activated and things you would like to stop (like updating the position of player/platform etc.), but even if there are such ones, there shouldn't be many of them.

Yes, making this whole list is quite a lot of work, but I think that it's still better than "IsPaused", unless it's about memory; but I don't think that bunch of behaviors names is that scary (also, it gives you better control on what you want to stop and what would you like to keep active). At least, that's the most sensible solution I can think of right now.

Chit-Chat / Re: How'd you get your name?
« on: July 17, 2011, 06:07:22 am »
I'm really glad that my parents named me Greg -- because that's what everyone calls me at work.
Well, definitely appropriate for someone connected with konGREGate. ;)

For my nickname, it's connected with Plants vs Zombies game and is supposed to reflect my cheery personality (cheery, not cherry, mind you; I'm not someone as unstable as Cherry Bomb... I suppose).

Old Bugs (1.x/2.x) / A cat at a "part of text"
« on: July 17, 2011, 05:00:03 am »
Hello, I've noticed not really great, but quite confusing bug. I mean, when I make such block:

part of [cat] (start: [1] end: [2])

It returns me "a", as if it didn't really get the end part. However, according to Help Center, such block should return me "at". Apparently this block does not include the "end" letter (so for example part of "category" from 1 to 5 would return "ateg" instead of "atego"), while according to Help Center it should.

I hope this will be fixed one or other way. Personally, I think that including "end" letter would be more intuitive, however, I don't know how many existing project have used this block/function taking this into account (so remaking Help Center would be easier). So, I just let you know that such inconsistency exists.

Chit-Chat / Re: Introduce Yourself!
« on: July 17, 2011, 04:41:17 am »
(silly me, how come I haven't noticed this thread yet? O.o)

Hello, everyone! I've started using Stencyl quite recently (week and a half ago, but last week was spent on holiday ^^), but I have been creating games for several years (mainly in Game Maker). Many words could be said for and against each of those programs, but it's not the place to make such comparisons, is it? -. -.
Anyway, I hope I can be of some help here (even if I was the one needing help so far -. .-') and... well, happy game creating everyone!

Hello, fellow game creators!
I've been recently working on my first Stencyl game and after many tries and errors managed to make a wall connection system. In other words: after all walls are placed on screen, this system makes them connect in nice way, so that edges are drawn only at the actual border of wall. This is useful when you don't want to place many tiles yourself, each corresponding to certain edge. It turns out to be even more useful, when you don't know how the walls will look at all - which happens with random generated walls or level editors!

You can find it in Stencyl Forge as WallConnect Example Actor! The reason for publishing it as actor rather than behavior is mentioned later.

Generally, when you use my system, there are three things to remember:
1. Animation: there are 13 images to make. They are: 1 for the entire middle of wall, 4 for outer corners, 4 for edges and 4 for inner corners (it should become more clear when checking the animation in example; that's why I decided to upload WallConnect as actor rather than behavior itself).
2. Collision Box: it should have twice the width and the height of animation, and the actual image should be in the left-upper corner. That's because animation frames are only quarters of the complete image. Also, that may be also the reason to use in scenes tiles larger than animation, too (or rather, that's the reason why animation is smaller than tiles).
3. Condition: you need to edit "compare block next to [Self] at [XOff] [YOff]". That's because there are different ways to decide if there's a wall adjacent to the checked part (and if it's the correct wall). Normally it's supposed to return TRUE when there's connectible block next to checked one at tile at [XOff][YOff] relative to position of [Self] (and FALSE otherwise), but you're the one to set the condition determining if block is connectible*.

Also, to make this work, you should add all walls to the scene first (if they weren't already added in Scene editor), and then tell walls to "connect". If you add walls through scene creation code, you can place this command right after that; if walls are placed by scene editor, you may need to call it after short timeout.

If you have any suggestion regarding this example or wall system modifications, please post them here or through forum message system.

*Of course, the main reason behind not adding the typical condition for connectible walls is that I have no idea how to work with Regions, and the condition I use myself is quite unusual.

Yes, when I changed them to regular Custom Blocks, it worked properly. Thanks a lot. :)

So, I was just trying to write a simple function, which would get a character from string Map treated as array with dimensions MWidth and MHeight. All those three variables (Map, MWidth, MHeight) are Game Attributes. When arguments are out of range, it's treated like there's no wall (that's what "if" block is for).
Here's the image for block with this function: [LINK]

However, when I try to compile that, such error is shown:
Code: [Select]
Behavior: Design_4_4_MakeCorner at line 169
Invoking potentially undefined method getGameAttribute.
        if((((__MX < 0) || (__MX >= (getGameAttribute("MWidth") as Number))) ||
((__MY < 0) || (__MY >= (getGameAttribute("MHeight") as Number)))))
...and so forth for four other places where Game Attributes are used.

I wasn't using code at all and I don't know the possible reason for this to happen. I already tried restarting and Ctrl+R - ing Stencyl (the latter was suggested by someone on support chat), but it didn't work.
I didn't have opportunity to test this function, so it's not something which happened because of not initialized variables.

Could anybody find the possible solution or source of the problem? O.o

Resolved Questions / Re: Drawing mupltiple images by single actor
« on: July 07, 2011, 11:54:49 am »
Uh, oh...
Loading external images? O.o
No, it's not what I want to do. Unless you mean by that loading animations belonging to other actor... oh, no, actually, I didn't want to do it either.

The source of the image is irrelevant to me, I can place all of them in different animations for block actor, or even put all of them in single animation and draw only single image.
The point is: can single actor draw multiple images during one frame? Specifically in this case, can it be so that one single actor draws four separate corners. In attached image I showed how it is supposed to work: blocks (black frames) are drawing four corners each (blue frames) without making any other actors.

Geez, I hope it's more understandable what I mean now. I just want to avoid making actors whose purpose would be only to draw these corners, because they would probably cause slowdown, and draw all corners with single actor instead. ^^' I know that each actor draws their animation (unless it's said otherwise), but I hope that there's something which would let them draw also something else.

But yes, thanks for showing this layers code. I think it'll turn out useful anyway. O.o


Silly me, apparently the function I've been searching for was right around me. I mean, "draw image for [Actor here]" block. So all I would need would be to do something like that:
move pen to (x, y)
set animation frame to [left-up frame here]
draw animation for self
move pen by (16, 0)
set animation frame to [right-up frame here]
... and so on.
I'm going to try this solution, I'll mark this topic as solved as soon as I get this to work.

Yay, I got this to work... while someone else marked this is solved. O.o
But yes, the problem is solved. ;)

I was wondering if there's any way for single actor to draw multiple images, not only the current frame of animation, but also something else.
Why I ask? I want to make walls connecting system, which would connect parts belonging to the same block in nice way, like on this image: [LINK].
The system I was using so far (in other game creation program) works like that: for each "big" square there are 4 smaller, one for each corner. I had there function which allowed me to draw whatever I like wherever I like, so all I needed was to keep information about which image (of 13 total) was to be drawn in certain corner. However, I haven't found such function here, and I would like to avoid creating more actors for each corner, because it means 5x more objects - not the best thing when you need to optimize.

So, anybody knows how to draw images in any given place without constructing additional actors? All I need is such function or piece of code. Help will be greatly appreciated. :)

Pages: 1 ... 36 37 38