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

Pages: 1
1
Ask a Question / Unexpected error when trying to add friction
« on: January 12, 2012, 08:48:44 pm »
Hi, finally using Stencyl again after a long time... Anyway, I've made a simple platforming engine, just the horizontal(acceleration, friction) and vertical(jumping) movement for now.
It all works correctly, but when adding the friction(I have to make my own because the object takes forever to even slow down)I'll try to move the player it shows me this error:


Code: [Select]
[object AlchemyExit]
at Function/<anonymous>()
at Function/<anonymous>()
at Box2DAS.Dynamics::b2World/HandleStep()[/Users/jon/Desktop/stencyl/plaf/flash/Box2DAS/Box2DAS/Dynamics/b2World.as:185]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at Box2DAS.Common::b2EventDispatcher/dispatchEvent()[/Users/jon/Desktop/stencyl/plaf/flash/Box2DAS/Box2DAS/Common/b2EventDispatcher.as:27]
at Box2DAS.Dynamics::b2World/Step()[/Users/jon/Desktop/stencyl/plaf/flash/Box2DAS/Box2DAS/Dynamics/b2World.as:179]
at stencyl.api.engine::GameState/innerUpdate()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1475]
at stencyl.api.engine::GameState/postUpdate()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1395]
at stencyl.api.engine::GameState/update()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1377]
at org.flixel::FlxGame/update()[/Users/jon/Desktop/stencyl/plaf/flash/flixel/org/flixel/FlxGame.as:400]

Here's the code(using a code block in the every step wrapper):
Code: [Select]
//Horizontal movement
if (isKeyDown("left")){
if (actor.getXVelocity() > -maxXSpeed){actor.accelerateX(-xSpeed);};
}

if (isKeyDown("right")){
if (actor.getXVelocity() < maxXSpeed){actor.accelerateX(xSpeed);};
}

//Jumping
if (isKeyDown("jump")){
if (canJump == true){
actor.setYVelocity(-jumpHeight);
canJump = false;
}
}

//Friction
if (actor.getXVelocity() != 0){
if (actor.getXVelocity() > 0){actor.accelerateX(-friction);}else{actor.accelerateX(friction);};
}

Anyone know the problem? I've never done anything with AS3 before(nor any of the previous ones)so I'm not sure this is the best way to do this.

Any help is appreciated. Thanks in advance!

2
Hello! I'm trying to make a circular motion moving platform using stick and hinge joints. I use 3 actors, the base(circle), and 2 platform actors. I give the base a hinge joint, and connect the base and the 2 platforms using a stick joint. This works fine and all, no errors. But, when I activate the motor for the base's hinge joint, it gives me this error:
Code: [Select]
object AlchemyExit]
at Function/<anonymous>()
at Function/<anonymous>()
at Box2DAS.Dynamics::b2World/HandleStep()[/Users/jon/Desktop/stencyl/plaf/flash/Box2DAS/Box2DAS/Dynamics/b2World.as:185]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at Box2DAS.Common::b2EventDispatcher/dispatchEvent()[/Users/jon/Desktop/stencyl/plaf/flash/Box2DAS/Box2DAS/Common/b2EventDispatcher.as:27]
at Box2DAS.Dynamics::b2World/Step()[/Users/jon/Desktop/stencyl/plaf/flash/Box2DAS/Box2DAS/Dynamics/b2World.as:179]
at stencyl.api.engine::GameState/innerUpdate()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1379]
at stencyl.api.engine::GameState/postUpdate()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1299]
at stencyl.api.engine::GameState/update()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1281]
at org.flixel::FlxGame/update()[/Users/jon/Desktop/stencyl/plaf/flash/flixel/org/flixel/FlxGame.as:354]
Is it a misuse of joints or something? I've also tried removing the stick joints, but it gave me the same error.
Would anyone mind helping me please?

3
Windows / Mac / Flash / HTML5 / Shape Shifter
« on: June 06, 2011, 07:42:40 pm »
Am I allowed to post WIPs here? If not please delete this topic.

In SS you play as a shape shifting block. His intentions? Who knows! Get through the various levels with your various different shapes such as a square, circle, triangle, rectangle and more(when I make more)!

Play it here: http://www.stencyl.com/game/play/2930
Currently, there are only 4 shapes(listed above), and 4 levels. No menus or anything yet.

4
Resolved Questions / Drawing joints between actors? [Solved]
« on: June 05, 2011, 08:06:18 pm »
Hello! I think this is the correct place to post this, but please move this if it isn't.
Anyway, I have an actor called "Bridge Peice", these are connected to "Bridge Pole"'s using stick joints.
What I'm wondering is, is there a way to draw a line from one joint to another? I've tried making a behavior that draws a line from the actors x/y position, and a set x/y position, but either nothing was drawn or the screen had a seizure.
Any help would be appreciated. Thanks in advance!

EDIT: Guess I should post some more info.
When I say the screen has a seizure, I mean the screen flickers from black to normal every frame.
Here's the draw line behavior I was using:


I tried removing the scene width/height blocks also, but then nothing was drawn.

By the way, where are the forum rules at?

Pages: 1