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

Pages: 1
1
Resolved Questions / Re: How do I change mass during the game?
« on: May 09, 2012, 10:16:48 am »
Got it working! Well, someone else got it working for me.

import Box2DAS.Collision.Shapes.b2MassData;
var massData:b2MassData = new b2MassData();
actor.body.GetMassData(massData);
massData.mass = 10.0;
actor.body.SetMassData(massData);

2
Resolved Questions / Re: How do I change mass during the game?
« on: May 09, 2012, 09:43:05 am »
Thanks for posting this Alexin! I tried using this code but am getting syntax errors. I wish I knew how to fix them, but I am 100% unfamiliar with actionscript. Can you/anyone else help?

Behavior: Design_61_61_GrowandShrink at line 39
Syntax error: expected a definition keyword (such as function) after attribute b2MassData, not massData.
b2MassData massData = new b2MassData();

Behavior: Design_61_61_GrowandShrink at line 39
Syntax error: expecting rightbrace before semicolon.
b2MassData massData = new b2MassData();

3
I'd like to second this request. I have an actor that gets heavier and lighter at certain points in the game, and I'd prefer to change the mass than kill the actor and create a new heavier or lighter one. Thanks!

4
Ask a Question / How do I reduce the number of actors?
« on: October 26, 2011, 12:01:15 pm »
My game in progress is here: http://www.stencyl.com/game/play/7987

The mechanic is Tron-like, except you can also choose to team up with other actors so instead of one trail you can have several. The multiple trails are really slowing down my game because they're creating hundreds of actors. I've been wracking my brain trying to figure out what I can tweak so it doesn't slow down so much, but now I am hoping that the faithful Stencyl forum dwellers can help me.

Thanks!

5
Ask a Question / Re: Isometric movement?
« on: October 26, 2011, 11:52:44 am »
I just saw these replies. Thanks so much!

I decided to rotate the game board 45º instead of making it isometric, just to simplify my life. The directional numbers helped though, and now I know what to do when I'm ready to try an isometric game.

I've posted it as a work in progress here: http://www.stencyl.com/game/play/7987

There's still quite a lot to fix!

6
Ask a Question / Isometric movement?
« on: September 30, 2011, 02:22:21 pm »
I'm trying to get my player to move isometrically. I've got the right/left movement working, but up/down doesn't seem to want to go any more oblique than 45º. I need it to be at 26.5º. Is this a bug in Stencyl or am I doing something wrong?

Thanks!!!

7
Ask a Question / Dynamic trail of actors behaviour
« on: September 11, 2011, 03:51:06 pm »
I'm new to Stencyl so please bear with me!

I'm working on a behaviour that will allow the player to gather allies for more power. As the player moves, it leaves a trail of colour that kills enemies if they collide with it. As you gain allies, your trail gets wider and more rainbow-y. I've attached a screenshot of it in action.

The behaviour for this currently has a manually assigned position for each colour trail (screenshot of this attached as well). However I need the positions to be dynamically assigned as there will be 7 different colours and the player will determine what order to add them in.

Here's where I'm getting stuck: Each ally's trail has a limited lifespan. After 5 seconds that colour trail stops. I want the other colours to shift position to fill the gap it left.

Is this possible? Advisable? I've considered other mechanics but this is really the best one for the game I'm working on. However I'm open to other suggestions.

Thank-you!

8
Ask a Question / Re: Trails
« on: September 10, 2011, 05:03:24 pm »
Hi Greg, did you get around to uploading this behaviour? Would love to try using it with a game I'm working on. Thanks!

9
Ask a Question / Re: Setting a "trail" on an actor that shows movement
« on: September 03, 2011, 10:23:22 am »
If you're still looking for this behaviour, have you tried After Image?

Pages: 1