Data Realms Fan Forums
http://45.55.195.193/

Random Question
http://45.55.195.193/viewtopic.php?f=1&t=46087
Page 1 of 1

Author:  fv22 [ Sat Sep 10, 2016 5:18 am ]
Post subject:  Random Question

Hi, I'm working on a little mod and I couldn't choose between having a random head, like the ronins or a animated head, so I though, why not both? The problem is that both the ronin script and the animation rely on having multiple frames. So I was wondering if there is a way to randomly choose a head, without using different frames. For instance, a way to choose between head A, head B, or head C, rather than head000, head001 and head002.
Cheers

Author:  Bad Boy [ Sat Sep 10, 2016 5:28 am ]
Post subject:  Re: Random Question

I may be mistaken but the only thing I can think of is having several frames for each head - so head one would be frames 1 through 4, head 2 would be 5 through 9, and so on. - and cycling through the head's designated frames with lua.

Author:  fv22 [ Sat Sep 10, 2016 3:26 pm ]
Post subject:  Re: Random Question

That actually seems like it could work! The only problem is I suck in lua :( I dont' want to be annoying but would it be too much to ask you if you could write that script if it's not complicated?

Author:  Bad Boy [ Sat Sep 10, 2016 9:00 pm ]
Post subject:  Re: Random Question

Maybe? I haven't done anything with CC in quite a while but if no one else bites in the next little while I can give it a gander.

Author:  fv22 [ Sat Sep 10, 2016 10:23 pm ]
Post subject:  Re: Random Question

Thanks a lot! In the meanwhile, I might see what I can do but lua compared to the ini of cortex looks so difficult!

Author:  Bad Boy [ Sun Sep 11, 2016 6:53 pm ]
Post subject:  Re: Random Question

If you like learning by reading, there's a whole book on it available online:
https://www.lua.org/pil/contents.html

There's also a similar tutorial on the lua-users wiki:
http://lua-users.org/wiki/LuaDirectory

I've only read specific sections of them on occasion so I don't know how helpful they'll be for you, and the book is for a slightly older version of lua, but they'll probably give you a good handle on things. Otherwise, weegee's scene making tutorials (in the scene making section) and reading through other scripts are how I learned, though staring at code til it makes sense may not be for everyone.
If you do give it a start and get stuck or aren't sure how to do something, I or someone else can always help you out.

Author:  fv22 [ Sat Sep 17, 2016 11:24 pm ]
Post subject:  Re: Random Question

Thanks for helping me learn :) Maybe someday you'll see a brand new mod made by me on the mod release section, who know?

Author:  Bad Boy [ Sat Sep 17, 2016 11:30 pm ]
Post subject:  Re: Random Question

Hey cheers, if you have any questions feel free to pm me (or just post em here). I'm more than happy to help explain anything that confuses you. And if you're stuck and do need a lot of help with this request I'm sure I can do something :)

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/