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


Moving Bank - Requested by Mysterio

View previous topic View next topic Go down

Moving Bank - Requested by Mysterio

Post by Zkyo on Tue Apr 20, 2010 9:57 am

This will create a bank that has a 10% chance of malfunctioning, and if it does, you have to rehack it. Also, there would be a 33% chance that, if it malfunctions, the bank would move completely. The model won’t move unless you use lmd_door, but the trigger will. Since I have written out a full bank twice, I will not go into as much detail for the basic parts.

First, place 2+ models for the bank. (map_objects/imperial/controlpanel)

Next, place a hackable trigger in front of each of the banks. Make sure they have different targetnames, such as using bank_trig1 and bank_trig2. Also, set the spawnflags to 136 so that it starts deactivated, and is pressable.
Code:
/place trigger_multiple 0 maxs,20 20 30,mins,-20 -20 -30,spawnflags,132,usetime,6000,target,bank_delay,targetname,bank_trig1

Basic coding for a malfunctioning bank. Just follow the targetnames. I will go into more detail at the malfunctioning part.
Code:
/place target_delay * targetname,bank_delay,target,bank_hack
/place target_delay * targetname,bank_hack,target,bank_test,wait,60
/place target_delay * targetname,bank_hack,target,bank_test,wait,120
/place target_delay * targetname,bank_hack,target,bank_test,wait,180
/place target_delay * targetname,bank_hack,target,bank_test,wait,240
/place target_delay * targetname,bank_hack,target,bank_test,wait,300
/place target_delay * targetname,bank_hack,target,bank_done,wait,360

/place target_random * targetname,bank_test,target,bank_random

/place target_relay * targetname,bank_random,target,bank_cr
/place target_relay * targetname,bank_random,target,bank_cr
/place target_relay * targetname,bank_random,target,bank_cr
/place target_relay * targetname,bank_random,target,bank_cr
/place target_relay * targetname,bank_random,target,bank_cr
/place target_relay * targetname,bank_random,target,bank_cr
/place target_relay * targetname,bank_random,target,bank_cr
/place target_relay * targetname,bank_random,target,bank_cr
/place target_relay * targetname,bank_random,target,bank_cr
/place target_relay * targetname,bank_random,target,bank_miss

/place target_credits * targetname,bank_cr,count,120,random,120
/place target_deactivate * targetname,bank_miss,target,bank_test
/place target_activate * targetname,bank_delay,target,bank_test
/place target_relay * targetname,bank_done,target,bank_test

Finally, the moving part. This will activate if a malfunction is hit.
The random and 33% chance for moving. Make sure that the relay for the other 66% is not targeting anything. Set the target to something that you probably will never use again, such as bank_lolnevertobeused.
Code:
/place target_random * targetname,bank_miss,target,bank_movetest
/place target_relay * targetname,bank_movetest,target,bank_lolnevertobeused
/place target_relay * targetname,bank_movetest,target,bank_lolnevertobeused
/place target_relay * targetname,bank_movetest,target,bank_move

Now we have a chance of it moving. To have it actually move, place a random, and set it to deactivate all bank triggers, and activate a random one. Have a target_activate and deactivate for each possible bank trigger.
Code:
/place target_delay * targetname,bank_move,target,bank_moveoff,wait,1
/place target_deactivate * targetname,bank_moveoff,target,bank_trig1
/place target_deactivate * targetname,bank_moveoff,target,bank_trig2
/place target_deactivate * targetname,bank_moveoff,target,bank_trig3
/place target_deactivate * targetname,bank_moveoff,target,bank_trig4

/place target_delay * targetname,bank_moveoff,target,bank_move_random,wait,1
/place target_random * targetname,bank_move_random,target,bank_move_test
/place target_activate * targetname,bank_move_test,target,bank_trig1
/place target_activate * targetname,bank_move_test,target,bank_trig2
/place target_activate * targetname,bank_move_test,target,bank_trig3
/place target_activate * targetname,bank_move_test,target,bank_trig4

Now, we want to have a relay so that a random bank will activate when the map starts.
Code:
/place target_relay * targetname,initial_entity,target,bank_move_random

Finally, place the messages.
Code:
/place target_print * targetname,bank_delay,spawnflags,16,message,^3The bank has been Hacked.
/place target_print * targetname,bank_done,spawnflags,16,message,^3The bank is complete.
/place target_print * targetname,bank_miss,spawnflags,16,message,^1The bank has malfunctioned!
/place target_print * targetname,bank_moveoff,spawnflags,16,message,^1The bank has moved!

If you want, add an alarm sound when it malfunctions or moved.
Code:
/place target_speaker * targetname,bank_miss,spawnflags,4,noise,sound/effects/mpalarm
/place target_speaker * targetname,bank_moveoff,spawnflags,4,noise,sound/effects/mpalarm


Last edited by Zkyo on Mon Sep 05, 2011 5:25 am; edited 1 time in total

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: Moving Bank - Requested by Mysterio

Post by Nox on Sat Jun 25, 2011 7:59 am

There's a little mistake:
Code:
/place trigger_multiple 0 maxs,20 20 30,mins,-20 -20 -30,spawnflags,136,usetime,6000,target,bank_delay,targetname,bank_trig1

Spawnflags should be 132 instead, otherwise it's not hackable (136 => "Won't fire unless player/npc is in it and pressing fire button")

Nox
Just Registered
Just Registered

Posts : 1
Join date : 2010-12-12

View user profile http://nox.me

Back to top Go down

Re: Moving Bank - Requested by Mysterio

Post by Guest on Sun Sep 04, 2011 5:41 am

I try'd it didnet work hopefully ill be able to show you on a notepad what i did, get on xfire soon pls.

Guest
Guest


Back to top Go down

Re: Moving Bank - Requested by Mysterio

Post by Zkyo on Mon Sep 05, 2011 5:25 am

Nox wrote:There's a little mistake:
Code:
/place trigger_multiple 0 maxs,20 20 30,mins,-20 -20 -30,spawnflags,136,usetime,6000,target,bank_delay,targetname,bank_trig1

Spawnflags should be 132 instead, otherwise it's not hackable (136 => "Won't fire unless player/npc is in it and pressing fire button")
Just noticed that post... you're right, ill change it Very Happy

Mysterio wrote:I try'd it didnet work hopefully ill be able to show you on a notepad what i did, get on xfire soon pls.
Yeah, that's one of the more complicated guides i wrote. I only built it once, like a month before i wrote the guide, so i could have easily made a mistake somewhere.

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: Moving Bank - Requested by Mysterio

Post by Sponsored content Today at 1:13 pm


Sponsored content


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