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

Register

Team Spartan Cookies & Milk Forums Garry's Mod Expression 2 v
« Previous 1 2 3 4 5 … 8 Next »
Release Descending Bridge E2
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
Release Descending Bridge E2
09-10-2016, 03:39 PM, (This post was last modified: 13-10-2016, 03:24 PM by Sharp.)
#1
Sharp Offline
TSCM Member
***
Posts: 32
Threads: 11
Joined: Aug 2016
Descending Bridge E2
This E2 uses setPos to descend your bridge into the hull. It works with 3 entities, but you can add more or even better, parent things to those entities to take it with them.

Thanks to ATM who provided me with the original code on which I based this on.
Code:
@name DescendingBridge @inputs [Door1 Door2 Door3]:entity Input @outputs CD STATE @persist MOVE SOUND:string CD STATE @trigger SOUND = "doors/doormove2.wav" if(first()){ MOVE = 0 CD = 0 STATE = 0 } if(Input & CD == 0){ CD = 1 if(STATE == 0) { STATE = 1 timer("moveout", 50) entity():soundPlay(1, 0, SOUND) }elseif(STATE == 1){ STATE = 0 timer("movein", 50) entity():soundPlay(2, 0, SOUND) } } if(clk("moveout")){ Door1:setPos(Door1:pos()+vec(0, 0, -2.5)) Door2:setPos(Door2:pos()+vec(0, 0, -2.5)) Door3:setPos(Door3:pos()+vec(0, 0, -2.5)) timer("moveout", 1) MOVE++ if(MOVE == 60){ stoptimer("moveout") MOVE = 0 soundStop(1) CD = 0 } } if(clk("movein")){ Door1:setPos(Door1:pos()+vec(0, 0, 2.5)) Door2:setPos(Door2:pos()+vec(0, 0, 2.5)) Door3:setPos(Door3:pos()+vec(0, 0, 2.5)) timer("movein", 1) MOVE++ if(MOVE == 60){ stoptimer("movein") MOVE = 0 soundStop(2) CD = 0 } }

Maybe you could increase the time it takes to descend or perhaps make it more stable? Maybe modify it for taller bridges?

With the setPos command, 2.5 is the height of any modbridge thing that is one tall.
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
Descending Bridge E2 - by Sharp - 09-10-2016, 03:39 PM
RE: Descending Bridge E2 - by Eustace Fargo - 11-10-2016, 08:50 PM
RE: Descending Bridge E2 - by I_nos0pedJFK - 18-01-2017, 04:05 PM

  • 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.