ERAY: Alternative property editing ray

  • boxmein
    1st Mar 2013 Former Staff 1 Permalink
    Hi!
    I recently wrote code for an element that works like CRAY but what it does is set element properties. I'd like some feedback on it and for it to be considered to be pulled into official TPT++.
    What it does do:
    * Set an element property
    What it doesn't do:
    * Set multiple element properties
    * Limit particle counts
    * Slow down the game

    So basically how it works is that I assigned certain elements with ctypes to properties, like for example the ctype FIRE makes ERAY edit temperature, (BIZR) sets deco colours etcetera. This placement is only partially arbitrary and is meant for making the element easy to use. I also used some sort of mnemonics or connections to properties to pick those, such as that when you color BIZR you can make it paint other elements (and so using BIZR on ERAY makes it paint other elements!) .

    [Usage]


    I meant for the element to be used most efficiently, but the values still have to be set by the console or by PROP.


    1. Selecting the property


    Every property has a mnemonic to them. See below for what works with what and why it was picked.


    **CLNE for ctype** because CLNE was the first element to use ctypes.
    **BIZR for deco-colour** because BIZR can also change elements' deco colours.
    **FIRE for temperature** because the word 'temperature' reminded me first of heat and heat of fire.
    **LIFE for life** because it spells exactly the same.
    **ACEL for tmp** , this one was random but matches DCEL for tmp2.
    **DCEL for tmp2** , this one was random too because there really isn't anything to represent these.
    **CONV for type** because what CONV does is change element types. (if that makes any sense)
    **PSCN for vx** - those two are exactly like tmp and tmp2, i didn't know anything better to use.
    **NSCN for vy** - ^

    2. Setting its value


    Every value except the dcolour go into

    tmp
    , so the most obvious course of usage would be either to use PROP or the console.
    With PROP: See image
    With the old console:
    !set tmp eray clne
    (edit by what you need, the example was for ERAY(CONV) )
    With the new console:
    tpt.set_property("tmp", tpt.element("clne"))

    [Links]


    Why I should not use ctype to signify properties
    The full source code for ERAY
    My mod to test out ERAY


    What I'd like feedback for:
    1. The ctype system, how I should improve it or change it
    2. The element code, what's up with it etc
    3. Ease of use
  • CatBoy1235
    3rd Mar 2013 Member 0 Permalink

    So you mean that the beam doesn't go through elements?

     

    Also there could be all sorts of things made with this.

  • byzod
    3rd Mar 2013 Member 0 Permalink

    What about this:

    PRAY: property ray

    Shoot a phantom ray with only 2 frame of life, the ray will change the property of the first particle it hits. The property it will change depends on the PRAY's tmp (as what OP listed). Use PSCN to increase the property by X, use NSCN to decrease it by X, where X was determined by the PRAY's *yyy*.

     

    I suggest *yyy* be the life, buy tmp2 or temp is also acceptable.

     

    Imagine, we can use piston to move PSCN/NSCN to spark PRAY, to active decrease or increase mode, we can use another PRAY to change the life (or the *yyy* property) of the first PRAY! It's fully programmable!

     

    Further, if the property mode of PRAY is triggered by normal number (0 for ctype, 1 for temp, etc.), we can even use another PRAY to change the function of the first PRAY! It's as powerful as tpt.set_property()!

  • 00yoshi
    30th Jan 2015 Member 0 Permalink

    A nice idea!

    and isnt !set tmp eray clne the actual way? and the other one the old?

  • Synergy
    27th Feb 2015 Member 0 Permalink

    I am in favor of anything that could be used to alter the ctype/tmp/tmp/life of particles. For example, we can create a line of CRAY with CRAY, but we can't create a specific type of CRAY with CRAY (ie. define it's ctype as SPRK). This would be helpful. Imagine also being able to change FILT from XOR/OR/AND ect.