Home Showcase
Welcome to the new Diaspora forums, please let us know if you see anything broken! Notice: Some users may need to reupload their avatars due to an issue during forum setup!

Core Upgrade Sequencer

NinjrKillrNinjrKillr Registered Posts: 175
edited April 2012 in Showcase #1
So yeah, you've got all these energy upgrades, and some armor upgrades.. But the problem is half your armor upgrades turn themselves on before the energy upgrades, therefore having half of your total upgrades being useless - for such reasons as "Insufficient CPU", or "Insufficient PG".

Never fear, simple E2s are here!

This E2 will, upon being placed on a ship, unweld all core upgrades that aren't energy upgrades, and reweld them after giving the energy upgrades sufficient time to enable themselves.

Instructions:
1) Place on ship, anywhere.
2) Wire the 'Parent' input to a entity marker (which should be linked to your parent prop)
3) ???
4) Profit.

Notes:
1) It will take note if you haven't wired the entity marker, tell you to wire it, then keep checking every 2-3 seconds.
2) For every armor/shield upgrade that it unwelds, the length of time it waits before re-welding them increases by 2 seconds. Therefore 30 armor/shield upgrades = 60 seconds.
# This E2 was written by NinjrKillr, and has been placed into the public
# domain for free use. Any modifications are allowed, but credit must
# remain with NinjrKillr for the original E2. This E2 is allowed to be
# shared at will, provided this header remains intact.

@name Core Upgrade Sequencer
@inputs Parent:entity
@outputs 
@persist S:array ReWeld:array
@trigger 

if(dupefinished()){reset()}
if(first() | clk("Check for Parent"))
{
	if(->Parent)
	{
		stoptimer("Check for Parent")
		S = entity():getConstraints()
		for(I = 1, S:count())
		{
			E = S[I,entity]
			if(E:type():find("sc") & !E:type():find("energy"))
			{
				ReWeld:pushEntity(E)
				E:unWeld()
			}
		}
		timer("Reweld",ReWeld:count() * 1000 * 2.5)
	}
	else
	{
		if(first()){
			print("So yeah, just a tip, you need to wire the 'Parent' input on this chip to an entity marker (which should be linked to your parent prop). The E2 will check every 2-3 seconds to see if you've wired it.)")
		}
		timer("Check for Parent",2500)
	}
}

if(clk("Reweld"))
{
    for(I = 1, ReWeld:count())
    {
        E = ReWeld[I,entity]
        E:weld(Parent)
    }
}

"We fear that which we cannot see... we respect that which we cannot see... thus the blade will be wielded."

Urahara_Bleach_Signature_by_Harty73.png

Comments

  • NinjrKillrNinjrKillr Registered Posts: 175
    So I've updated the E2 to tell you if you haven't wired the Parent input, and automatically check (every 2-3 seconds) to see if you've wired it. I've also updated the OP to have instructions and some notes about operation of the E2.

    Cheers to Clak for pointing out that it wasn't very obvious as to what you had to do, and more suggestions / comments can be sent to me on steam (if I'm online, which i'm not very much these days) or posted on my threads.

    "We fear that which we cannot see... we respect that which we cannot see... thus the blade will be wielded."

    Urahara_Bleach_Signature_by_Harty73.png

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file