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

Pages: 1
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
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

3
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.

4
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



5
Okay, I am currently trying to find a solution for this, maybe the only way is via code blocks, but I'm posting this in case somebody already have a solution:

First of all:
I have no problem when using the game attribute of type list directly, of course. My problem is when I create a behavior attribute of type game attribute, so the user can choose a game attribute he created that is of type list to store the IDs.

The situation:
I need a game attribute to store permanent changes for some actors, values are state ID varying from 1 to 7. So the game attribute is a list. I create a behavior attribute of type Game Attribute. Now, I need to be able to use that behavior attribute in the LIST blocks, but I can't, since stencyl don't see it as a list.

If there would be a "Anything as list" or a "Threat as list" block, all this would be easy.
I tried creating a hidden behavior attribute of type list, and storing the behavior attribute of type game attribute in it, but it is the same problem that stencyl don't see this attribute as a list and I can't make it see it as one.

A solution?:
Any ways to make a behavior attribute of type Game Attribute be seen as a list ?


6
Hi.
There's 2 of my custom behavior in which I create region from where I would need to remove those regions once they aren't needed anymore, unless you tell me I can have many regions floating there in the scene without any performance hit.

I was able to found the code to create circular region from the API doc, which is:
Code: [Select]
createCircularRegion(x, y, radius);
But I did not spot any "easy" way to actually removing a region after I created it. The only thing I found in the API doc about that is this:
Code: [Select]
removeRegion () method
public function removeRegion(ID:int):void

Parameters
ID:int

Found in GameState.

If it is the way I'm supposed to remove a region, how am I supposed to get the ID for the region I created ? Is there a "getID by objectName" thing ?

Anyway, any help is appreciated, thanks.

7
Windows / Mac / Flash / HTML5 / Blockz
« on: June 26, 2011, 12:03:50 pm »
A work in progress, 2 tutorial level done.

About the game:
It's a puzzler game revolving around blocks, but set in an action platformer environment, so you solve puzzle, but also jump from place to place and kill ennemies as you go. There's alot of different type of blocks and skills you can use throughout the game, and you will find power-ups and be able to buy items such as bombs with coins hidden in each levels. In a nutshell: This game will rock !

You can play it here:
http://www.stencyl.com/game/play/3700

Updates:
I fixed a bug with collision in small places, I was able to reproduce the bug at the beggining of level 1-2 when you could not push the 2 block column anymore. This is now fixed, and as a result, the game was also updated to make block fall more easily into small holes, even at full speed.

So...

*Bug with block collision in small spaces fixed. i.e: Problem with block column at the start of level 1-2 is fixed
*Block now fall easily into small holes, even when you are going fast, no need to slow to a crawl anymore to make those fall in

8
The Problem in a nutshell:
I have a problem with collisions, and so far, with everything I tried, it seems to be a problem with 2 actors being set to "Cannot be pushed", and one is moving into another, and they don't collide. But if I set any of the two to "Normal" physic setting, the collision works.

The situation:
- I have a canon who is firing a bullet.
- I have a bullet actor that is created by the canon, a velocity is set, and it travels
- The bullet have "Cannot be pushed" setting in physics, and have the right collision group to
collide with blocks, from the blocks collision group

- I have 2 blocks, one blue, and one red.
- Both blocks are identical except for 1 setting: The physic setting about "Normal" and "Cannot be pushed". They have same behaviors, same collision grid, same size, same collision group, etc

- The blue block physics is set to normal, so it fall when what's underneath is destroyed.
* The blue block gets hit by the bullet fine

- The red block physics is set to "Cannot be pushed", so it is static in the game worls, and the player
cannot move it around
* The red block doesn't collide with the bullet. The bullet passes right through it.

What I Did:
When I change 1 simple setting on the red block, it works. When I set the red block to physics "Normal", it get hit by the bullet just as the blue block. As soon as I set it to "Cannot be pushed", it stop working.

I tried changing the bullets settings, but if the bullet is on any other settings except "Cannot be pushed", it doesn't travels at all in the game screen, and I don't want the player to have an impact on the bullet, I want the bullet to have an impact on the player, so that "Cannot be pushed" need to stay on both actor: The red block and the bullet.

I also tried disabling all the behaviors from the bullet and red block, still the same problem.

I think there is a problem with 2 actor being "Cannot be pushed"... They should still collide, they just won't receive momentum from anything in the game world, at least that's what I understood from the test I made and what is written in stencyl.


Pages: 1