Fearless Forums
e2 creation (wiremod) - Printable Version

+- Fearless Forums (https://fearlessrp.net)
+-- Forum: General Discussion (https://fearlessrp.net/forumdisplay.php?fid=10)
+--- Forum: Off-Topic (https://fearlessrp.net/forumdisplay.php?fid=25)
+---- Forum: Archive (https://fearlessrp.net/forumdisplay.php?fid=41)
+---- Thread: e2 creation (wiremod) (/showthread.php?tid=61758)



e2 creation (wiremod) - Haarek - 06-28-2015

So if anyone has Wiremod expression2 I made this loading bar thing which goes down when you hold Mouse1
Since it is such a small code I figured I would share it and find out what you guys think. I made some other creations like steering, gunshops and whatnot and I figured I will try to mount this to my car to make some kind of fuel system. 
(So when the bar goes fully down the car stops running)
Code:
runOnTick(1)
if(first())
   {X = 100}
   
if(owner():keyAttack1())
   {X -=10}    
   
if(X <= 0 )
    {X = 100}
   
#1=========Indicator===============
holoCreate(1)
holoPos(1, entity():pos()+ vec(0,0,16))
holoColor(1,vec(0,115,255))
holoModel(1,"box")


#2========Base================
holoCreate(2)
holoPos(2,entity():pos()+vec(0,0,7.25))
holoScaleUnits(2,vec(3,3,0.5))


if(X==100)
   {holoScaleUnits(1,vec(2,2,17))
       holoPos(1,entity():pos()+ vec(0,0,16))}
   
if(X==90)
   {holoScaleUnits(1,vec(2,2,15.5))
       holoPos(1,entity():pos()+ vec(0,0,15))}

if(X==80)
   {holoScaleUnits(1,vec(2,2,13.5))
       holoPos(1,entity():pos()+ vec(0,0,14))}

if(X==70)
   {holoScaleUnits(1,vec(2,2,11.5))
       holoPos(1,entity():pos()+ vec(0,0,13))}
   
if(X==60)
   {holoScaleUnits(1,vec(2,2,9.5))
       holoPos(1,entity():pos()+ vec(0,0,12))}

if(X==50)
   {holoScaleUnits(1,vec(2,2,7.5))
       holoPos(1,entity():pos()+ vec(0,0,11))}
   
if(X==40)
   {holoScaleUnits(1,vec(2,2,5.5))
       holoPos(1,entity():pos()+ vec(0,0,10))}
   
if(X==30)
   {holoScaleUnits(1,vec(2,2,3.5))
       holoPos(1,entity():pos()+ vec(0,0,9))}

if(X==20)
   {holoScaleUnits(1,vec(2,2,1.5))
       holoPos(1,entity():pos()+ vec(0,0,8))}

if(X==10)
   {holoScaleUnits(1,vec(2,2,0))
       holoPos(1,entity():pos()+ vec(0,0,7.55))}
All you need to do to set it up is place a screen and wire the A of the screen to the X of the chip.

I don't know if anyone even uses wiremod because this is a RP community but I thought I might share it anyways because I thought it was pretty cool. 


RE: e2 creation (wiremod) - Weecow - 06-28-2015

Not the most clean code but well done Wink


RE: e2 creation (wiremod) - Haarek - 06-29-2015

(06-28-2015, 10:30 AM)Weecow Wrote: Not the most clean code but well done Wink

Thanks, I am not very good with this yet. I tried adding a loop instead of repeating the same things over and over agIn but it didn't work or I couldn't figure it out.