Page 1 of 1

Can algodoo make it so this can happen?

PostPosted: Mon Dec 05, 2016 1:21 am
by sandhaul
Is this already possible, or can it be added to algodoo? I wish we had a hotkey option to toggle the appearence (H,S,V,A) of a particular object, and make it completely invisible, or change color. Again, is this possible already/can it be added to algodoo/was this already brought up somewhere else? Sorry if it was. Thanks...

Re: Can algodoo make it so this can happen?

PostPosted: Wed Dec 07, 2016 5:13 am
by pnvv
This isn't a thing right now, but you can achieve pretty much the same effect by using key binding and a simple toggle :thumbup:

Re: Can algodoo make it so this can happen?

PostPosted: Wed Dec 07, 2016 5:31 am
by sandhaul
keybinds and toggle for which objects?

Re: Can algodoo make it so this can happen?

PostPosted: Thu Dec 08, 2016 9:37 pm
by pnvv
If you don't want do do it remotely with scene.my you can just drop the code into whatever object you need changed

Re: Can algodoo make it so this can happen?

PostPosted: Thu Dec 15, 2016 7:55 am
by sandhaul
sorry im new to this scripting stuff, what's scene.my? The only things i know and learned from a cool user called "faytree" is a spring toggle and I learned myself a technique where an object can emit circles with a laser on it as if it were a cannon/gun, and the IntertiaMultiplier technique

Re: Can algodoo make it so this can happen?

PostPosted: Thu Dec 15, 2016 3:26 pm
by pnvv
Scene.my is a way of storing variables in the scene itself instead of declaring them inside individual geoms with _variables. It's really good if you want to transfer variables between geoms because you can't do that with _variables, but scene.my doesn't get transferred in between scenes. What I mean by this is if you built an object in scene A which requires scene.my to use and then transport it to scene B via phunlets without declaring whatever scene.my you used in the console it'll get broken because scene B doesn't contain the vars used in scene A. that's why I prefer using _vars so I don't have to declare a bunch of variables upon loading a geom into a scene

You can make a really easy toggle by just copy-pasting this code into the onKey option in whatever geom you want to use. It switches the toggle by pressing "A". Be aware that you'll have to declare whatever variable you want to use in the geom by typing in something like "_s = 0" beforehand
Code: Select all
keys.isDown("a") ?
    {_s == 0 ?
        {_s = 1}
        :
        {_s = 0}
}:{}

Re: Can algodoo make it so this can happen?

PostPosted: Fri Dec 16, 2016 5:37 am
by sandhaul
thanks! i don't know what and where the _vars and _variables are and where to access it but i wont bother you about it and ill try to find it myself to avoid bothering you again, with myself being a scripting noob

Re: Can algodoo make it so this can happen?

PostPosted: Fri Feb 10, 2017 11:10 pm
by The Linkage
Bother whoever you need to bother, just don't do marble athlons or camps for the love of God
On the script menu, below the title, there's a small black rectangle, click there and write _s=0

you probably figured that out but this might help other people