variables

Discuss the construction of maps and the tools to create maps for 3D games.
Post Reply
ingewanduh
Posts: 13
Joined: Mon Nov 14, 2011 9:05 pm

variables

Post by ingewanduh »

I found a way to make sort of variables using my trigger that triggers a trigger system.
I don't know if this is done before, but I though I post it here

you have 2 different variable types
one with one output, when the variable is 1 something will get triggered while when its 0, nothing will.
and one with 2 outputs, when its 1 something will get triggered and when its 0, something also gets triggered

for 1 output:
so, just make a button, which you have to set up so it can be triggered by a shot, the target will be your output
then make a func_door, right in front of the button, (or next to right in front if u want a inverse trigger), set it so it will move away from the front of the button (or towards for inverse), put it on toggle and resetyou can ofcourse change it if you want your variable to change back after a certain time using wait). also set the name. mess around with the speed a little bit if u want. this will be your variable changer
finally make a trap_spikeshooter and place it in front of the button, but also before the door and set angles towards button, also set name. this will be your variable checker

for 2 outputs:
so, just make a button, which you have to set up so it can be triggered by a shot, the target will be your output_if 1
make another button, put it next to the other button, with the same settings. the target will be your output_if 0
then make a func_door, right in front of 1 button, set it so it will move in front of the other button, put it on toggle and reset to -1, you can of course change it if you want your variable to change back after a certain time using wait). mess around with the speed a little bit if u want. also set name. this will be your variable changer
finally make 2 trap_spikeshooter and place it in front of the buttons, but also before the door and set angles towards button, this will be your variable checker, name them the same (or different if u want another kind of trigger)


so, how do u use them?
so, with 1 outputs:
example: i have a room, with 2 floors, and i have a elevator, that starts at the bottom, and i want it to go to the top, but once i am on the top, i want to make shure it doesn't move down again. but when i am riding the elevator and suddenly decide to drop off, i don't want it to stay at the top, so how do you do that?
well, i though of 1 solution, which is, just make a trigger at the whole bottom level, so when i am at the bottom, while the elevator is at the top, it moves down again. however, if u have stairs inside your level you can go up onto, within the time the elevator is fully up again, you either have to: cover the entire lower area in a trigger brush, thats reachable within the time the elevator takes to go up, or: use my variables system:

how to do it with my variables system,
oke, just make your elevator, which you trigger by whatever., i used a trigger multiple,
make it by making a func_door at the bottom with a name of elevator or whatever, set the angle to up and the lip value to -how much the elevator has to move up next to its own height. set it to toggleable and set the reset (delay before close) to -1
next make a trigger_once just above the top area where your elevator will stop, set the target value to variable1changer
make the trigger which will activate the button, and set its target to relays (or whatever), next, make 2 relays, with a name of relays, and set 1 to activate the elevator, and the other to activate the variablechecker, but set the delay so it will fire once the elevator is on top, you have to test this with like a light or something and time it correctly.

make these things pretty small:
now for the variable stuff, make a func_button and set the output to the elevator, make shure you put the health to something higher than 0 (i just use 1). set the lip to 0 and reset to 0.
now make a func_door next to and in front of the button, make it the same size as the button. call it variable1changer (or whatever) and put the angles so it will move in front of the button, make it toggleable
and put the reset (delay before close) to -1
finally make the spike_shooter and put it in front of the button and before the door. change the name to variablechecker and put the angles so it will fire on the door.

