Jump to content
Sign in to follow this  
Cernu

Copy/paste scripts

Recommended Posts

Concerning rigale, most of my systems are in place. However, one thing that is really pushing me away from the editor and visual coding those days is that I can't easily copy/paste code. This is an issue, because it makes it harder to create new critters for example. Lets take a rabbit and crab for example. Sure, I can use script to easily change/randomize some values and colors, and this I already do (if you play rigale, you will notice animals "get older", or wolves can become alphas, or deers white deers. but If I want to create a crab from a rabbit (let's say for simplicity's sake that they have almost the same values. Yes crabs can bunny jump in Rigale ? ) I have to copy/paste every godamm line of code (which I wrap in a convenient logical "if", that then allows to copy everything inside).  Its is a long, time consumming/error prone process.

My proposal would be to have some way to (using ctrl ? ) add all lines of code to a copy, and then paste them all to the new critter/item script.

Or maybe a workaround would be to change only the apparence of the critter, and have more control on its base values (especially speed). 

However, those are proposals of course. The editor is AMAZING, and getting better with each update. Good job ppl.

Share this post


Link to post
Share on other sites

An easy solution I discovered if you want to copy/paste large amounts of scripts from one logic to another, is put all of the code in question in an IF tile. Copy the IF script tile and paste it in the desired logic. Then just take out all the code from the IF tile and use it as you need to. Then just delete the IF tile.

Edited by Valour4Eva
  • Thanks 1

Share this post


Link to post
Share on other sites

If it is small, I will do what Valour says. If I am going to use it a lot (or it is complex, or I know I might need to change it later and need to put it in multiple entities) I will use an instruction in a global storage, so I can access it from any game logic or entity.

  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks 2 u 2. I already use the if method, Valour4Eva, like I describe in my post. However, it really feels clumsy.

ocnoglittle, I will give it a try again, now that instructions can have up to 16 variables in the 1.5 update, which is great.

Cheers

Edited by Cernu
  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×