Hi,
Here's another tutorial by request, in this tutorial i show you how to link machines to controls, so we can active or disable machines with a control just like for zanzibar gate!
This is pretty easy but i am going to explain in depth so you can see all the possibilities.
Here is an example:
http://youtube.com/watch?v=8v20GctkI6Y
What we need:
#I will be using Entity 1.6UE
#Any mp map, preferable with already mach and ctrl(zanzibar,containement)
#Latest scnr plugin
Before starting, i am not going to explain how to add machines to a map or ctrl, if your map doesn't have mach placement, mach palette, Power Groups, control palette and control placement reflexive on scnr, first inject the tags of the palettes and then copy the reflexives from the map that has it to you map, i highly recomend to take zanzibar ctrl, mach and Power Groups to start as there's a single one and it's pretty easy to add.
Setting up Power Groups
Now you have mach placement, mach palette, Power Groups, control palette and control placement reflexive on scnr
And the tags of course, we are going to link the machine to the control.
Open scnr on the meta editor
Go to Power Groups
If you took zanzibar's power gorup you should have one chunk, a power group is used to link our control and machine, in fact this is going to constatly mezmorize a position, on or off (1 or 0)
The control and the machine are going to be linked to a power group name, which is our chunk here, when the control is turned on it is going to "send the signal" to the power group and set the power group on, the machine will then take the position that the device group has, simple as this.
Of course bungie could have directly linked the mach to a control, but this is much more useful because we can use a control to enable several machines at the same time.
You will also note that a power group chunk has a name, each name must be unique on this reflexive of course, just like script objects.
The name of the power group can be used on scripts, we can use this to know the position of a power group(so a control and a machine) so something happens when the control is turned on(using a continous script type) or we can turn on or turn off the powergroup(and so the control and machine) with a script.
Useful isn't it? you can then imagine a lot of posibilities.
Also control placement chunks and machine can be referenced on scripts object so you can reference the machine and control on scripts too, the name is just the second value on the placement reflexive.
Right, now name your group to wharever you want, don't use spaces or wreid character, just alphabetical and alphanumeric and also the underscore _ instead of spaces.
This is what Power groups reflexive looks on the meta editor:
Piston0 is the name of our power group, which can be changed and is used to reference power groups on scripts.
The intial value which can be 0 or 1 defines if the device group will be 0(off) or 1(on) when the game starts.
If the flag "use only once" is checked our device group will be only usable once, which means that we can only activate the control one time.
In this example i want to make a control linked to my machine so i can enable and disable my machine as many times as i want, so setup the chunk as i show on the image above, you can name whatever you want.
Setting up the machine
Now the machine, go to machine placement reflexive, which is just under power groups...
Select the placement chunk of the machine you want to activate with the control.
We need to link the machine placement chunk(mach spawn) to the power group, which is pretty simple just select the power group chunk on "power group chunk #"
Then you can select the "position group chunk #" which is in fact the position of our machine, 0 turned off and 1 tuned on at start, set it to 0 because we want it to be turned off so we turn it on with the control.
The unique ID, this is some apart, but really important, each placement chunk needs to have a unique ID so the spawn is sycn on system link and it updates the status of the object on system link.
When you clone placement chunks you will need to create a unique ID for each cloned chunk because if there is the same unique id several time on the placement chunks those new cloned chunks won't spawn the object on system link for the players(only for host) so i usualy simply set the unique ID to the chunk number, that way i make sure it will work.
Setting up the control
Now go to control placement(just under machine placement), select the control placement chunk you want to link to your machine.
We need to link the ctrl placement chunk(ctrl spawn) to the power group, which is pretty simple just select the power group chunk on "power group chunk #" which must be the same as you choose for the machine you wanted to control with this switch.
Then you can select the "position group chunk #" which is in fact the position of control (or switch,call it whatever you want), 0 turned off and 1 tuned on at start, set it to 0 because we want it to be turned off so we turn it on and the machine will be enabled.
Same for the Unique ID just like for we did for mach, as you can see placement reflexive have all almost the same structure.
That's it, you have successfully made a machine controled by a switch.
Now if you want to add more just clone the chunks, power ground, machine placement and control placement, you need to make unique ID for each placement chunks so it works on syslink,rename power groups and link the mach and ctrl with power groups just like i explained.
If you have any question feel free to ask ^^
-neodosssss
Moved to main tutorials section.
~DS
Linking machines to controls(switch)
- JK-47
- Posts: 153
- Joined: Wed Jan 16, 2008 5:43 am
- Location: Washington
Re: Linking machines to controls(switch)
Awesome. I'm gonna have fun playing with this.
- Yamagushi
- Posts: 67
- Joined: Wed Mar 19, 2008 3:02 am
- Location: America
- Contact:
- Skrillaka
- Posts: 11
- Joined: Thu Mar 06, 2008 7:51 am
Re: Linking machines to controls(switch)
Heya just wondering
Does a control have to be connected to a [mach]
maybe having a control panel activating an effect in say the sky?
Just asking
thanks
Does a control have to be connected to a [mach]
maybe having a control panel activating an effect in say the sky?
Just asking
thanks
- Aumaan Anubis
- Staff
- Posts: 1812
- Joined: Thu Dec 13, 2007 12:18 am
- Contact:
Re: Linking machines to controls(switch)
What kind of effect?
- neodos
- Posts: 1493
- Joined: Sun Dec 09, 2007 8:58 pm
Re: Linking machines to controls(switch)
Yes you could do something like that, i did it on my soda machine mod, the control is linked to a device group, with a script checking for the position of the device group, whenever the device group change of position(meaning that you actived the switch) the script will then execute the code and do whatever you want, however enabling an effect on the sky i think spawning an effect(scen) wouldn't work for others players on syslink.
But there's another solution, you place your ctrl, a machine which generaters the sky effect when it's enabled and put ctrl and the mach on the device group, syslink and no need of script at all
But there's another solution, you place your ctrl, a machine which generaters the sky effect when it's enabled and put ctrl and the mach on the device group, syslink and no need of script at all
- Skrillaka
- Posts: 11
- Joined: Thu Mar 06, 2008 7:51 am
Re: Linking machines to controls(switch)
Kewl thanks guys
This has been a Big help
I had an idea to have a ctrl Activating a different sky
e.g two [sky] tags and when hitting the ctrl the second sky overlaps the first as in Spawns the sky really high but close enough to block the original sky from view
It's an idea for a new mod
But i'm not sure if it's possible.. would be great to find out how though
Should go back to topic though :p
Thanks again
This has been a Big help
I had an idea to have a ctrl Activating a different sky
e.g two [sky] tags and when hitting the ctrl the second sky overlaps the first as in Spawns the sky really high but close enough to block the original sky from view
It's an idea for a new mod
But i'm not sure if it's possible.. would be great to find out how though
Should go back to topic though :p
Thanks again
- Yamagushi
- Posts: 67
- Joined: Wed Mar 19, 2008 3:02 am
- Location: America
- Contact:
Re: Linking machines to controls(switch)
If anyones using the light switch and would like it to turn on and off instantly opposed to the slow transition it currently has follow this;
Open your CTRLs meta. Scroll down.
Change both Position Transition Time and Position Acceleration Time to 999.
Save.
Open the MACH of the light. Scroll down.
Change both Position Transition Time and Position Acceleration Time to 999.
Save.
This is what the almost final product can do;
http://www.youtube.com/watch?v=esO66qmOO28
Open your CTRLs meta. Scroll down.
Change both Position Transition Time and Position Acceleration Time to 999.
Save.
Open the MACH of the light. Scroll down.
Change both Position Transition Time and Position Acceleration Time to 999.
Save.
This is what the almost final product can do;
http://www.youtube.com/watch?v=esO66qmOO28
Last edited by Yamagushi on Sat Mar 29, 2008 3:41 am, edited 1 time in total.
- CaptainPoopface
- Posts: 714
- Joined: Sat Feb 16, 2008 5:47 am
Re: Linking machines to controls(switch)
Nice. I like your little room, too. Are you going to add more things to it, or release?
- Yamagushi
- Posts: 67
- Joined: Wed Mar 19, 2008 3:02 am
- Location: America
- Contact:
Re: Linking machines to controls(switch)
Its a supriseCaptainPoopface wrote:Nice. I like your little room, too. Are you going to add more things to it, or release?