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

Pages: 1 2 3 4
1
Fixed Bugs (3.x) / Re: Joystick stays in screen [NEED SAMPLE]
« on: January 24, 2013, 04:49:35 pm »
This is how you replicate it:

You have a "play" button in the first scene which leads you to the 2nd scene.

In the 2nd scene u have joystick 1 enabled that is shown where pressed.

In that same 2nd scene, you have a "reload" button, which reloads the scene, and "back" button, which goes back to the main menu (scene 1).

You should see the bug when you press one of those buttons.

Sorry I'm on my iPhone so I didn't attach a sample

2
Extension Ideas / Re: Question about Flash Extension
« on: January 08, 2013, 12:43:24 pm »
Hm, I don't know either, haven't worked with extensions yet. Did you manage to import the classes of the other API?

Strangely enough I tried 3 different API, 2 swf libraries and 1 .hx type, with the following results:
The class imported correctly for 1 of the swfs
But the other 2 APIs had problems importing -- specifically the classes were not being found even though I was placing the library/.hx in the same folder. However, when I moved the .hx for 1 of the APIs outside the extension folder and into its own folder, it started importing correctly. I think this might've had to do with the classpath inside the include of that extension. Nevertheless, I still don't know how to import the classes correctly when they're in the same folder as the extension because it says they're not found. I have to experiment a little more with this classpath stuff.

**EDIT: I see that for 1 swf api that was not working, when I finally accessed the classes, testing the game gave me a big white swf. So I don't think its API is suitable for stencyl.

3
Extension Ideas / Re: Question about Flash Extension
« on: January 07, 2013, 03:17:17 pm »
If you already made an extension for the library.swf, then you need to call it with haxe.

I think this should work (just uppercase Void, and Array<Score> instead of Vector.Score)
Code: [Select]
Blocked.loadScores("blocked", TimeScope.ALL_TIME,
                function onComplete(scores:Array<Score>):Void {
                    trace("retrieved " + scores.length + " scores");
                }, function onError(error:String):Void {
                    trace("error loading scores: " + error);
                });
You probably need some imports as well for Blocked and TimeScope.

Ok I'm trying to import the package and its classes but it says class not found and it just gives me random errors.

Ah whatever, thanks for your help anyway.

**EDIT: I don't see what I'm doing wrong. I tried it in Flash and it worked, I tried a different API in Stencyl and it also worked, but this API doesn't seem to work.

4
Extension Ideas / Re: Question about Flash Extension
« on: January 07, 2013, 02:34:38 pm »
I think what you have to do is to add the AS3 code in an engine extension http://community.stencyl.com/index.php/topic,14985.0.html
Then you can call it with haXe code, or you can add blocks in the extension.

But the AS3 code I'm calling is from the library.swf (the leaderboard api), so it's already an extension.

This is what I'm trying to achieve:
Quote
Rename/Edit TestFlash.hx to meet your needs. If you don’t want or need a source file, you can safely delete it and call the SWF’s stuff directly from the game.
as Jon said.

But are you trying to say this?:

