Well, the other day I was checking out a tutorial to make a toggleable security system and I was like, wow.. I doubt anyone understands this.. So what I did was turn it into 1 E2 chip. With the help of Bull from the wiremod forum. I was able to perfect it. Alright so on with the tut. :)
1) Create a new E2 chip with the following code:
@name Security Chip V2
@inputs Ranger1 Ranger2 Ranger3 Ranger4
@outputs Explode Indicator Owner:entity
if(first()|duped()){
Owner=entity():owner()
runOnChat(1)
hint("~Security System~",20)
hint("Type /on to Activate",20)
hint("Type /off to Deactivate",20)
hint("Concept/Partial Coding by Iced Out",20)
hint("Perfected by Bull",20)
}
if ( chatClk(Owner) ) {
LastSaid = Owner:lastSaid()
if ( LastSaid == "/on") {
Indicator=1
}
elseif ( LastSaid == "/off") {
Indicator=0
}
}
if (Indicator & ( Ranger1 | Ranger2 | Ranger3 | Ranger4 ) ) {
Explode = !Explode
}
else {
Explode = 0
}
2) Spawn it anywhere
3) Spawn 4 Rangers {Desired length} with Ignore world Checked (Up and down line)
4) Spawn a Wired Indicator anywhere
5) Spawn a Wired Explosive where you want
--Wire time--
6) Indicator: A -> E2: Indicator
7) E2:Ranger1 -> Ranger:Dist (First Ranger)
8) E2:Ranger2 -> Ranger:Dist (Second Ranger)
9) E2:Ranger3 -> Ranger:Dist (Third Ranger)
10) E2:Ranger4 -> Ranger:Dist (Fourth Ranger)
11) E2:Explode -> Explosive:Detonate
Now type /on to activate Security System
and /off to deactivate Security System
Have fun! :) -Iced Out
Don't Understand? Leave a comment below and I'll be sure to get back to you. :)
0 comments:
Show/Hide CommentsPost a Comment