what all of this does is basicly this:
if you get on the elevator and you ride onto the top, you will activate the variablechanger, which puts the door in front of the spikeshooter, the varablechecker is activated which shoots the spike on the door, and the elevator stays on top
but if u get on the elevator and get of it while its going to the top, you wont activate variablechanger, then variablechecker is activated (one's the elevator reaches the top), shoots a spike on the button, and sends the elevator back down again

that is just 1 example with what you can do with it. if someone could make more examples feel free to add them, and feel free to use this system, also if someone notices a mistake in my explanation, please say so.
Qrv
Posts: 45
Joined: Thu Oct 20, 2011 7:43 am
Location: Stuck in a Slipgate.

Re: variables

Post by Qrv »

Could you link us to a .map file showing this system in action?
I'm looking for a Mapper, Modeller/Animator and a Sound effect/Music person, to work on an exciting project. PM Me here, or catch me on IRC for further info.
ingewanduh
Posts: 13
Joined: Mon Nov 14, 2011 9:05 pm

Re: variables

Post by ingewanduh »

{
"classname" "worldspawn"
"classname" "worldspawn"
"sounds" "1"
"mapversion" "220"
"wad" "\program files\worldcraft\textures\id_base.hlwad;\program files\worldcraft\textures\rubicon.hlwad;\program files\worldcraft\textures\soegypt.hlwad;\program files\worldcraft\textures\skip.hlwad;\program files\worldcraft\textures\nathan_tex1.hlwad"
{
( -768 -512 544 ) ( -768 256 544 ) ( 0 256 544 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -768 256 512 ) ( -768 256 544 ) ( -768 -512 544 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 0 -512 512 ) ( 0 -512 544 ) ( 0 256 544 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 0 256 512 ) ( 0 256 544 ) ( -768 256 544 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -768 -512 512 ) ( -768 -512 544 ) ( 0 -512 544 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -768 256 512 ) ( -768 -512 512 ) ( 0 -512 512 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
}
{
( -768 256 0 ) ( -768 -512 0 ) ( 0 -512 0 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -768 -512 32 ) ( -768 -512 0 ) ( -768 256 0 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 0 256 32 ) ( 0 256 0 ) ( 0 -512 0 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -768 256 32 ) ( -768 256 0 ) ( 0 256 0 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 0 -512 32 ) ( 0 -512 0 ) ( -768 -512 0 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -768 -512 32 ) ( -768 256 32 ) ( 0 256 32 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
}
{
( -768 -512 512 ) ( -768 -512 32 ) ( -768 256 32 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -768 256 512 ) ( -768 256 32 ) ( -736 256 32 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -736 -512 32 ) ( -768 -512 32 ) ( -768 -512 512 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -768 -512 512 ) ( -768 256 512 ) ( -736 256 512 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -768 256 32 ) ( -768 -512 32 ) ( -736 -512 32 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -736 256 512 ) ( -736 256 32 ) ( -736 -512 32 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
}
{
( 0 256 512 ) ( 0 256 32 ) ( 0 -512 32 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -32 256 32 ) ( 0 256 32 ) ( 0 256 512 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 0 -512 512 ) ( 0 -512 32 ) ( -32 -512 32 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -32 256 512 ) ( 0 256 512 ) ( 0 -512 512 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -32 -512 32 ) ( 0 -512 32 ) ( 0 256 32 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -32 -512 512 ) ( -32 -512 32 ) ( -32 256 32 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
}
{
( -736 256 32 ) ( -32 256 32 ) ( -32 256 512 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -736 224 512 ) ( -736 256 512 ) ( -32 256 512 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -32 256 32 ) ( -736 256 32 ) ( -736 224 32 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -736 224 32 ) ( -736 256 32 ) ( -736 256 512 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -32 256 512 ) ( -32 256 32 ) ( -32 224 32 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -32 224 32 ) ( -736 224 32 ) ( -736 224 512 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
}
{
( -32 -512 32 ) ( -736 -512 32 ) ( -736 -512 512 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -32 -512 512 ) ( -736 -512 512 ) ( -736 -480 512 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -736 -480 32 ) ( -736 -512 32 ) ( -32 -512 32 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -736 -512 512 ) ( -736 -512 32 ) ( -736 -480 32 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -32 -480 32 ) ( -32 -512 32 ) ( -32 -512 512 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -736 -480 32 ) ( -32 -480 32 ) ( -32 -480 512 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
}
{
( -320 224 288 ) ( -32 224 288 ) ( -32 -480 288 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -320 -480 256 ) ( -32 -480 256 ) ( -32 224 256 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -32 224 256 ) ( -32 -480 256 ) ( -32 -480 288 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -320 224 256 ) ( -32 224 256 ) ( -32 224 288 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -32 -480 256 ) ( -320 -480 256 ) ( -320 -480 288 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -320 -480 256 ) ( -320 224 256 ) ( -320 224 288 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
}
{
( -448 -480 288 ) ( -736 -480 288 ) ( -736 224 288 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -448 224 256 ) ( -736 224 256 ) ( -736 -480 256 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -736 -480 256 ) ( -736 224 256 ) ( -736 224 288 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -736 224 256 ) ( -448 224 256 ) ( -448 224 288 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -448 -480 256 ) ( -736 -480 256 ) ( -736 -480 288 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -448 224 256 ) ( -448 -480 256 ) ( -448 -480 288 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
}
{
( -448 -64 288 ) ( -448 224 288 ) ( -320 224 288 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -320 224 256 ) ( -448 224 256 ) ( -448 -64 256 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -448 224 256 ) ( -320 224 256 ) ( -320 224 288 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -448 -64 256 ) ( -448 224 256 ) ( -448 224 288 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -320 224 256 ) ( -320 -64 256 ) ( -320 -64 288 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -320 -64 256 ) ( -448 -64 256 ) ( -448 -64 288 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
}
{
( -320 -480 288 ) ( -448 -480 288 ) ( -448 -192 288 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -448 -192 256 ) ( -448 -480 256 ) ( -320 -480 256 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -320 -480 256 ) ( -448 -480 256 ) ( -448 -480 288 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -448 -480 256 ) ( -448 -192 256 ) ( -448 -192 288 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -320 -192 256 ) ( -320 -480 256 ) ( -320 -480 288 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -448 -192 256 ) ( -320 -192 256 ) ( -320 -192 288 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
}
}
{
"classname" "info_player_start"
"origin" "-639 -383 64"
}
{
"classname" "func_door"
"spawnflags" "32"
"speed" "100"
"wait" "4"
"lip" "-224"
"angles" "-90 0 0"
"targetname" "elev1"
{
( -448 -192 48 ) ( -448 -64 48 ) ( -320 -64 48 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -448 -64 32 ) ( -448 -192 32 ) ( -320 -192 32 ) SO_B10A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -448 -192 32 ) ( -448 -64 32 ) ( -448 -64 48 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -320 -64 32 ) ( -320 -192 32 ) ( -320 -192 48 ) SO_B10A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -448 -64 32 ) ( -320 -64 32 ) ( -320 -64 48 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -320 -192 32 ) ( -448 -192 32 ) ( -448 -192 48 ) SO_B10A [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
}
}
{
"classname" "trigger_multiple"
"wait" "4"
"target" "relays1"
{
( -448 -64 80 ) ( -320 -64 80 ) ( -320 -192 80 ) TRIGGER [ 1 0 0 32 ] [ 0 -1 0 -32 ] 0 2 2
( -448 -192 48 ) ( -320 -192 48 ) ( -320 -64 48 ) TRIGGER [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -448 -64 80 ) ( -448 -192 80 ) ( -448 -192 48 ) TRIGGER [ 0 -1 0 32 ] [ 0 0 -1 32 ] 0 2 0.5
( -320 -64 48 ) ( -320 -192 48 ) ( -320 -192 80 ) TRIGGER [ 0 1 0 32 ] [ 0 0 -1 32 ] 0 2 0.5
( -320 -64 80 ) ( -448 -64 80 ) ( -448 -64 48 ) TRIGGER [ -1 0 0 32 ] [ 0 0 -1 32 ] 0 2 0.5
( -320 -192 48 ) ( -448 -192 48 ) ( -448 -192 80 ) TRIGGER [ 1 0 0 32 ] [ 0 0 -1 32 ] 0 2 0.5
}
}
{
"classname" "trigger_once"
"target" "variable1changer"
{
( -448 -64 304 ) ( -320 -64 304 ) ( -320 -192 304 ) TRIGGER [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -448 -192 288 ) ( -320 -192 288 ) ( -320 -64 288 ) TRIGGER [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -448 -64 304 ) ( -448 -192 304 ) ( -448 -192 288 ) TRIGGER [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -320 -64 288 ) ( -320 -192 288 ) ( -320 -192 304 ) TRIGGER [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -320 -64 304 ) ( -448 -64 304 ) ( -448 -64 288 ) TRIGGER [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -320 -192 288 ) ( -448 -192 288 ) ( -448 -192 304 ) TRIGGER [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
}
}
{
"classname" "func_button"
"speed" "100"
"health" "1"
"target" "elev1"
"angles" "0 90 0"
{
( -720 496 288 ) ( -680 496 288 ) ( -680 488 288 ) SO_B10B [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -720 488 248 ) ( -680 488 248 ) ( -680 496 248 ) SO_B10B [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -720 496 288 ) ( -720 488 288 ) ( -720 488 248 ) SO_B10B [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -680 496 248 ) ( -680 488 248 ) ( -680 488 288 ) SO_B10B [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -680 496 288 ) ( -720 496 288 ) ( -720 496 248 ) SO_B10B [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -680 488 248 ) ( -720 488 248 ) ( -720 488 288 ) SO_B10B [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
}
}
{
"classname" "func_door"
"spawnflags" "32"
"speed" "100"
"wait" "-1"
"targetname" "variable1changer"
"angles" "0 180 0"
{
( -680 488 288 ) ( -640 488 288 ) ( -640 480 288 ) SO_B10B [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -680 480 248 ) ( -640 480 248 ) ( -640 488 248 ) SO_B10B [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -680 488 288 ) ( -680 480 288 ) ( -680 480 248 ) SO_B10B [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -640 488 248 ) ( -640 480 248 ) ( -640 480 288 ) SO_B10B [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -640 488 288 ) ( -680 488 288 ) ( -680 488 248 ) SO_B10B [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -640 480 248 ) ( -680 480 248 ) ( -680 480 288 ) SO_B10B [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
}
}
{
"classname" "trap_spikeshooter"
"targetname" "variable1checker"
"angles" "0 90 0"
"origin" "-704 432 264"
}
{
"classname" "trigger_relay"
"target" "elev1"
"targetname" "relays1"
"origin" "-399 -480 140"
}
{
"classname" "trigger_relay"
"targetname" "relays1"
"delay" "2.5"
"target" "variable1checker"
"origin" "-476 -480 140"
}
Qrv
Posts: 45
Joined: Thu Oct 20, 2011 7:43 am
Location: Stuck in a Slipgate.

Re: variables

Post by Qrv »

Thanks for that, unfortuantly I cant load it however.

It looks to me like a Worldcraft map, mapversion 220 and all, but neither Worldcraft, Qoole or Radiant will load it, and thats with modifiy the wad param.

QAfter looking thru the raw .map tho, I think I get your idea.
I'm looking for a Mapper, Modeller/Animator and a Sound effect/Music person, to work on an exciting project. PM Me here, or catch me on IRC for further info.
ingewanduh
Posts: 13
Joined: Mon Nov 14, 2011 9:05 pm

Re: variables

Post by ingewanduh »

i tried to make a fully working password system whereas if u press 1 wrong button in the process, everything resets... too hard. spend like 3 hours on it and now i give up. :(
ingewanduh
Posts: 13
Joined: Mon Nov 14, 2011 9:05 pm

Re: variables

Post by ingewanduh »

i created the password system. took a while but hey, it works :D
http://www.2shared.com/file/JX1dXdk8/password2.html

thats a link to the rmf file.
ingewanduh
Posts: 13
Joined: Mon Nov 14, 2011 9:05 pm

Re: variables

Post by ingewanduh »

could someone please say whether or not they have seen something like this as in a password system for the normal quake?
also, you could prob make a timer that times how fast you were in the map and then shows it to you
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: variables

Post by Nahuel »

ingewanduh wrote:could someone please say whether or not they have seen something like this as in a password system for the normal quake?
also, you could prob make a timer that times how fast you were in the map and then shows it to you
the map doesn´t work for me, i do not have worldcraft, can you upload a *.map ?:)
hi, I am nahuel, I love quake and qc.
metlslime
Posts: 316
Joined: Tue Feb 05, 2008 11:03 pm

Re: variables

Post by metlslime »

these are called "logic gates", and yes they are useful when mapping with a standard progs.dat :)

I think the only issue with them is the "activator" variable might not be the player if a spike hit a button, so a centerprint to the activating player might not actually show up on that player's screen.
ingewanduh
Posts: 13
Joined: Mon Nov 14, 2011 9:05 pm

Re: variables

Post by ingewanduh »

Nahuel wrote:
ingewanduh wrote:could someone please say whether or not they have seen something like this as in a password system for the normal quake?
also, you could prob make a timer that times how fast you were in the map and then shows it to you
the map doesn´t work for me, i do not have worldcraft, can you upload a *.map ?:)
here you go, the .map and .bsp
http://www.megaupload.com/?d=ZQHQ6O9Q
Post Reply