TRON Improvement

  • cyberdragon
    30th Jun 2013 Member 0 Permalink

    This allows you to customize the length of the tron with it's tmp2, then if you set it's ctype to itself it will always stay that length.

     

    if (sim->parts[i].life >= 100 && sim->parts[i].ctype != PT_TRON) // increase tail length
    {
    if (!(sim->parts[i].tmp&TRON_NOGROW))
    sim->parts[i].tmp2++;
    sim->parts[i].life = 5;
    }

     

  • hittox
    30th Jun 2013 Member 0 Permalink

    <Post removed>

  • jacob1
    30th Jun 2013 Developer 0 Permalink
    It's actually not nice, this is exactly why we have the TRON_NOGROW flag. It just has to be set properly, but I do realize it's almost impossible to set properly at the moment since you can't easily do .tmp = .tmp|2 or anything

    @hittox (View Post)
    "<Post removed>"?
  • cyberdragon
    30th Jun 2013 Member 0 Permalink

    I was going to use it for smaller tron cities where tron can go in things like tiny rooms and elevators without growing to death.

     

    We could also put tron anywhere like in vehicals.

     

    EDIT: TRON_NOGROW flag is not to be tampered with. This works far better than confusing it with properties it's using for other purposes.

     

    Plus, I'm going to add it to my mod, so I know it works.

  • Pilihp64
    30th Jun 2013 Developer 0 Permalink
    The TPT Lua has a bit api now, you can combine things much easier.
    .tmp = bit.bor( *oldtmp here*, *flags here*)

    You can already set tail length and NOGROW, whatever you just added is pointless.

    If you just do a plain .tmp=*flag*, you will screw it into default properties, unless you know what you set. I posted how to set TRON in an earlier thread (here).
  • cyberdragon
    1st Jul 2013 Member 0 Permalink

    *facepalm*

    TRON Improvement

     

    THE REASON I made this was to make everything you just stated obselete. It's far easier to type:

    " !set ctype tron tron " than whatever " .tmp = bit.band( *oldtmp here*, *flags here*) " is.

     

    The TPT Lua has a bit api now, you can combine things much easier.

     

    WRONG!

    I did not say I made it possible, I made it EASIER, than risking screwing crap up with lua.

     

    If you just do a plain .tmp=*flag*, you will screw it into default properties, unless you know what you set.

     

    I don't know lua, noobs don't know lua, you people are thick headed!

    My idea is far superior to...lua flags...EW!

     

    My point...simple ctype setting rules over complicated lua commands

Locked by jacob1: not really needed. Also lock to prevent ban discussion ...