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

Pages: 1 2
1
Ask a Question / Get an actor friction
« on: April 24, 2012, 05:38:28 pm »
Simple question, I tried to find it, quickly, in the API doc, did not find it, don't know if it exist.

I would like to know the code or function to get the current friction for an actor to use in a codeblock in a behavior. There's a setFriction function... I did not find a getFriction or did not know how to use it.

Thanks in advance

2
Ask a Question / Re: A simpler way to make a laser beam
« on: August 01, 2011, 04:27:22 pm »
Well, I doN,t know how you do you level design, but a terribly easy way to make your beam "appear" the same height as the highest tile, is to use layers. Put or create the beam layer on the back, and make the tiles and actor above. That way, your beam will always appear as it stops when a tile is there. Of course, if you have level where there's tunnel and you seem between the floor, that's another issue.

Another way would be to create a "beam-bottom" actor, and make it slide down until it it a tile or anything you want it to stop, and at the same time, create a region the size you want starting from that actor, with a variable size... so if your tiles are 32x32, each time you beam-bottom actor goes down 1 tile, you increase and change the position of your region by 32 pixel too.

Then for animation, if you want a simple color thing for the beam, you can create a rectangle on that region. If you need the entire beam to be an actor, it might be more complex.

3
Ask a Question / Re: Having trouble triggering an actor
« on: July 29, 2011, 06:32:56 pm »
It works anywhere in the scene because your dispenser is colliding with tiles (probably.) or another actor. Then, because it is colliding, it run the blocks inside the "When colliding".

You need to run the routine in your "when this collides" ONLY if the group of the colliding actor is equal to what you need, in your case the player. You could do on IF block to check the group of the actor. Then another IF within that one, and check the key press in there. AN AND statement in 1 IF block should also works.

You already have an IF above, but the problem in it is that you check THIS actor colliding shape, and not the COLLIDING's ACTOR group.

4
Archives / Re: index of [anything] in [list]
« on: July 27, 2011, 09:17:15 am »
I think in As3 the right thing to do would be to do a custom block using the indexOf function, use your list attribute (thats the same as saying use your array variable). I might try to make one later on after work.

5
Ask a Question / Re: Sensor Collision?
« on: July 27, 2011, 07:34:48 am »
I tried to make an actor sensor, and I could not use the normal "When the top was hit" type of block. It's like a sensor do register a collision event by not producing a response of an obstacle in-game, but it also seems we cnanot use the "sides" detection blocks with a sensor.

In one of my behavior, I had to manually check for the X and Y of the collided actor versus the current actor to determine its position based on the sensor actor.


6
Shared Resources / Actor Collision Messaging (Advanced Messaging)
« on: July 24, 2011, 01:48:13 pm »
Actor Collision Messaging

Resource Type: Behavior
Version: 1.0
Category: Collision
To get it: Simply search StencylForge:Behaviors for the title of the resource
Author: Dubealex

Play a demo now
Youtube video


WHAT IT DOES:
This behavior attach to an actor to allow you to manage advanced messaging based on collision shape group. The main feautures are:

* Send message to itself
* Send message to the colliding actor
* Send message to the scene
* Modify an attribute on itself
* Modify an attribute on the colliding actor
* Advanced messaging with conditions. You choose which group on the current and colliding actor need to collide for the message to be sent.
* Can send multiple message or modify multiple attributes using lists

7
Shared Resources / Re: Actor Visibility Switcher (And more !)
« on: July 24, 2011, 01:44:34 pm »
Thanks !

I'm working on releasing all the behavior I've made, and I've made quiet a few.

8
I did not try that low.

But I did find something that works. And this tells me the bug should be about meta data of some sort within the MP3 files, besides the actual music.

I opened "Battle of the bits", the one that was working, in my audio software.
I then deleted the content, pasted in the music from another that wasn't workin. Saved that file, and the game exported OK, and the loop was OK.

So, I put the music data of a bad file within another that is working, and it works. It's a workaround for me now, but maybe there's someting to look at in the future in the engine ? Sure look like a bug to me.

9
I tested many different music file, and even when the file has all the supported format, many caused stencyl to not be able to export the SWF, with the error "Cannot write file".

It is really because of the music file, since when I change or remove it, it works.

Also, I tried with 2 different files, with the same specs:

- 44100 Khz
- 64 kbps constant (not vbr)
- stereo

I have many files that doesn't work, and others that do. I have no idea why. Maybe some sort of meta data within the file ?

Also, another bug that exist that I found with music file, is that some won't loop correctly. They will play, and restart in the middle of the song, and it is not the BGM behavior, when I change to any song with the same lengh, it can work. Also, it works when I test play the game via the stencyl sandbox, but when the game is exported, it doesn't work.

Also, the "Cannot write SWF" is also ONLY when I export the game. Stencyl can playtest the game via its sandbox without any problem.

Also, I tested this within many diffirent projects, and some project from strach, still the same problem.

I uploaded 3 music file.

"Ice Frontier" has a loop that cut, when exported, will restart in the middle of the song.
"Flowing Melodies" will cause the "Cannot export/Cannot write SWF" error when exported.
"battle of the Bits" works in all cases.

All 3 have been saved from the same application, they are the same specs.

10
Shared Resources / Actor Visibility Switcher (And more !)
« on: July 23, 2011, 05:21:29 pm »
Actor Visibility Switcher

Resource Type: Behavior
Version: 2.0
Category: Collision
To get it: Simply search StencylForge:Behaviors for the title of the resource
Author: Dubealex
Special Thanks To: Infection, for the basic idea and need for it

Play a demo now
Youtube video


WHAT IT DOES:
This behavior attach to an actor to allow you to manage its visibility, and if you set your actor right with sensor, you can also manage their passability. You can do a lot of things with this, and there's a lot of attribute you can play with to do almost anything you need. Here's the main features of the behavior:

* Choose amongs 6 different visibility modes
* Make visibility state permanent across scene
* Make visibility alternate between visible and invisible, Cycle Mode
* Choose the time delay you want for the invisible and visible switch
* Choose which sides will trigger a visibility changes
* Sound effects options
* Spawn another actor when it becomes visible and/or visible
* Messaging system to send messages to anything and also change actor attributes



11
Resolved Questions / Re: cant test or publish my game
« on: July 19, 2011, 03:38:08 pm »
This can happens for many reasons, corrupte dbehaviors or song. The forst thing you can try, is to rmeove your music file if any from your resosurces, and try again. If it works then without music, you know were to start

12
Ask a Question / Re: How do I refer to another actor
« on: July 19, 2011, 06:04:08 am »
You could also have created a code block to access the actor ID, which is unique in the scene.

I created a custom block that return the ID of an actor, which you could use in the For Each Actor In Region blocks to store those IDs in a actorCache list (which is an array of actor IDs.)


13
Thanks again, it worked. I did a custom behavior to see it as a list.

14
Ask a Question / Re: Global variables
« on: July 17, 2011, 09:37:09 pm »
Global Variables are Game Attributes

15
Thanks!, I'll try looking into those

Pages: 1 2