Latest topics
» Help with trigger_usescript
Thu Sep 22, 2016 8:16 am by flanagon

» New Lugormod U# (Windows + Linux)
Thu Sep 22, 2016 7:03 am by Ufo

» Single Round Team Quest
Thu Jul 23, 2015 10:39 pm by agent6141

» iobject terminal
Thu Sep 25, 2014 2:39 pm by flanagon

» Usefull Downloads
Thu Aug 07, 2014 12:35 am by Kimmeh

» Television
Thu Jan 09, 2014 2:25 am by Mr. Swister

» Lugormod U# on server
Wed Jan 08, 2014 11:08 pm by Shadow

» Teleporter with effects
Thu Jan 02, 2014 5:51 am by Pierry

» Some possibly useful addons
Thu Jan 02, 2014 5:50 am by Pierry


Malfunctioning Bank - Requested by Mysterio

View previous topic View next topic Go down

Malfunctioning Bank - Requested by Mysterio

Post by Zkyo on Sat Apr 10, 2010 4:31 pm

This is just a bank that has a chance of malfunctioning. If this happens, the player needs to rehack to get any more credits. For this example, it will be a 20% chance.

The button
Code:
/place misc_model_breakable 0 model,map_objects/imperial/control_panel,spawnflags,1

Trigger to hack
Code:
/place trigger_multiple 0 maxs,15 15 30,mins,-15 -15 -30,spawnflags,4,usetime,8000,target,bank_hackdelay

Delays to the credits
Code:
/place target_delay * targetname,bank_hackdelay,target,bank_hack,wait,2 (This is needed to ensure that the credits unlock when re-hacking)
/place target_delay * targetname,bank_hack,target,bank_random,wait,45
/place target_delay * targetname,bank_hack,target,bank_random,wait,90
/place target_delay * targetname,bank_hack,target,bank_random,wait,135
/place target_delay * targetname,bank_hack,target,bank_random,wait,180
/place target_delay * targetname,bank_hack,target,bank_random,wait,225
/place target_delay * targetname,bank_hack,target,bank_done,wait,270

The malfunctioning part
Code:
/place target_random * targetname,bank_random,target,bank_random2
/place target_relay * targetname,bank_random2,target,bank_malfunction
/place target_relay * targetname,bank_random2,target,bank_cr
/place target_relay * targetname,bank_random2,target,bank_cr
/place target_relay * targetname,bank_random2,target,bank_cr
/place target_relay * targetname,bank_random2,target,bank_cr (I entered this 4 times to make it a 4/5 chance of getting Cr)

Other needed entities
Code:
/place target_deactivate * targetname,bank_malfunction,target,bank_random
/place target_activate * targetname,bank_hackdelay,target,bank_random
/place target_relay * targetname,bank_done,target,bank_random

Messages
Code:
/place target_print * targetname,bank_hackdelay,spawnflags,16,message,^3The Bank was Hacked.
/place target_print * targetname,bank_done,spawnflags,16,message,^3The Bank is Complete.
/place target_print * targetname,bank_malfunction,spawnflags,16,message,^1The Bank has Malfunctioned.

The Credits
Code:
/place target_credits * targetname,bank_cr,count,50,random,120

Zkyo
Admin
Admin

Posts : 384
Join date : 2010-03-29
Age : 23
Location : Grand Rapids, Michigan, USA

View user profile http://lugorhelp.forumotion.com

Back to top Go down

Re: Malfunctioning Bank - Requested by Mysterio

Post by Guest on Sun Jul 01, 2012 9:09 pm

this work n and its rly good

Guest
Guest


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum