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

Pages: 1 ... 3 4 5
61
Resolved Questions / Width/Height of Actor Type?
« on: December 16, 2011, 02:13:32 am »
Hi!

Is it possible to get the width and height of an Actor Type without/before creating an actor of this type? I think it has to be possible, because the actor is created from the actor type, so the information should be there somewhere.

I don't mind if it's only possible with code. I looked at the API, ActorType has a spriteID, and Sprite has width and height, but I don't know how to use the spriteID to get an instance of Sprite?

Of course I could just create an actor of the actor type get the width/height and then kill it, but I was looking for a more elegant solution (I fear creating an actor could have unwanted side effects if there is something in the "when created" block)




62
Old Bugs (1.x/2.x) / Cannot Test / Export in 1.3.0 (Linux)
« on: December 12, 2011, 09:33:48 am »
I downloaded version 1.3.0 and now I cannot test or export my games.

Here is the the beginning of the log:
Code: [Select]
[LOG] Action: Test Game in Flash...
[ERR] Possibly copying over files.
[LOG] Save in place.
[LOG] Writing out local resources.

and this is the end:
Code: [Select]
[LOG] Spawn Actor is clean (on disk and already copied). Skip.
[LOG] Health is clean (on disk and already copied). Skip.
[LOG] Full Screen is clean (on disk and already copied). Skip.
[LOG] Do When Colliding is clean (on disk and already copied). Skip.
[LOG] Debug Drawing is clean (on disk and already copied). Skip.
[LOG] Play Sound is clean (on disk and already copied). Skip.
[LOG] Change Game Speed is clean (on disk and already copied). Skip.
[LOG] Spawn Spreading Actors is clean (on disk and already copied). Skip.
[LOG] Flixel Pause and Mute is clean (on disk and already copied). Skip.
[LOG] Deals Custom Damage is clean (on disk and already copied). Skip.
[LOG] Scene Do When Created After Delay is clean (on disk and already copied). Skip.
[LOG] Scene Do Randomly is clean (on disk and already copied). Skip.
[LOG] Scene Do Periodically is clean (on disk and already copied). Skip.
[LOG] Scene Play Sound is clean (on disk and already copied). Skip.
[LOG] Tell Scene is clean (on disk and already copied). Skip.
[LOG] Show Text at Screen Center is clean (on disk and already copied). Skip.
[LOG] Scene Do When No Actor in Group Alive is clean (on disk and already copied). Skip.
[LOG] Show Text is clean (on disk and already copied). Skip.
[LOG] Face Direction of Motion is clean (on disk and already copied). Skip.
[LOG] Background Scroll Speed is clean (on disk and already copied). Skip.
[LOG] Do Randomly is clean (on disk and already copied). Skip.
[LOG] Change Direction is clean (on disk and already copied). Skip.
[LOG] Load is clean (on disk and already copied). Skip.
[LOG] Save is clean (on disk and already copied). Skip.
[LOG] Hide Mouse Cursor is clean (on disk and already copied). Skip.
[LOG] Do When Colliding with Actor in Group is clean (on disk and already copied). Skip.
[LOG] Do When Colliding with Actor of Type is clean (on disk and already copied). Skip.
[LOG] Debug Messages on Screen is clean (on disk and already copied). Skip.
[LOG] Do After Delay is clean (on disk and already copied). Skip.
[LOG] Scene Do When No Actor of Type Alive is clean (on disk and already copied). Skip.
[LOG] 8 Way Movement is clean (on disk and already copied). Skip.
[LOG] 4 Way Movement is clean (on disk and already copied). Skip.
[LOG] 4 Way Player Movement is clean (on disk and already copied). Skip.
[LOG] Show on Minimap is clean (on disk and already copied). Skip.
[LOG] Minimap is clean (on disk and already copied). Skip.
[LOG] Set Random Speed and Direction is clean (on disk and already copied). Skip.
[LOG] Minimap Copy Screen is clean (on disk and already copied). Skip.
[LOG] Scene Do After Random Delay is clean (on disk and already copied). Skip.
[LOG] Actor Reload Scene is clean (on disk and already copied). Skip.
[LOG] Actor Switch Scene is clean (on disk and already copied). Skip.
[LOG] Do When Created After Random Delay is clean (on disk and already copied). Skip.
[LOG] Scene Do After Delay is clean (on disk and already copied). Skip.
[LOG] Do After Random Delay is clean (on disk and already copied). Skip.
[LOG] Scene Do When Created After Random Delay is clean (on disk and already copied). Skip.
[LOG] Show Grid is clean (on disk and already copied). Skip.
[LOG] Scene Spawn Actor is clean (on disk and already copied). Skip.
[LOG] Drop Shadow away from Lightsource is clean (on disk and already copied). Skip.
[LOG] Actor ID is clean (on disk and already copied). Skip.
[LOG] Cannot Exit Screen is clean (on disk and already copied). Skip.
[LOG] Spawn Moving Actor is clean (on disk and already copied). Skip.
[LOG] Shadow Manager is clean (on disk and already copied). Skip.
[LOG] Description is clean (on disk and already copied). Skip.
[LOG] Drag and Drop is clean (on disk and already copied). Skip.
[LOG] Scene Do on Key Events is clean (on disk and already copied). Skip.
[LOG] Do on Mouse Over is clean (on disk and already copied). Skip.
[LOG] Do on Key Events is clean (on disk and already copied). Skip.
[LOG] Screen Flash is clean (on disk and already copied). Skip.
[LOG] Apply Effect is clean (on disk and already copied). Skip.
[LOG] Switch Scene is clean (on disk and already copied). Skip.
[LOG] Explode to Actors of Type is clean (on disk and already copied). Skip.
[LOG] Grow is clean (on disk and already copied). Skip.
[LOG] Fade is clean (on disk and already copied). Skip.
[LOG] Update Shadow with Lightsource is clean (on disk and already copied). Skip.
[LOG] Reload Scene is clean (on disk and already copied). Skip.
[LOG] Screen Shake is clean (on disk and already copied). Skip.
[LOG] Scene Do When Created is clean (on disk and already copied). Skip.
[LOG] Bevel is clean (on disk and already copied). Skip.
[LOG] Displacement is clean (on disk and already copied). Skip.
[LOG] Glow is clean (on disk and already copied). Skip.
[LOG] Drop Shadow is clean (on disk and already copied). Skip.
[LOG] Explode to Fragments is clean (on disk and already copied). Skip.
[LOG] Blur is clean (on disk and already copied). Skip.
[LOG] Screen Blur is clean (on disk and already copied). Skip.
[LOG] Example Displacement Loop is clean (on disk and already copied). Skip.
[LOG] Set Speed and Direction is clean (on disk and already copied). Skip.
[LOG] Screen Displacement is clean (on disk and already copied). Skip.
[LOG] Switch Animation is clean (on disk and already copied). Skip.
[LOG] Offscreen Bounds is clean (on disk and already copied). Skip.
[LOG] Anchor is clean (on disk and already copied). Skip.
[LOG] Movement with Acceleration is clean (on disk and already copied). Skip.
[LOG] Simple Movement is clean (on disk and already copied). Skip.
[LOG] Draw Orientation is clean (on disk and already copied). Skip.
[LOG] Animations Based on Direction is clean (on disk and already copied). Skip.
[LOG] Animations Based on Speed is clean (on disk and already copied). Skip.
[LOG] Cannot Exit Scene is clean (on disk and already copied). Skip.
[LOG] Always Simulate is clean (on disk and already copied). Skip.
[LOG] Camera Follow Actor is clean (on disk and already copied). Skip.
[LOG] Do When Off Screen is clean (on disk and already copied). Skip.
[LOG] Scene Do on Mouse Over is clean (on disk and already copied). Skip.
[LOG] Scene Do on Mouse Events is clean (on disk and already copied). Skip.
[LOG] Control Box Behavior is clean (on disk and already copied). Skip.
[LOG] Die After Animation is clean (on disk and already copied). Skip.
[LOG] Die When Off Screen is clean (on disk and already copied). Skip.
[LOG] Die is clean (on disk and already copied). Skip.
[LOG] Scene Loop Sound is clean (on disk and already copied). Skip.
[LOG] Die When Colliding is clean (on disk and already copied). Skip.
[LOG] Debug Messages is clean (on disk and already copied). Skip.
[LOG] Do When Created After Delay is clean (on disk and already copied). Skip.
[LOG] Do on Mouse Events is clean (on disk and already copied). Skip.
[LOG] Do Periodically is clean (on disk and already copied). Skip.
[LOG] Do When Created is clean (on disk and already copied). Skip.
[LOG] Done writing game.
[LOG] Num Files: 35
[LOG] Num Scene Files: 18
[LOG] Write String out as file to: /home/dario/Work/stencyl/stencylworks/preview/scripts/StencylMain.as
[LOG] Write String out as file to: /home/dario/Work/stencyl/stencylworks/preview/scripts/MyAssets.as
[LOG] Copy file from: /tmp/stencyl2382979611987296838/sandbox/test/temp/game.xml to: /home/dario/Work/stencyl/stencylworks/preview/game/game.xml
[LOG] Copy file from: /tmp/stencyl2382979611987296838/sandbox/test/temp/resources/data.xml to: /home/dario/Work/stencyl/stencylworks/preview/game/resources.xml
[LOG] Copy file from: /tmp/stencyl2382979611987296838/sandbox/test/temp/scenes/scenes.xml to: /home/dario/Work/stencyl/stencylworks/preview/game/scenes.xml
[LOG] Copy file from: /tmp/stencyl2382979611987296838/sandbox/test/temp/snippets/list.xml to: /home/dario/Work/stencyl/stencylworks/preview/game/behaviors.xml
[LOG] Copy file from: /tmp/stencyl2382979611987296838/sandbox/test/temp/preloader.png to: /home/dario/Work/stencyl/stencylworks/preview/game/preloader.png
[LOG] Copy directory from: /tmp/stencyl2382979611987296838/sandbox/test/temp/snippets to: /home/dario/Work/stencyl/stencylworks/preview/scripts
[LOG] Copy Duration: 80
[LOG] Copy directory from: /tmp/stencyl2382979611987296838/sandbox/test/temp/resources to: /home/dario/Work/stencyl/stencylworks/preview/game/resources
[LOG] Copy Duration: 8
[LOG] Copy directory from: /tmp/stencyl2382979611987296838/sandbox/test/temp/scenes to: /home/dario/Work/stencyl/stencylworks/preview/game/scenes
[LOG] Copy Duration: 3
[LOG] doFlashPreview: blockCall: false
[LOG] Loading configuration file /opt/StencylWorks-1.3.0/ext-tools/flex/frameworks/flex-config.xml
[LOG] unable to load SWC ._flex.swc
[LOG] Total Time Taken for Preview: 0.128 seconds
[LOG] PREVIEW FAILED

