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

Pages: 1 2
1
Ask a Question / Re: How to avoid the enemies spawn in a specific region
« on: August 01, 2013, 01:18:16 pm »
You could do it a number of ways, but let's go with the one that's closest to what you've already got.  You created a region that follows the player.  Before you spawn your enemy, spawn a "test" actor that appears randomly on the screen.  If the actor does not appear in the region, then the area is safe and you can create the new enemy at the x/y of the test actor (and kill it).  But if the test does land in the region, kill the actor and try again.

2
Ask a Question / Re: rotating platform behavior question
« on: May 10, 2013, 03:01:16 pm »
Turns out it was a lot simpler than that, actually, half of that code wasn't even functioning. Here are the necessary bits.

So how can I make it so that the player actor sits on the point of collision instead of snapping to x of the parent actor? What I'd like is to have it read so that upon collision, x of the actor is set relative to x of the parent actor, so that when x of the parent actor moves, x of the actor moves accordingly...

Does this make sense?

What if instead of finding the X-Center distance of each actor, you found the X (left side) of each actor upon collision and set it to an attribute?  Then you could set (sorry if you're not still using this method) the actor to that X-offset from the platform as it moved.  I haven't tested it out, but that might work.

Happy trails, Flyingninja77

3
Ask a Question / Re: rotating platform behavior question
« on: May 04, 2013, 03:49:51 pm »
If you're working with Stencyl 2.0 or higher, the following behavior should work.  Please let me know if it doesn't (I've got a more advanced method that might work better).  Note: you are going to need an actor attribute, an actor group attribute, and a Boolean attribute, and the platform should be part of a collision group of moving platforms.

EDIT:  It seems the logic you're using for the moving platform includes setting its location directly as opposed to moving it.  The method I mentioned probably won't work then.  I'll see if I can come up with a behavior that works for a moving platform.

4
Chit-Chat / Re: How did you find out about us?
« on: February 26, 2013, 03:12:28 pm »
I used to use Scratch, but one day I was browsing the web for the customizable MegaMan Battle Network Engine and found a link from here: http://www.legendsbreak.com/games/test-customizable-mmbn/ to the Stencyl website.

5
Ask a Question / Re: Error When Clicking on Buttons
« on: February 26, 2013, 03:03:37 pm »
I'm pretty sure that the "Click" feature activates if the mouse is released on the graphic's actual size, including transparency.  Either that, or the size of the collision box.  What I would recommend is seeing if tweaking the collision box size will affect the graphic.  If that doesn't work, instead of running your logic through the actors, try creating regions around them and having a "When Released in Region" code.  That should definitely solve your problem.

6
Ask a Question / Re: Why can't I create a color Game Atribute?
« on: February 26, 2013, 02:59:04 pm »
You could also store it as a text value and use an "If [color] = Red (text) Set color to Red".  This would obviously have to be put under a "When Drawing" block, but if you only needed one color, you could use that method.  If you needed to store lots of colors, I would use a list and follow a similar method.

7
Ask a Question / Re: Dice rolling w variables
« on: February 26, 2013, 01:12:14 pm »
Alright, the game has been posted on StencylForge!  There is one known bug; i.e., when someone rolls doubles, the game doesn't calculate that for some odd reason.  I'll see if I can work on it.  Search for "DEMO--Risk Style Dice Game."

8
Game Ideas / Re: What type of jobs would there be in a town?
« on: February 26, 2013, 10:19:40 am »
The list could go on forever.  But should this really be in "Ask a Question" or "Game Ideas"?  I'm a little confused as to where some discussions go.

9
Ask a Question / Re: Dice rolling w variables
« on: February 26, 2013, 09:55:25 am »
1. Best way to go about adding MORE dice? Eventually I want 3 die vs 2 die as in Risk, but what about just 2 v 1? How would I go about telling the program to match up HIGHEST die to HIGHEST die?

Did you take a look at the code I posted on StencylForge?  It has a "pick the highest number" feature built into it.  But if you want to have it like Risk--i.e. 1, 2, or 3 dice versus 1 or 2 dice, it's a little more complicated, but not too difficult.  I think I could modify the behavior to make it work like that.  I'll let you know when I've gotten it up on the Forge.

Happy trails, Flyingninja77

EDIT--I'll post a sample game that simulates a Risk-style comparison so you can see the code in action.

10
Ask a Question / Re: Can't create new scene
« on: February 25, 2013, 03:35:13 pm »
Sometimes I have that same problem.  It happens to me only if I originally had something named (in your example) "20" and then I deleted it, but I have no idea why it stays in the name directory.  It's probably a bug that Stencyl 3.0 will fix.

11
Ask a Question / Re: Checking new items added in a list
« on: February 22, 2013, 12:07:04 pm »
Alternately, you could create a second (maybe scene?) list that stores which achievements are completed at the end of a level.  Then you just need to rig up a Drawing code that shows the achievements on separate lines.

12
Ask a Question / Re: Dice rolling w variables
« on: February 21, 2013, 04:35:58 pm »
Alright, I uploaded a behavior to StencylForge called Scene Dice Roll Behavior.  You can download it and check it out.  It would probably be helpful to take a look at the logic.  If there's something you don't understand, let me know (or if there's a feature I missed--I'll get that).

Right now, it requires an actor behavior called Dice Roll to have an attribute called Roll Number, but I'll work on tweaking that in the near future.

13
Ask a Question / Re: Dice rolling w variables
« on: February 21, 2013, 03:16:01 pm »
For your comparing dice results situation, you're going to need to set up several things in your scene.  First, you need 1 number attribute for each die whose number you intend to keep track of.  In a gist, you want:

Number: MyDice1
Number: MyDice2
Number: MyDice3
Number: BadDice1
Number: BadDice2

I'm going with the Risk example, but the logic is similar for any number of dice.  So, second, we want some way that the dice on the screen roll these numbers.  Let's go with the easier way.  Let's make an equal number of Actor attributes.  These can be customized in each scene.

Actor: GoodDice1
Actor: GoodDice2
Actor: GoodDice3
Actor: EvilDice1
Attor: EvilDice2

It's not so important what you name them as you know which actor corresponds to which number.

NOTE: As you are reading this, I am in the process of writing up a visual of the logic code.

14
Ask a Question / Re: Stopping Time (pause and collision)
« on: February 18, 2013, 02:41:37 pm »
I need a similar effect for a game that I'm working on.  I'll let you know if I find anything that works.

15
Ask a Question / Re: Implementing Achievements
« on: February 13, 2013, 05:24:43 am »
You can also start with an empty list.  When you get an achievement, it adds the Achievement name to the list (this serves a double purpose) and then have some code that adds +1 to the multiplier for each item in the list.

So if you ever wanted to check which achievements you had reached, you could just see if its name is in the achievement list.  If not, then you haven't gotten it yet (that's what I mean by it serves a double purpose).  The more I work with lists, the more I find how useful they can be.

Pages: 1 2