Really annoying

Scripting help, tricks, and tips. How to use the editor.
Post Reply
Sandmaster
Posts: 3
Joined: Wed Jun 18, 2008 1:43 pm

Really annoying

Post by Sandmaster »

I have had two very annoying bugs related to the editor. First of all, if I put four forcefields the way I want them, they editor will freeze up and I lose my data. I tried saving, but afted saving twice, only the core remained. Everything else vanished. I only used five parts and the core. Four of them were 50*50 forcefields and a green switch.

Can someone explain to me if this is going to happen with all of my creations, or if I coud ifx it. I don't think its because of an outdated flash player or something. Everything works fine on this computer and the other computer I use. Please help me.
MD
Site Admin
Posts: 195
Joined: Sun Aug 12, 2007 2:06 pm

Post by MD »

This shouldn't be happening. Can you give me more information? Tell me exactly what you're doing, and post a copy of what it says in the Text edit and AI windows, and you could post a screenshot if you think it's relevant.

~MD
Sandmaster
Posts: 3
Joined: Wed Jun 18, 2008 1:43 pm

Post by Sandmaster »

Well, my core is scaled to 10*10, at 400*300.
I have a forcefield at 400*310 at a size of 50*50.
I duplicate the forcefield and flip on the x axis (now another at 400*290).
It once froze when I duplicated there, so I make a completely new forcefield. I place it at 410*300 at 50*50 with an angle of 90.
I duplicate it and flip on y axis (now at 390*300).
I make a green switch at 100*100 at location 400*475.
I take forcefield 1 at 400*310, and set the connection to the switch.
I take forcefield 2 at 400*290 and set the connection to the switch.
I take forcefield 3 at 410*300 and set the connection to the switch.
I take forcefield 4 at 390*300 and-
Then it freezes for about two minutes. A popup window asks me to abort the script. If I say yes, the whole thing works but I cannot use it. If I say no, this step repeats.

I have done this five times, 100% chance of freezing at this time. Sometimes when I move forcefield 3. It really sucks because I want to make this work.



When I tried saving after making my four forcefields, and then made the green switch with the conditions stated above, everything worked fine, but when I loaded it, only the core remained.



Image

Image
MD
Site Admin
Posts: 195
Joined: Sun Aug 12, 2007 2:06 pm

Post by MD »

Now that's what I call a detailed report :)

So I did exactly what you said, and sure enough, it froze. And I can tell you why, when you create the switch it automatically selects the closest part to be its parent (that is, the switch connects to the nearest part, I call that part the "parent"), so it picks one of the forcefields (namely, the one which it freezes on), then you when you select that forcefield and set its parent to be the switch you end up with forcefield connected to switch, switch connected to forcefield, forcefield connected to switch...and so on. This is an infinite loop which flash knows is bad and so it gives you the option to abort. Furthermore, when you save your level it saves pieces starting with the core then its children, then its children's children, etc, but your forcefield and switch are off in their own world so they vanish from existence.

Make sense? In conclusion, just set your switch to connect to the core right from the start and you should be fine. I thought I had code in place to make it impossible to do that but I guess I missed something :roll:

Thanks,
~MD
Sandmaster
Posts: 3
Joined: Wed Jun 18, 2008 1:43 pm

Post by Sandmaster »

Thank you. I will try this.
MD
Site Admin
Posts: 195
Joined: Sun Aug 12, 2007 2:06 pm

Post by MD »

You're welcome.
btw, I fixed it, this infinite loop will be impossible the next time I upload an update.
~MD
Post Reply