I cut the middle of the log, because otherwise I could not post (the message would exceed 20000 characters ^^) If you need the complete log I can post it as attachment...

It says "unable to load SWC ._flex.swc", so I looked for the file.

It's there and the permissions should be fine.
Code: [Select]
/opt/StencylWorks-1.3.0/ext-tools/flex/frameworks/libs/._flex.swc
Thanks for any help!


63
Ask a Question / Events in StencylWorks 2.0?
« on: December 12, 2011, 03:00:30 am »
I read on the roadmap that stencylworks 2.0 is coming soon, and that it will have "Events".
I'm curious now :) what will these Events be? Maybe something similar as messaging (tell-when this hears)?

I know stencylworks 1.3 has just been released, so it still might be a while until 2.0 is coming... (Or is there any info on when it's going to be released)


64
Old Bugs (1.x/2.x) / Trigonometric Function Documentation
« on: December 01, 2011, 05:03:20 am »
The trigonometric function sin/cos/... take radians as parameter.
In the help section it says nothing about it, but gives a misleading example using degrees.

65
Ask a Question / Recycle when Off Screen Problem
« on: November 29, 2011, 06:13:00 am »
Hi!

I have noticed something strange.
I have a beahvior to recycle bullets when they go off screen. When a bullet leaves the screen over the top edge or the left edge it gets recycled correctly, but when it leaves the screen over the bottom edge or the right edge it doesn't get recycled. It just disappears with and no code under
Code: [Select]
if (!(actor.isOnScreen())) gets executed.
I set the offscreen bounds to negative values to see whats happening and I print messages in the "Die When Off Screen"-behavior.
The bullets disappear on each side, but the messages only get printed if it leaves top or left.

If I use "always simulate" for the bullet, everything works as expected, the messages get printed
whenever the bullet leaves the offscreen bounds (no matter which direction).

So using "always simulate" is a workaround, but this behavior is still strange, isn't it?

66
I created a behavior for the Drop Shadow Filter (flash.filters.DropShadowFilter), it's on StencylForge in the Eye Candy Pack.
The problem is the shadow gets drawn on the same layer as the actor, and therefore it gets drawn over other actors.

Is it possible to draw on a specific layer in an Actor Behavior using a Code Block in Design Mode?

I found http://www.stencyl.com/help/viewArticle/50, but it says it only applies to Scene Behaviors and also you need to override a function, which is not possible in Design Mode.

Thanks :)