*my engine extension is AS3
*i have to call it in the game using haxe (right now I'm calling it using AS3)

5
Extension Ideas / Question about Flash Extension [QUESTION]
« on: January 07, 2013, 02:27:07 pm »
I downloaded a leaderboard system SDK (its a SWC) and like the instructions said, I extracted the SWF from it and this is what my extension looks like (see attachment #1). Yes, it's enabled in my game.

However, when I try to use the API code directly in the game, it gives me these errors:
Code: [Select]
Scores Button (54) -  Unexpected <
Scores Button (54) -  Unexpected <
Scores Button (54) -  Unexpected <
Scores Button (54) -  Unexpected <

It's coming from this API code I called (its AS3):
Code: [Select]
//Load scores
Blocked.loadScores("blocked", TimeScope.ALL_TIME,
                function onComplete(scores:Vector.<Score>):void {
                    trace("retrieved " + scores.length + " scores");
                }, function onError(error:String):void {
                    trace("error loading scores: " + error);
                });
(also see attachment #2)

And If I change Vector.<Score> into haxe (which becomes Array<Score>), it gives me other errors like unexpected { and stuff like that. And if I change those, it'll give me another error like Unknown identifier.

Question #1: Do I have to convert the AS3 code snippets I placed inside the game into haxe?

Question #2: If not, what's going on?

6
Fixed Bugs (3.x) / Re: Parallax background cuts-off on Windows?
« on: November 19, 2012, 02:37:08 pm »
A test game is still desired for the new problem. Thanks.

Here you go.

Thanks.

7
Fixed Bugs (3.x) / Re: Mouse Press doesn't work sometimes?
« on: November 18, 2012, 01:02:10 pm »
Test game needed for this.

I'm sorry I just realized the reason why it was doing this is because I had an "IF on screen" statement which was sometimes not allowing it to kill itself.

I've changed the topic now to another problem.

8
Fixed Bugs (3.x) / [BG] Parallax background cuts-off on Windows?
« on: November 17, 2012, 02:33:28 pm »
On Mac, the full 1280 x 2880 background was in parallax fine, but once I imported my game on Windows, it started cutting a part of it off, so now it looks like this: (see attachment).

What's up with that?

9
Shared Resources / Re: An accurate tweening method.
« on: October 21, 2012, 04:25:43 pm »
I don't know why it's not working. You can take a look if you would like (see attachment).

If you import my attached "game", what you do is when you test it in flash, you click on the letter "R" and a letter "E" spawns which you must drag onto the region.

Check the attached file. I think that's what you were looking for.

Wow, thank you! Oh no wonder, it was moving the actor based on its top left origin right?? While I was automatically assuming it had a center origin.

10
Shared Resources / Re: An accurate tweening method.
« on: October 21, 2012, 02:44:45 pm »
The reason why I'm not using the "slide" block is because its not tweeting correctly. I set it to tween to the x-center and y-center of the region (I'm trying to get the actor to tween to the center of the region), but it's going to the bottom right corner instead! Is that an error on my part or is it the "slide" block that's doing that?

That's weird, it should work... I made a test and the slide block works fine for me... The actor goes to the region center. Perhaps your region is not in the right place.

I don't know why it's not working. You can take a look if you would like (see attachment).

If you import my attached "game", what you do is when you test it in flash, you click on the letter "R" and a letter "E" spawns which you must drag onto the region.

11
Shared Resources / Re: An accurate tweening method.
« on: October 21, 2012, 06:07:38 am »
As I explained in my previous post, you need to disable physics for the actor you want to tween... and once you have disabled physics, the actor can't be detected by a region. Regions can't detect lightweight actors. However, there are many ways to solve this, but each case is different.

What I do is to kill the solid actor and create a lightweight actor in the same place, and the tween it. That works for me. If you want to keep the physics for the actor, you could
-Use the "slide" block (I don't know why you decide to not use it)
-Use a "push" block.
-Kill the physics actor, create a lightweight actor, and then create the physics actor again when the tween is over.
-Create an invisible lightweight actor from your physics actor's behavior and set it to follow the lightweight one:
Code: [Select]
   when created
       create blankActor at (x/y: x/y of self)
       set myLightweight to [Last Created Actor]
   always
       set x/y to [x/y of myLightweight] for self
... and then you can tween myLightweight whenever you need to.

Those are some possible solutions, although I'm sure there are better ones.

You can't tween or change an actor's coordinates unless it's a lightweight one. For example if you add a code block in "always" with "actor.x += 1;" you would expect the actor to move to the right at a constant speed... but Stencyl doesn't let you to handle some of the actor's properties to avoid some issues. That's why it uses a "setX()" method. However if you use the same code with a lightweight actor, it will move to the right as you expected.

Oooh ok thanks!

The reason why I'm not using the "slide" block is because its not tweeting correctly. I set it to tween to the x-center and y-center of the region (I'm trying to get the actor to tween to the center of the region), but it's going to the bottom right corner instead! Is that an error on my part or is it the "slide" block that's doing that?

12
Shared Resources / Re: An accurate tweening method.
« on: October 20, 2012, 05:00:59 pm »
How would I translate this block into the custom code? :

Quote
[for each (actor inside region) (box 1)]
--> [slide (actor inside region) to (x: x-center of box1) (y: y-center of box1 ) over (0.5) sec using (none)]

I tried doing this, but it didn't work:

Code: [Select]
Tweener.addTween(actorInRegion, {x:_box1.getXCenter(), time:30, transition:"linear", useFrames:true});
Tweener.addTween(actorInRegion, {y:_box1.getYCenter(), time:30, transition:"linear", useFrames:true});


13
I think it's a great idea. Many may disagree with me, but I think it will most likely bring peace around the world.

Petition Link: http://wh.gov/WhJy

Oh and just a note: if you disagree with any aspect of this, please do not vent your anger. Let's keep the peace in the Stencyl Community. =)

14
Completed / Re: So how does iOS Text Input work now?
« on: September 27, 2012, 02:38:59 pm »
It's probably easiest to wait for a text field behavior to be written up. NME has some built in support but the appearance isn't so good.

I see. Okay thanks.

15
Completed / So how does iOS Text Input work now? [Will arrive later]
« on: September 25, 2012, 03:32:01 pm »
Can anyone give me an idea? How do we make an input field for the new keyboard block?

Helloo? I'm clueless aside from captaincomic's gui widgets kit, which seems rather fake and complex. No offense, it's a good kit...But we need something a little more realistic.

Pages: 1 2 3 4