Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Help and Support v
« Previous 1 2 3 4 5 6 … 21 Next »
e2 code to display wormhole direction
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
e2 code to display wormhole direction
09-05-2020, 08:49 AM,
#1
Funlax Offline
TSCM Donator
***
Posts: 48
Threads: 24
Joined: Sep 2019
e2 code to display wormhole direction
I know the title is confusing.
but i am trying to code a e2 chip so that it will display 'Incoming' or 'Outgoing' on any screen for the wormhole status.

when the wormhole has been made to go out, i would like the screen to say 'Outgoing'
and 'Incoming' when i have an incoming wormhole

im not the best at coding, so some help would be great!

i know i could just use one of y'alls coded stargate dialing computers, but i have made a dhd with wire components. this is the last piece of the puzzle that i need.

[Image: 0275f90af1a353220a7ae2a26ed3de997b4efd5d...270_hq.gif]
Find
Reply
09-05-2020, 09:41 AM, (This post was last modified: 09-05-2020, 09:42 AM by Ethan Vondwarf. Edited 1 time in total.)
#2
Ethan Vondwarf Offline
I will go down with Destiny.
****
Posts: 305
Threads: 95
Joined: Mar 2015
RE: e2 code to display wormhole direction
You could use the "Incoming" output on the stargate to come up with a "if" statement like:

if(Open == 1){
if(Incoming == 1){
Inbound = 1
Outbound = 0
}
else{
Inbound =0
Outbound = 1
}

'You are always moving, even when your standing still.' Me - 2016
Find
Reply
09-05-2020, 12:46 PM, (This post was last modified: 09-05-2020, 01:06 PM by The17thDoctor. Edited 2 times in total.)
#3
The17thDoctor Offline
TSCM Average Enjoyer
****
Posts: 1,100
Threads: 249
Joined: Oct 2015
RE: e2 code to display wormhole direction
What kind of screen would it be ? An EGP / SF Screen or a Text Screen ?

Here you go :
--@name Stargate Status
--@author Doc for Jesus <3
--@class processor

wire.createInputs({"Active","Inbound"},{"Normal","Normal"})
wire.createOutputs({"Status"},{"String"})

wire.ports.Status = "Not Wired"

hook("input","Stargate Check",function(name,value)
if name == "Active" then
if value == 1 then
wire.ports.Status = "Outbound"
else
wire.ports.Status = "Inactive"
end
elseif name == "Inbound" then
if value == 1 then
wire.ports.Status = "Inbound"
end
end
end)

The17thDoctor: Server take me to the most handsome person
srcds_linux: I cant send people to themselves...
Website Find
Reply
09-05-2020, 01:09 PM,
#4
Knight Offline
Valued donator and member
****
Posts: 397
Threads: 21
Joined: Nov 2013
RE: e2 code to display wormhole direction
(09-05-2020, 12:46 PM)The17thDoctor Wrote: What kind of screen would it be ? An EGP / SF Screen or a Text Screen ?

Here you go :
--@name Stargate Status
--@author Doc for Jesus <3
--@class processor

wire.createInputs({"Active","Inbound"},{"Normal","Normal"})
wire.createOutputs({"Status"},{"String"})

wire.ports.Status = "Not Wired"

hook("input","Stargate Check",function(name,value)
if name == "Active" then
if value == 1 then
wire.ports.Status = "Outbound"
else
wire.ports.Status = "Inactive"
end
elseif name == "Inbound" then
if value == 1 then
wire.ports.Status = "Inbound"
end
end
end)

You know they said E2 right?




Find
Reply
09-05-2020, 02:29 PM,
#5
The17thDoctor Offline
TSCM Average Enjoyer
****
Posts: 1,100
Threads: 249
Joined: Oct 2015
RE: e2 code to display wormhole direction
(09-05-2020, 01:09 PM)Knight Wrote: You know they said E2 right?

I coded things for him before, E2 or SF does not matter to him, what matters is the result.

The17thDoctor: Server take me to the most handsome person
srcds_linux: I cant send people to themselves...
Website Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.