2019-02-20 snapshot
-
- Posts: 52
- Joined: Sun Oct 29, 2017 1:49 am
- Team: Privateer
Re: 2019-02-20 snapshot
How can i change my avatar from Kermit lmao
Re: 2019-02-20 snapshot
Can someone explain to me how to add these to a track?
Re: 2019-02-20 snapshot
You're going to have to learn Javascript. JLV gave an example on the previous page.hvpmvp wrote:Can someone explain to me how to add these to a track?
Re: 2019-02-20 snapshot
These lines control the avatars. The catch all at the end is Kermit. Each line matches a name to the row and column the avatar is in. The names are regular expressions, which are a complicated subject but if you just use /\bFIRSTNAME.*\bLASTNAME\b/i it should do what you want.vengefuluoto420 wrote:How can i change my avatar from Kermit lmao
Code: Select all
{ page: 1, row: 0, col: 1, re: /\bmiss.*\bpiggy\b/i },
{ page: 1, row: 1, col: 0, re: /\bgonzo\b/i },
{ page: 1, row: 1, col: 1, re: /\bfozzy.*\bbear\b/i },
{ page: 1, row: 2, col: 0, re: /\browlf\b/i },
{ page: 1, row: 2, col: 1, re: /\bscooter\b/i },
{ page: 1, row: 3, col: 0, re: /\bpepe.*\bprawn\b/i },
{ page: 1, row: 3, col: 1, re: /\brizzo.*\brat\b/i },
{ page: 1, row: 4, col: 0, re: /\bbunsen.*\bhoneydew\b/i },
{ page: 1, row: 4, col: 1, re: /\bbeaker\b/i },
{ page: 1, row: 5, col: 0, re: /\bwaldorf\b/i },
{ page: 1, row: 5, col: 1, re: /\bstatler\b/i },
/* catch all - this should be last */
{ page: 1, row: 0, col: 0, re: /.*/ },
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Re: 2019-02-20 snapshot
RIPaeffertz wrote:You're going to have to learn Javascript. JLV gave an example on the previous page.hvpmvp wrote:Can someone explain to me how to add these to a track?
Re: 2019-02-20 snapshot
Sorry, not yet. Will definitely be writing some documentation soon though.aeffertz wrote:Is there a full list of available functions anywhere?
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Re: 2019-02-20 snapshot
jlv, could you give me a quick explanation on how mx.paste_custom_frame works or even just what the arguments for it are? I tried figuring it out from the jstest example but couldn't understand it.
Re: 2019-02-20 snapshot
The parameters are like this:aaronr5 wrote:jlv, could you give me a quick explanation on how mx.paste_custom_frame works or even just what the arguments for it are? I tried figuring it out from the jstest example but couldn't understand it.
mx.paste_custom_frame(texture_id, frame_number, src_x, src_y, dst_x, dst_y, width, height)
It copies width x height pixels from the specified frame in the sequence file to the texture. "texture_id" is the texture id you got from "mx.read_texture()". "frame_number" is the frame number starting from 0. "src_x" and "src_y" are the location in the source frame and "dst_x" and "dst_y" are the location in the texture. The coordinates are in width and height units. So "0" is the left edge and "1" is the right edge.
So as an example, if you wanted to copy the bottom right corner of frame 5 to the center of the texture, you'd do this:
frame=5;
sx=0.5;
sy=0.5;
dx=0.25;
dy=0.25;
w=0.5;
h=0.5;
mx.paste_custom_frame(mytid, frame, sx, sy, dx, dy, w, h);
"begin_custom_frame" initializes the texture to black or transparent depending on whether the texture has an alpha channel.
Sorry I don't have any documentation yet!
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Re: 2019-02-20 snapshot
Right, I didn't understand the second number before, but that now explains why this only works for seq files.
Re: 2019-02-20 snapshot
jlv I also meant to ask you, did you end up going with duktape for the js interpreter?
Re: 2019-02-20 snapshot
Yes, it's duktape.aaronr5 wrote:jlv I also meant to ask you, did you end up going with duktape for the js interpreter?
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Re: 2019-02-20 snapshot
Anyone created a track yet with sounds thats ready to DL? Id love to hear the sounds in the game but not too experienced in Java
Check out my youtube channel!
https://www.youtube.com/channel/UCyMiqu ... Hi7whl8yTw
https://www.youtube.com/channel/UCyMiqu ... Hi7whl8yTw
-
- Posts: 8368
- Joined: Thu Nov 19, 2009 5:52 am
- Team: Havoc Racing
- Contact:
Re: 2019-02-20 snapshot
willyt366 wrote:...not too experienced in Java
DBRider251 wrote:I recommend Udemy honestly. $12 for a course, usually better than a college professor.
aaronr5 wrote:Eloquent javascriptaeffertz wrote:Anybody got a good Javascript course/tutorial on YouTube or Skillshare?
jlv wrote: Mozilla's reference pages are excellent.
jlv wrote:If it weren't for Havoc I'd have been arguing with the 12 year olds by myself.
Re: 2019-02-20 snapshot
The rF Indianapolis track has some sounds on it this week.willyt366 wrote:Anyone created a track yet with sounds thats ready to DL? Id love to hear the sounds in the game but not too experienced in Java