67
Shared Resources / Eye Candy Pack (Stencyl 2.x)
« on: November 21, 2011, 02:45:26 am »
I put together my first resource pack with behaviors written from sratch or adapted from resources found on Forge.

EDIT: Updated description
== captaincomic's comprehensive eye candy pack v1.1 ==

Includes various effects for actors and scenes:

* Apply Effect
(make grayscale, make negative, make sepia, tint, adjust hue, set saturation, adjust brightness)

* Bevel, Blur, Displacement, Drop Shadow, Glow, Screen Displacement, Screen Blur
(uses of various subclasses of flash.filter.BitmapFilter, based on "Glow Filter" by Alexin, converted to Design Mode, added custom Trigger)

* Explode to Fragments
(based on "Exploding Actor" by coleislazy, translated from Code Mode to Design Mode, added custom Trigger)

* Explode to Actors of Type

* Fade, Grow

* Screen Flash
(draw a rectangle covering the screen with custom blend mode, opacity and color)

* Switch Animation

* Switch Scene, Reload Scene
(fade out/in with custom color)

* Update Shadow with Lightsource
(used to change the angle and distance of the Drop Shadow behavior, based on a lightsource actor)

== Instructions ==

1) Many behaviors include a Trigger attribute and a Disable Trigger attribute:

