Main Forum > Pinball Discussion

How my coding has improved....

<< < (2/2)

yogiholzer:
Please repeat, but all in German please. That are "hieroglyphics" for me.

faralos:
what you did is still far beyond anything I understand
 so I guess I'll still have tons of coding in my pins
 except for maybe collections instead of writing it out longhand

Itchigo:
Here's one example. Say you have 3 toplanes, 3 switches, and 3 toplane lights.

Toplanes(x)_Hit()                  Toplanes is a collection, and whichever one is hit will register because of the (X)

Toplane switches(x).Isdropped=True      Here's the beautiful part. Whichever toplane was hit, the corresponding switch will drop. Why is this? It's because the order it was put in the collection. The same goes for the lights. It's all in the order it was put into the collection. This assumes this:

Toplanes collection:
Toplane1
Toplane2
Toplane3

Toplaneswitch collection
Toplaneswitch1
Toplaneswitch2
Toplaneswitch3

Toplanelightscollection
Toplanelight1
Toplanelight2
Toplanelight3

Assuming they were put into the collection, in this correct order, when toplane 1 is hit, Toplaneswitch1 will go down, and Toplanelight1 will go on.

I can't take credit for this, Koadic taught me this, and we all know how smart he is. I'm just beating it into the ground like a dead .... where's my dead horse emote? :whiteflag:

faralos:
Beating a dead horse image

Navigation

[0] Message Index

[*] Previous page

Go to full version