Drawing joints between actors? [Solved]

Epic428

  • Posts: 1118
Lol well it was probably related to the internal name of the attribute. But as long as it works and you aren't getting any more errors, then all is good.
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Emanrice

  • Posts: 25
But I am still getting errors(and massive lag), even after using the internal name of the attribute.
...Isn't there a way to turn of error-messaging in the console? Maybe I can get off the cheap way... Heh.
I've got a lovely bunch of coconuts.

Epic428

  • Posts: 1118
I highly recommend you copy and paste the errors here. The best way to do so with out taking up a lot of space is by using the code tags in the forums  [ code] [/ code] (without spaces)

These errors cannot just be ignored.
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Emanrice

  • Posts: 25
I uploaded a text file of the errors on Dropbox on my last post.
Link: https://dl-web.dropbox.com/get/Errors.txt?w=cdfa0d2a
I've got a lovely bunch of coconuts.

Epic428

  • Posts: 1118
I get a 403 error. I think you have the wrong link
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Emanrice

  • Posts: 25
Okay, Dropbox isn't working, neither is the code tags... Host-a?
http://www.host-a.net/u/Emanrice/Errors.txt
I've got a lovely bunch of coconuts.

Epic428

  • Posts: 1118
This is the problem I see you are having.

Warning: Behavior does not exist - Draw Line
Error in draw for behavior: Draw Line
TypeError: Error #1009: Cannot access a property or method of a null object reference.
   at scripts::Design_9_9_DrawLine/draw()[C:\Users\Ian\Documents\StencylWorks\sandbox\flash\scripts\Design_9_9_DrawLine.as:70]


For some reason it isn't seeing the behavior "Draw Line" - you may just need to restart the game or sw to fix that.

The other - the 1009 error- that means that a certain actor has no value, this is likely to be a result of the last bridge piece not having a neighbor.

This could be solved by setting the piece prior to it as the neighbor, or adding a boolean called "Draw?" and setting "draw?" to true when it finds its neighbor. Then if "Draw?" is true - draw the lines you want drawn.

If you understand this or need more help let me know.
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Emanrice

  • Posts: 25
Okay, I added the boolean "Draw", before looping through the actors and before drawing I check if it's true. Now for the single swinging platforms I have, it works fine. But when I get to bridges, it just refuses to work, I get the same errors. I've reloaded the game, restarted SW, done everything you suggested, but nothing works.

EDIT: By the way, the Draw boolean is toggled when I set up the behavior for the actor, true if there's another bridge piece, false if there is not.
I've got a lovely bunch of coconuts.

Epic428

  • Posts: 1118
Hrmm, I would need to see the behavior to see how it is currently working, or if you like you can just upload the game to forge, I can take a look at it and fix the errors for you.

Anyway based off the log you uploaded the error below was the only thing I caught, so it is possible that fixing it produced a new error, or there were multiple items in the behavior with potentially null values to begin with.
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Emanrice

  • Posts: 25
Quote
or there were multiple items in the behavior with potentially null values to begin with.
Hmm... So let's say if I left an actor type attribute empty when adding the behavior to an actor, would that have possibly caused that error?

EDIT: Behavior



Draw = Boolean, true if there is another bridge piece to check for.
Neighbor ID = Number, ID number to check for.
ID = Number, the actors ID Number.
Neighbor = Actor, this actors neighbor actor.
Actor Type = Actor Type, the type of actor to check for.

« Last Edit: June 09, 2011, 09:53:35 am by Emanrice »
I've got a lovely bunch of coconuts.

Epic428

  • Posts: 1118
I found the problem. The changes you made didn't fix the original problem. In the when created remove the "IF Draw"  section altogether.

What you want to do is in the same spot where it says "Set Neighbor to The Actor" you want to add a block that says  "Set Draw to TRUE."


What this does is it only draws the bridge piece IF it has a neighbor to draw to. Otherwise it doesn't draw, which means that you don't receive the error. Try that and let me know if the errors stop happening.
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Emanrice

  • Posts: 25
Yes! It works! Thanks for your help!
I've got a lovely bunch of coconuts.

Epic428

  • Posts: 1118
No problem! Lets us know if you have any other questions!
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs