View unanswered posts | View active topics It is currently Thu Dec 26, 2024 3:45 pm



Reply to topic  [ 9 posts ] 
 Everything's so New and Shiny I Can't See! 
Author Message
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post Everything's so New and Shiny I Can't See!
:shock:
So....things around here are different. Lot less people it seems. And a few modders I admired back in the day are now devs, which is cool 8). And I saw some shiny new functions in the Dev Log, which is what brought me back here.

I looked around the Mod Release section and noticed there are less mods being made today. I kinda miss the community we had around the time of B23. This nostalgia trip is making me want to update some of my mods to the newest version of CC. However, I'm EXTREMELY rusty and am now regretting that I never documented the stuff I made. Also, I have a day job now, so I don't have all the free time I had before. I looked at the Wiki, and didn't see a whole lot of new stuff on it either.

So do any of you mind giving me a quick rundown on Lua modding CC since B23/24? Like, can we finally attach stuff using Lua script without hacky workarounds? If we want to do scripted effects on an already spawned object, do we still need to create a invisible MOPixel to run the script on? Stuff like that.


Tue Feb 18, 2014 7:23 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Everything's so New and Shiny I Can't See!
MORay and ObstacleRay change.

Scripts will run on attachables.

AI.

You can access the magazine of HDFirearms using Lua, as well as the next round in the magazine and that round's properties.

MO.IgnoresTeamHits to set whether or not something will collide with MOs on the same team (applies to all MOs, not just actors).

There's also all the pie menu stuff, the Coalition Remote-GL and Missile Launcher are good examples.

Edit: More stuff.


Tue Feb 18, 2014 7:31 am
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: Everything's so New and Shiny I Can't See!
Good to see you back, Kyred!

Banner control was added in B25. I doubt it'll be of much use to you, but you never know!


Tue Feb 18, 2014 11:18 pm
Profile WWW
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post Re: Everything's so New and Shiny I Can't See!
CaveCricket48 wrote:
MORay and ObstacleRay change.

Scripts will run on attachables.

AI.

You can access the magazine of HDFirearms using Lua, as well as the next round in the magazine and that round's properties.

MO.IgnoresTeamHits to set whether or not something will collide with MOs on the same team (applies to all MOs, not just actors).

There's also all the pie menu stuff, the Coalition Remote-GL and Missile Launcher are good examples.

Edit: More stuff.


Thanks Cricket! This is exactly the kind of stuff I was looking for :grin:

TheLastBanana wrote:
Good to see you back, Kyred!

Banner control was added in B25. I doubt it'll be of much use to you, but you never know!


Oh wow! I can see a fun use for that :D. Is it possible to define new banners, or are red and yellow your only choices?


Wed Feb 19, 2014 4:06 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Everything's so New and Shiny I Can't See!
Red and yellow are your only choices, as far as I know.


Thu Feb 20, 2014 2:28 pm
Profile
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post Re: Everything's so New and Shiny I Can't See!
Hoooooollllly craaaaaaap! I'm soooo rusty! :cry:

Was working on updating the PAC's script to work off the gun instead of the particle it creates. Within 10 minutes of editting CC files for the first time in about 3 years, I accomplished a consistent rapidly-unplanned-exit-the-game feature everytime I pulled the trigger*. Also an hour of my time was spent trying to figure out why I kept getting me an error for self:isActivated(). It's because I didn't capitalize the 'i' in 'is' :oops:

All the little techniques are slowly coming back to me. And now in retrospect I'm wondering if it's even worth the effort to make it work off the gun, because doing so adds an update function call for every instance of the weapon that otherwise wouldn't be there. But the good thing is I can determine who is holding the weapon without using the potentially buggy method of checking all actors and seeing which one is the closest within 30 pixels of the projectile. However, it's only buggy in a very specific and rare situtaiton. Which could potentially be hilarious or add another uplanned feature. It's a decision between efficient code vs. consistent code. Yea optimization problems.

Also, how efficient are Timers? Is each one constantly counting in the background, or do they just do a time comparison when a checking fuctions is called? I would assume the latter, but I just want to be sure before I start getting crazy with them.

*make a magazine for a gun, but don't bother defining a projectile for it to shoot. Fun times


Fri Feb 21, 2014 4:33 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Everything's so New and Shiny I Can't See!
Kyred wrote:
Also, how efficient are Timers? Is each one constantly counting in the background, or do they just do a time comparison when a checking fuctions is called? I would assume the latter, but I just want to be sure before I start getting crazy with them.

Feels like the latter. I just made a script that made 1000000 timers in Create(), and while there was a lag spike as soon as the MO spawned, everything ran smoothly after that, nothing slower than normal.


Sat Feb 22, 2014 2:16 am
Profile
DRL Developer
DRL Developer

Joined: Fri May 15, 2009 10:29 am
Posts: 4107
Location: Russia
Reply with quote
Post Re: Everything's so New and Shiny I Can't See!
Welcome back!


Sat Feb 22, 2014 2:19 am
Profile
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post Re: Everything's so New and Shiny I Can't See!
CaveCricket48 wrote:
Kyred wrote:
Also, how efficient are Timers? Is each one constantly counting in the background, or do they just do a time comparison when a checking fuctions is called? I would assume the latter, but I just want to be sure before I start getting crazy with them.

Feels like the latter. I just made a script that made 1000000 timers in Create(), and while there was a lag spike as soon as the MO spawned, everything ran smoothly after that, nothing slower than normal.
Welp, I'm convinced :P


Sat Feb 22, 2014 4:40 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.030s | 16 Queries | GZIP : Off ]