Magnets question
-
Can someone point me in the direction (tutorial) of how to program an object to behave as a magnet, such as a square box cube. + and - ?
-
5000*key("space")
That will activate the magnet at a strength of 500 if the space bar is pressed
-5000*key("space")
That will repel objects away.
For objects that you want to be affected by a magnet, open the UI and mark them as magnetic.
Hope this helps. -
I have SU 7 free version and SP3RC1
Can you post a screenshot of where that code would go in which boxes in the UI inspector?Also, is there a way the magnets will just stay on without pressing any keys or spacebar? I'm very much a SP newby. Only been messing with it for not even a week yet.
Thanks! -
Well, i cannot take screenshots on my computer (Even with PRTSCRN) But, put that code into the box beside the magnet check box. Then check the check box.
-
Also,
if key("space")==1 then setVar("mgnt",1000);getVar("mgnt");end;
Put that into the magnet box to keep it on.
-
When I try to put any of that coding in the light blue box areas, the UI crashes
-
@thrundar said:
When I try to put any of that coding in the light blue box areas, the UI crashes
That is Weird
[
Are you sure you don't have an old computer? On my old Windows 98, my UI and SU always crashed.
-
Not an OLD pc. 3.07 ghz cpu. 2 gigs ram, 512 mb nvidea video card. Windows XP
I'm wondering if I need the paid for version of SU, with ruby and all that? SU stays running, it's that if I put in something wrong (blueish text area?), the UI doesn't fully open properly again.
-
Ask Chris Phillips. He is the creator of SP and should know.
-
@thrundar said:
I'm wondering if I need the paid for version of SU, with ruby and all that? SU stays running, it's that if I put in something wrong (blueish text area?), the UI doesn't fully open properly again.
I have Pro, but you don't need Pro, ruby is included in free. Window>Ruby console.
-
@thrundar said:
Not an OLD pc. 3.07 ghz cpu. 2 gigs ram, 512 mb nvidea video card. Windows XP
I'm wondering if I need the paid for version of SU, with ruby and all that? SU stays running, it's that if I put in something wrong (blueish text area?), the UI doesn't fully open properly again.
I've had that problem to. if you save the file and go back into it is the script still there. Did you click on the group you put the script in again. Also i have free I don't see why you would need pro.
-
@unknownuser said:
I've had that problem to. if you save the file and go back into it is the script still there. Did you click on the group you put the script in again. Also i have free I don't see why you would need pro.
No idea as I have not saved when UI isn't taking the input or working. I know I'm putting the code or whatever in the wrong area, or checking the wrong thing....Just need a screenshot or two of successful magnets of the inspector so can compare
-
I will help. I'm downloading printscreen at the moment
-
My hero....lol! Awesome.
I'm wondering if I am missing a plug in for the tool bar? I just reposted the question, rephrased it, new thread. I have no idea what is missing. I have downloaded and tried to mimic examples off 3d warehouse with no luck
-
Here it is. The red box is magnetic, and the selected has the code in the correct field
-
I duplicated what you showed physicsguy...nothing worked. When I tried to go back into the UI, this is what I got
-
I think that has happened to me before. I usually had to quit sketchup and reopen it
-
Well it happens every time when I try to put anything in the UI. I've restarted SU so many times today. If I had a dollar for each time,..well you get the idea. I'm closing it out, retrying over and over. Getting frustrated.
-
I think the problem is you don't have a file for the UI. re-download sketchyphysics. If that doesn't work then you will have to contact Chris Phillips for help.
-
I have been able to copy and paste a couple examples from the 3d warehouse into my project, and that has given me a starting point for now. Thank you for all your help physicsguy, and everyone else! I wrote to C Phillips earlier and awaiting to hear back from them.
Advertisement