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

Pages: 1 2 3 4 5 6
Ask a Question / Blocks that take actors as arguments, can you use maps?
« on: August 09, 2016, 07:54:04 pm »
I was experimenting but ran across a few issues that I won't go into. The short version is that I want to use a get map key/value
block as an argument to a custom block that takes an attribute that stores actors.

So does anyone have experience with this, before I go wading in a little deeper? I realize when I click on the block to select and attribute, my map attribute won't show up, but for example, I should be able to drag a get-map-value block into the attribute slot for the custom block.

What say you stenclyrs?

Extensions / Re: Drawing Utils Extension [1.3]
« on: August 07, 2016, 01:39:39 pm »
For anyone having trouble utilizing this on windows builds, or getting errors with wedge drawing on windows, update to 3.4, build 9180 of stencyl and retry it. It solved errors I was experiencing beforehand.
And also, thank you for making this. This extension has helped me a bunch! Keep up the great work.

Hi, this isn't too difficult to solve.

The key thing is to save the two points that you want to move between, and use that to calculate distance along the x axis and y axis. Then when you move your ball, you set the x an y axis to 'd / distance', or some fraction of the distance based on the formula in the attachments.

As an example I have some code, not entirely complete, but it should set you heading in the right direction.

Pay attention to what I circled in yellow, those are the important bits. Good luck.

Note: x0 and y0 are the position of your ball. x1 and y1 are the position that you want the ball to move to.

Ask a Question / Re: Is Stencyl PR active ?
« on: July 27, 2016, 03:09:44 pm »
I'm a paid sub as well, and that, to me, is the biggest indicator that stencyl will be around long term. Subscriptions are a predictable, long term model. More to the point, while suggestions are indeed, hit or miss, looking at the changelogs, additions seem to be a good mix of new features and needed bug fixes.
Interestingly the few questions and bugs I've reported have often had dev responses, which is suprising considering how busy they must be. Also a shout out to Letmethink, Liberado, Rob, and Ceosol among other dedicated members for all the help they provide to many members. I guess the word community is overused on the internet today, but you gents really make things happen. Thanks again for all the help.

All the progress so far, says to me they *have* a roadmap and a plan, but have, in lieue of other responsibilities, just not got around to publicaly posting it. A lot of what could be construed as 'neglect' looks keenly like programmers who are too busy to respond, and the suggestions going unanswered is probably also a symptom of that. In other words, like most people who are genuine and dedicated, the devs have too much to do and not enough people to do it.

And yeah, stencyl is, I think  one of the few engines that, interalia, doesn't get in the way when you want to do something simple, doesn't obfuscates the low level stuff, and has a fantastic support/paid model that doesn't pinch you for every dollar (asset markets)

Ask a Question / Lines between tiles at fullscreen
« on: July 27, 2016, 11:03:54 am »
So I noticed that blank tiles, when in fullscreen end up with lines appearing between the regular tiles and the blank tiles.
I saw a few posts from a few years back but I got the impression this was fixed.

Does anyone have the same problem, and if so, how did you solve it?

Ask a Question / Re: Speeding Up a 'Do Every' Event
« on: July 19, 2016, 01:40:11 pm »
Instead of do every seconds, make a custom event that in the end triggers itself after x seconds. Give you a lot more room to tweak it while it's running.

Thats smart Kramer.
By the way this won't cause a stack overflow,or other issues common to infinite recursion, will it?
Or are events genuinely different in haxe/stencyl from function/method calls?

I tried to find out if haxe is tail call optimized (works around the issue of infinite recursion), but from what I can tell TCO is largely non-portable, and doesn't play well with garbage collection--both of which would be a potential problem for a language that is translated to other languages for portability.

I'd be interested to know if this was just an idea or if you've actually used self-triggering events Kramer, as well as what the results were. +1 for the intriguing response.

Ask a Question / Re: Map and list copying shallow vs Deep.
« on: July 17, 2016, 07:43:17 pm »
Yeah if you got the time, I'd be very thankful.

Ask a Question / Map and list copying shallow vs Deep.
« on: July 17, 2016, 03:27:18 pm »
So I'm saving a map object into a list during an event, essentially recording the x and y tile location of each mouse event.
However what I'm finding in the process is that the x and y of each tile location are all the same for every entry in the list.
So my 'tile' attribute which I'm using as an intermediate variable for my x and y values, before storing it in my list--when I change my tile attribute, ALL copies of it in the list are ALSO changed.

From what I could find in the manual and online, the problem is due to Stencyl using shallow copying. I found the 'copy map/list' blocks but according to what I read, these only do shallow copies as well.

I take it I need to use the 'new map' block each time I store a new entry, and then modify the entry itself after it is already stored in the list, or is there a better method that I'm not aware of?

I'm grateful for any help and insight that anyone reading this can provide. Thanks.

I'm drawing to tiles by using (column or row + camera offset) * 64

Tile rows and columns are always relative to the top-left of the scene. Remember; the camera moves around in the scene - the tileset is fixed in place.

Thanks for confirming this Guri.

Hectate, I think you mean to say the tiles are relative to the screen? Otherwise, wouldn't the position of the camera be irrelevant?

I got some code that iterates through each column and row, and outputs the tile row and column. This uses the get column/row

I have a placeholder that moves with WASD, and I noticed my tiles always go from 0 to 12, no matter where the character is in the scene.

Do I need to factor in the camera position? And if so, why does the get tile blocks not account for camera position?
I tried putting the tile retrieval code in the placeholder, but anything to the actor suddenly is a negative tile, and everything to the right of it is a positive tile, and so forth.

What am I doing wrong?

Bug Archives / Re: Something wrong with build 9179?
« on: June 16, 2016, 11:40:45 am »
I don't know what you're making, but the hype is real.

Shared Resources / Anyone willing to share the preloaders for NG?
« on: June 15, 2016, 04:01:18 am »
Looking for Newground preloaders as precompiled swfs. I've given compiling .fla a crack and it always ends with needing manual input to start the actual game, or a preloader that loops endlessly.

I'd be grateful for the help, as would others probably.

Hey thanks nox!

The problem it turned out was I was trying to do actor-wise comparisons inbetween for-each loops. So things were becoming confusing. I ended up turning my distance code into a really compact custom block GetDistance, which was called by another custom block, GetClosestActor. No attributes needed.  After that the tick event just was implemented follow some pseudo code
I wrote while trying to figure out how to put it all together.

 for each actor_on_screen
    if actor_on_screen = target type && actor_on_screen != current_target:
        if current_target = null:
            current_target = actor_on_screen
            current_target = get_closest_actor(self, current_target, actor_on_screen)

For anyone reading this, all this really says is if the actor on the screen is the right target type, but doesn't equal the current target, it means either current target isn't set or it is, and we should do a distance calculation.

In other words we arrived at roughly the same conclusion. Laughed out loud when I saw your reply this morning. Thanks Nox.

So I'm writing an actor that targets the nearest enemy each tick. But the problem is no enemies are actually being targeted.
I appreciate any help anyone can offer solving this. I've tried several different solutions and no luck. Thanks.

Heres what I have so far.

Edit: So what I determined is 'Last Distance' is ALWAYS equal to 64, according to a print statement. For no apparent reason.
Maybe a rounding issue? I'll try rounding the distance attribute before doing   "last distance = distance", and see if its that.

Pages: 1 2 3 4 5 6