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.


Topics - ShivaFang

Pages: 1 2
1
Not yet sure if this is a bug, or if I'm not doing something right.  I'd think if it was a bug someone would have noticed it by now since it's a pretty major part of the extension system - and I didn't see it when poking through the assigned and unassigned bugs sections, so I'm guessing the latter.

I have this in my blocks.xml file (among other blocks, but these are the ones that are causing the issue)
Code: [Select]
<block tag="listWrap" spec="List Wrap %0" code="ShivaInterface.listWrap(~)" type="normal" color="gray" returns="list">
<fields>
<anything order="0"></anything>
</fields>
</block>
<block tag="listUnwrap" spec="List Unwrap %0" code="ShivaInterface.listUnwrap(~)" type="normal" color="gray" returns="anything">
<fields>
<list order="0"></list>
</fields>
</block>

The code these reference looks like this;

Code: [Select]
public static inline function listWrap(v0:Dynamic):Array<Dynamic> {
var Arra:Array<Dynamic> = new Array<Dynamic>();
Arra.push(Type.getClassName(Type.getClass(v0)).split(".").pop());
Arra.push(v0);
return Arra;
}

public static inline function listUnwrap(v0:Array<Dynamic>):Dynamic {
return v0[1];
}

When I open my game, these two blocks don't show up (but the other block in the same blocks.xml file does - so it's not a formatting error, or a missing close tag or something).