Use the
"tell (Actor) to (Trigger/Disable Trigger) for all behaviors"-block
or the
"tell (Actor) to (Trigger/Disable Trigger) for (Behavior)"-block
to enable/disable the actor effects

Use the
"tell this scene to (Trigger/Disable Trigger) for all behaviors"-block
or the
"tell this scene to (Trigger/Disable Trigger) for (Behavior)"-block
to enable/disable the scene effects

2) Many effects include a Permanent attribute and a Duration attribute:
if you set Permanent to true the effect will stay forever and Duration will be ignored, otherwise the effect ends after Duration seconds

3) Look here http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filters/BitmapFilter.html
under subclasses for information about the attributes of Bevel, Blur, Displacement, Drop Shadow, Glow, Screen Displacement, Screen Blur

4) The Drop Shadow behavior draws the shadow to the same layer as the actor by default. If you want the shadows to be drawn on a layer in the back:
* set the Use Shadow Manager attribute for all Drop Shadow behaviors to true
* create a layer in the back called Shadow Layer
* add the Shadow Manager Behavior to the scene

5) I hope any other attributes are self-explanatory :)

6) Check out the Eye Candy Pack Showcase on StencylForge for an example game (but it's not a game ;))

7) The Effects based on flash.filters.* can be quite performance heavy, especially the screen effects. Use the effects sparingly and make sure not too many effects are enabled at the same time. don't use them for a permanent animation (use an animation instead)

Pages: 1 ... 3 4 5