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 »
help with self-destruct timing
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
help with self-destruct timing
25-02-2020, 03:12 AM,
#1
Funlax Offline
TSCM Donator
***
Posts: 48
Threads: 24
Joined: Sep 2019
help with self-destruct timing
im currently trying to make it so when i press a button, there is a delay of 10s to run before the ship self destructs.

i have tried with no success. can someone give a step-by-step or something?

Thanks

[Image: 0275f90af1a353220a7ae2a26ed3de997b4efd5d...270_hq.gif]
Find
Reply
25-02-2020, 04:11 PM,
#2
mariofludd Offline
Novaaaaaaaaaaaaa
****
Posts: 528
Threads: 44
Joined: Dec 2013
RE: help with self-destruct timing
This E2 should work for what you want. you could do it with wire gates too but meh. If you want an SF ask someone that knows SF.

@name Self Destruct
@inputs Button
@outputs SD

if(Button == 1){
timer("T",10000)
}

if(clk("T")){
SD = 1
}

[Image: efN9HsZ.png]
Find
Reply
25-02-2020, 09:51 PM,
#3
Funlax Offline
TSCM Donator
***
Posts: 48
Threads: 24
Joined: Sep 2019
RE: help with self-destruct timing
(25-02-2020, 04:11 PM)mariofludd Wrote: This E2 should work for what you want. you could do it with wire gates too but meh. If you want an SF ask someone that knows SF.

@name Self Destruct
@inputs Button
@outputs SD

if(Button == 1){
timer("T",10000)
}

if(clk("T")){
SD = 1
}

Thanks

[Image: 0275f90af1a353220a7ae2a26ed3de997b4efd5d...270_hq.gif]
Find
Reply
26-02-2020, 10:03 AM, (This post was last modified: 26-02-2020, 10:06 AM by The17thDoctor. Edited 4 times in total.)
#4
The17thDoctor Offline
TSCM Average Enjoyer
****
Posts: 1,100
Threads: 249
Joined: Oct 2015
RE: help with self-destruct timing
Here's an SF version :
--@name Self Destruct
--@name Self Destruct
--@author Doccoboie
--@class processor

wire.createInputs({"Button"},{"normal"})
wire.createOutputs({"Selfdestruct"},{"normal"})

hook("input","inputhook",function(a,b)
if b == 1 then
time.simple(10,function() wire.ports.Selfdestruct = 1 wire.ports.Selfdestruct = 0 end)
end
end)

Note that if you spam it, it will create countless timers until it crashes so avoid spamming it Smile

The17thDoctor: Server take me to the most handsome person
srcds_linux: I cant send people to themselves...
Website Find
Reply
08-03-2020, 09:59 AM,
#5
mariofludd Offline
Novaaaaaaaaaaaaa
****
Posts: 528
Threads: 44
Joined: Dec 2013
RE: help with self-destruct timing
if you want an e2 version thats cancelable just ask

[Image: efN9HsZ.png]
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


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

Powered By MyBB, © 2002-2026 MyBB Group.