The error that shows up in my log;
Code: [Select]
[ERR] java.lang.IllegalArgumentException: No enum const class stencyl.sw.editors.snippet.designer.Definition$Type.ANYTHING
Now 'anything' does show up as a type in the help information that's commented out, so I would expect it to work.  I'm trying to make it so that when my classed objects are used stencyl-side they are passed around as Lists (so I can store them in an attribute, since there's no such thing as an 'anything' attribute).

2
Suggestion Archives / Extensions: 'code' block fields
« on: October 29, 2012, 08:08:12 am »
I'd like to be able to set a field for a block as a 'code' field in an extension.  This would work exactly like 'text', but without the automatic quotes.

I'm trying to make something like this work;
Code: [Select]
<block tag="CreateLocalVar" spec="Create Local variable %0 of type %1" code="var ~:~;" type="action" color="gray" returns="void">
<fields>
<code order="0"></code>
<code order="1"></code>
</fields>
</block>

and currently it can't;  'text' puts quotes around it which makes the output;
Code: [Select]
var "%0":"%1";which of course doesn't parse!

Edited to make it more clear I'm talking about extensions.

3
Archives / Custom Block filters (Resource Pack)
« on: August 13, 2012, 10:02:27 pm »
I'd love to be able to filter custom blocks to include only those in the same resource pack as the behaviour I'm working with.  Would greatly help creating 'stand alone' resource packs for sharing on the Forge or between projects (either with export/import or via 3.0's Library features).  I recognize I can create a separate game to do this in, but that makes changes hard to test.


EDIT:  Oh and I haven't really looked super hard because I only started with resource packs - but if it isn't yet possible, some way to use and register Global Attributes with a resource pack?  I wouldn't normally suggest something I haven't looked into, but since I'm already requestion something resource-pack related that I HAVE looked into, I thought I'd throw this in there rather than make a separate post later on...  Something I'll probably regret tomorrow after I've slept...

4
Old Bugs (1.x/2.x) / Behaviour List Attributes - all the same
« on: August 03, 2012, 12:36:13 pm »
I have a behaviour with a non-hidden list, which is a set of strings.  I had it all set up the way I wanted it for one actor.  I then duplicated the actor and changed the list on the new actor.

When I went back to the original actor, the list was changed there too.

These clearly link to the same 'list' in the internal memory, rather than having a different list from each object as would be the expectation of the end user.  Thinking about it, I 'get' why it does it this way - but it's flawed form the user's point of view, since all the other attributes can be customized on a per-actor basis.

Not sure what to suggest here, unless you can think of a way to actually make these separate lists in stencyl.

5
Old Bugs (1.x/2.x) / Actor property 'Half Width' math error.
« on: July 22, 2012, 05:34:11 pm »
I came across a weird bug that's a problem with the way it converts the blocks to actionscript.

Using an attribute named 'Calc', I had the following;

Set the value of Calc to [[Calc]/[Half Width of [Self]]]

in this case, calc was 20, and the width of [Self] was 20, so this should have evaluated to 2.  However, it was evaluating to 0.5

After banging my head against this for a bit, I realised that it was evaluating in ActionScript as the following;

_Calc = (_Calc / get.actorWidth() /2);

Please change the script maker to put brakets around (get.actorwidth() /2 ) in order to solve this issue (as your target audience for this product might not figure this out).  I can fix this by using Actor Width and dividing it myself, but it was still an annoying little 'hiccough'.

6
Archives / The new 'settings' tab
« on: June 22, 2012, 01:43:09 am »
I don't see an 'official' thread for update comments.

I'm not loving the new settings tab.  On the one hand it is on the top bar and easy to click on so I don't have to go to the dashboard, but on the other, I can't set it to the page I want it on and then flip back to it when I need to edit something (I have to click it, wait for it to load, and then select the page, wheras before I could JUST click on the dashboard and it would be already open.)

I suppose since it's not kept in memory, it reduces some of the 'you have reached 90% memory' issues that plague me when I program on the laptop, but sometimes I need to quickly make tests and turn on and off collision groups while coding and this implementation slows me down considerably.

At the *very* least, at least let it remember the last 'tab' you had selected in the current session.  If I closed it on attributes, please make it bring attributes up the next time I bring it up (sometimes I change numbers to test stuff) and same with collision groups.

7
Resolved Questions / [solved] "Origin Point" and actor position
« on: June 04, 2012, 10:05:19 am »
I'm having some trouble with the origin point feature and maybe I'm misunderstanding it's use. 

I'm presuming that this feature is the 'origin point' from where the image is drawn, and that when rotated it rotates around this point.  IE for example if it were the elbow of an arm it would extend out past the elbow.

Basically what I'm trying to do is set the x,y of the actors where they touch the ground (Origin Point:  Bottom Centre) and draw them 'up' from there.  (I'm using a somewhat Isometric screen view so actors overlap and I have the drawing order stuff already figured out.)  The problem is that all my tests seem to indicate that they are being still drawn from the top left corner.  I'll attach a screenshot that shows my current actors being drawn and then a red 'dot' showing where their x/y is.  As you can see, even though they are set to bottom centre they are still being drawn from the top left.

Is this the intended behaviour and I've misunderstood, or am I doing something else incorrectly!?  Do I really have to code in offsets for drawing for all of this rather than just setting the origin point in stencyl's GUI?  (for some actors it won't be a simple "-(width/2), -height" like it is for this one)

Also, could someone enlighten me as to the difference between "x", "x (on screen)" and "x (centre)".

I presume "x" is from the top left of the SCENE, "x (on screen)" is from the top left of the screen (which would be why I don't see a difference because my scene and screen size are the same).

if that's correct then I guess I just need to know if x (centre) is screen or scene relative.

8
There seems to be extra space added just before a new comment block, but this space isn't accounted for in the height of the png.  This causes blocks at the bottom to get cut off.

The image I have here is when I noticed it, it's only 1/2 cut off.  The other one that I deleted the bottom block was completely cut off, you can see it in my first post to this thread;

http://community.stencyl.com/index.php/topic,10798.0.html

9
Archives / Custom Callable Draw Block
« on: May 19, 2012, 10:05:33 am »
I've been tweaking greg's Layer manager for a project I'm working on, and one of my problems is that sometimes I need to draw effects on my actors.  Because all the drawing is done on the layer manager itself, and not in the actor's base 'when drawing' it becomes off if I set stuff in the actor's when drawing.

I attempted to create a custom block that the layer manager would call, but then all the 'draw' blocks get disabled.   I tried copying over the code for them instead, but that didn't work as expected.

I'd like to be able to create a custom block, use all the drawing blocks, and then have the layer manager check;  (This is pseudo code, not the correct block names)
 'If <has behavour 'custom drawing'> and <attribute 'draw custom boolean' in behavour 'custom drawing'> then
  [Call the custom drawing block]
otherwise
  [Draw the actor]

This way the actors still handle their own drawing, but are drawn in the correct order as determined by the layer manager.  (This way I can also have stuff drawn under and over them.  My current implementation cycles through them all to draw shadows, and then cycles through them all again to draw the actors above the shadows, otherwise there's weirdness when the shadows are sometimes on top of actors!)

10
Archives / Unit conversion blocks
« on: May 19, 2012, 09:41:37 am »
I think it would be handy for young programmers (and some of us oldbies that are just lazy) to have unit conversion blocks.  I could see these blocks as having a 'drop down' so you could select the measurments you need.

While I know a developer could look this information up, having it handy in the math section would be fabulous.

Some examples;
Distances
Would have drop-downs for centemeters, inches, feet, yards, meteres, kilometers and miles, so you could do things like "Convert X centemeters to feet" or even "convert x inches to yards" for those of us that grew up on metric and don't know how to do this in our heads.

Time
Convert x hours to seconds.  Etc.  Would be great to use in time blocks when you have to do it in seconds and it's in other werdness.

I posted a bug in the bugs section (which spawned this idea) where StepSize is in milliseconds, not in seconds.  Using [Convert [1000xStepSize] milliseconds to seconds] could be handy.

Volume and Temperature
Much less important for most flash use, but I have no idea how many ounces are in a cup, and how many cups are in a US Litre (being raised on metric)

Likewise converting between Celcius, Fahrenheit and Kelvin could be useful for some projects, especially when localizing a game so that the information is understood whichever the end user is accustomed to seeing a given temperature displayed.

11
Looking at the help documentation for 'step size', there is an error in the documentation and also the way it actually works in-game does not seem to match.

http://static.stencyl.com/pedia2/blocks/flow/flow_advanced/Constants.html

In the step-size example, it shows a [do every x seconds] block inside of an [always] block, which as we know will keep creating a new do [every x seconds] each frame.

Creating this in Stencyl to confirm this, I discovered that Step Size is actually set to 10, not 0.01 like the documentation would have you believe (once every 100 seconds).  Although perhaps Step Size is in milliseconds?

The example in the help file indicates that 1000xStepSize should yield about 10 seconds, however it actually yields 10000 seconds (or 2.77~ hours)

12
There's a few things I'm trying to do for a project that I need to complete by Tuesday for a Trade Show :o

I need to be able to determine if a given point is inside one of the actor's collision boxes (there needs to be two groups, one for 'hit' and one for their weak spot)  Basically I'm making a game where you have to click on enemies and it determines bit of random 'scatter' based on the accuracy of the spell and character.

Second, I need to be able to determine if any actor on a 'line' is hit.  One of the spells I'm making targets an actor, but continues all the way through, hitting any actors it comes in contact with.  Not sure the best way to handle this and keep consistant with the collision detection boxes.  (Peferably, the line won't be exactly straight either, since it's a bolt of electricity and I'd like to have it waver a bit)

any ideas?

13
I am a little confused by the inclusion of other actors Custom Blocks (not Global Custom Blocks) in the Custom section without any way to specify which actor/behaviour they are supposed to be performed on.

It seems to me that you need to add 'for [Actor]' to the Custom Blocks in order for them to work properly for other actors.  It would naturally default to 'for [Self]'

I recognize what I'm proposing here can also be handled by events, but blocks are more intuitive I think with this change :)

14
I am soon going to have both a desktop and a laptop for developing games.  I intend to use the desktop while at home and the laptop while away.  What is the best way to make sure the project is up-to-date when I switch computers?

Looking forward, what is the best way for 2 developers working at different computers to work on the same project.  Is there any way to 'share' the project so that they can be doing actors, code and scenes simultaneously and have the results update back and forth, or would one have to manually copy the files over?

(The first question is MUCH more important than the 2nd, please don't answer the 2nd and leave the first unanswered -thanks!)

15
Resolved Questions / [Solved] Preview Security Errors
« on: December 22, 2011, 06:32:43 am »
I'm trying to install GamerSafe's API into my project and it's coming up with a global security error.  I followed the steps on the settings page, and added "D:\Program%20Files\StencylWorks\preview\Game.swf" to my allowed sites.  Despite that, it still comes up with the same error.

Is there something else I have to do to allow my third party APIs to communicate with their servers when testing projects locally?

Pages: 1 2