paste script error

Report bugs. Post bug workarounds or fixes

Moderator: MSandro

Post Reply
emodrow
Posts: 16
Joined: Sep 15th, '15, 17:34

paste script error

Post by emodrow » Jun 12th, '16, 14:39

GP 046 on Windows 10:
start GP 046 --> load atteched project (desert ant) --> choose "My Blocks" --> choose class Pheromon --> copy "Pheromon_new pheromon x y" to clipboard --> choose "paste script" in script area --> GP hangs

I've tried to get access to a script of another class (here: to set the position of a new drop of pheromon at a definied position) similar to "ForestFire": what is the trick to "see" the script of another class???
desert ant.gpp
(6.9 KiB) Downloaded 294 times

JohnM
Posts: 379
Joined: Sep 11th, '15, 14:42

Re: paste script error

Post by JohnM » Jun 21st, '16, 21:52

If you want to make a copy of a function definition, it's best to make a new "hat block" for the new function, then use "duplicate ...all" to copy all the blocks below the hat of the script you want to copy, then attach those blocks to the new hat block. In v050, I can't seem to get the "paste to clipboard" menu on the hat block, so I think the crash you reported is prevented.

To make a generic function that you can use in any class, select "for all objects" from the menu that shows up when you create a new block. Define the block as usual. You can then drag out a copy of the block from the palette. Use the "copy to clipboard" command to copy that block, then navigate to another class and invoke "paste script" command from the scripting area background menu. We are working on improving this process.

Post Reply