Welcome, Guest
Username Password: Remember me

Round start logic? (and map scripts?)
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Round start logic? (and map scripts?)

Round start logic? (and map scripts?) 11 years, 3 months ago #120335

Hey all, first time posting here

I have a question about how I would go about using the "TTTBeginRound" hook to trigger the openning of doors at the beginning of each round for a Trouble in Terrorist Town map.

Secondly, I'm pretty new to TTT mapping, and GMod mapping in general, and I don't really understand how to include scripts in maps (or if you even can). However I'm pretty comfortable with Lua.

Thanks in advance.

Edit: can't believe I misspelled the first word in the subject.
  • SweedJesus
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
Last Edit: 11 years, 3 months ago by SweedJesus.

Re: Roud start logic? (and map scripts?) 11 years, 3 months ago #120336

You could save yourself the hassle and just tell people to press E on the doors.

Serious reply by the way.
  • Rake
  • OFFLINE
  • Legendary Member
  • Diamond VIP
  • A Minge's Nightmare!
  • Posts: 3711
  • Karma: 28
  • I Voted in Global Mod 2014

Re: Roud start logic? (and map scripts?) 11 years, 3 months ago #120337

Taken, but I think you misinterpreted my goal (I just need to clarify).

I want to keep all the players in one room until the round starts, thus the doors open only when the round starts.

Edit: thanks for the quick reply by the way.
  • SweedJesus
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
Last Edit: 11 years, 3 months ago by SweedJesus.

Re: Roud start logic? (and map scripts?) 11 years, 3 months ago #120338

In SDK do you have a func_door_rotating or another brush entity?

You can fire an entity input from Lua in garrysmod, including hammer created entities. If you don't want to rely on server code however you can build in the code to the map. Add the garrysmod hammer FGD file and look at the lua_run entity.
  • Chuteuk
  • OFFLINE
  • Site Administrator
  • Diamond VIP
  • Ambassador />
					</li>
							
				<li class=
  • Posts: 1014
  • Karma: 166
  • I Voted in Global Mod 2014

Re: Roud start logic? (and map scripts?) 11 years, 3 months ago #120374

I don't know how I managed to miss the instruction on the TTT mapping guide but the "ttt_map_settings" entity is all I needed. It fires on RoundStart

but thanks for the "lua_run" tip, I'm sure I'll end up using that for more complicated parts of my map.

Thanks again,
SweedJesus
  • SweedJesus
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
  • Page:
  • 1
Time to create page: 0.43 seconds