Garry's Mod Expression 2 if statements

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
835 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Feb 5, 2010

A tutorial on how to write an if statement in Expression 2 for Garry's Mod.

===Website===
www.GmodTech.net

===Servers===
91.192.210.167:27018 - gm_flatgrass
91.192.210.195:27015 - gm_botmap_v2

===E2 Code===
@name Expression Tutorial
@inputs Button1 Button2
@outputs Hydraulic

if(Button1 + Button2 == 1){Hydraulic = 100}
elseif(Button1 + Button2 != 1){Hydraulic = 0}

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (5)

Sign In or Sign Up now to post a comment!
  • hi snaggle,its me Mu.anifz :D

  • Thanks for uploading ^^

  • ok im looking to make a e2 that if mouse 1 is pressed x times then it will play a sound how would i do that?

  • never heard of | ? o else ? example if(Button1 |Button2){Hydraulic = 100}else{Hydraulic = 0}

    done. is that easy ?

  • NICe

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more