[Closed] "MaxScript for Speed" Carbon 😉
Hey Fabio,
That joystick control looks like it works well. Good choice!
I did something similar with a Flash control a while back. Is it a dot net control, or native to max?
(Now let’s get some machine guns in there like timothyc suggested!)
Dave
Hi shahabsy, thanks My script it´s very messy at the moment (my fault) and it´s not an one click solution, I´m still have a lot of work to do
Hi Dave :) The "joystick" i´m using it´s a kind of hack, it´s not .NET and not native to max, actualy it´s some native max stuff working togheter :)
The graph is just an image as a background of a rollout , the center quad is a checkbutton.
I´m using the mouse pos relative to the rollout to update the checkbutton and then the checkbutton position and some math behind to drive
the values on the “Pos” rollout, the one that have the spinners.
The result is usable but not very acurate, it´s a little bit snappy due to the size of the checkbutton.
If I make the checkbuttun really small, it reduces the snappy problem.
I´ll keep trying some new stuff :)
Here´s the UI Control code, if someone want to use it or improve it
xControls = 0
rollout xValues "Pos"
(
spinner xDir "X" range:[-50,50,0]
spinner yDir "Y" range:[-50,50,0]
on xValues close do
(
destroyDialog xControls
)
)
createDialog xValues 100 70
rollout xControls "rollout"
(
checkButton btn "" checked: false width:10 height:10 pos:[45,45]
on xControls mousemove xPos do
(
mouseNewPos = xPos
if btn.checked == on do
(
lastPos = mouseNewPos - [5,5]
btn.pos = lastPos
xValues.xDir.value = (((mouseNewPos.y)-50)*-1)
xValues.yDir.value = (mouseNewPos.x)-50
)
)
on btn rightClick do
(
btn.pos = [45,45]
btn.checked = off
xValues.xDir.value = 0
xValues.yDir.value = 0
)
)
createDialog xControls 100 100
I’ve updated the Flash AxisControl I put online (nearly 5 years ago now)! It’s now much nicer ActionScript 1.0, and the source code is all available to edit on the root timeline in the .fla.
Download the attached files, and you should have a nice functional joystick, complete with mouseover effects and a gentle slowdown when you release.#
Just make sure to edit the path to the .swf file before you run the script.
Cheers,
Dave
EDIT – Just replaced the .zip: the Flash control now passes normalized values to 3dsmax (-1.0 to +1.0), as well as the coordinate system being in max’s native (positive y)
That is outrageously cool.
Are there any docs on ShockwaveFlash.ShockwaveFlash.9 (google. my friend) – I’d like to see what I can dig into. I’d be curious if I could use AS3 for this sort of operation.
Coolest thing I’ve seen all week!
I think you could make a lot of nice interface elements with this.
Hey Joel,
You may also want to look into ExternalInterface to send commands. I didn’t get round to updating the Flash for this, but may do at some point.
http://livedocs.macromedia.com/flash/8/main/00002200.html
http://discussion.autodesk.com/thread.jspa?messageID=5335343
http://discussion.autodesk.com/thread.jspa?messageID=5413642
To be honest, I don’t think AS3 would bring anything to the party. At the end of the day you’re just simply sending very simple datatypes from one app to the other. I don’t think Flash or Max would care, and things are at least simpler with AS2 as you can keep everything on the timeline.
I entered actionscript at AS3, so it is more comfortable for me. I think you are correct in that it doesn’t provide any functional advantage in this case.
hates the flash timeline
Thanks for the inspiration and the resource links!
Ha, ha! Well it certainly has it’s uses, and you have more flexibility if you can love both! Glad you like it anyway.
Be sure to post any coolness you come up with too
Is it possible to put that up for download, never mind how unfinished it is? Also, does it do realistic jumps? I would really appreciate a download, because I do 3ds max as a hobby, after school and stuff, and Toy car is getting boring because of the lack of control.
PLEASE!!!
BlueDude
:bounce: :bounce: :bounce: :bounce:
I think it’d be a good idea if you posted a downloadable version of this, even if it’s not ready. I’d like to learn from it, and use it. Does it work realistically on jumps?
BlueDude
:bounce: :bounce: :bounce: :bounce:
Looks great, I am definitely interested in how you set up the rig.
Please let us know when you have your webpage online.
– MartinB