Triggered Doors on Timers

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Shifty
Map Reviewer
Posts: 717
Joined: Sun Dec 15, 2002 11:53 pm
Location: UK
Contact:

Triggered Doors on Timers

Post by Shifty »

Hi I'm building a test map for a stargate project im working on and im doing some transport rings these will come up from the ground and teleport someone to another ring location so far ive got the the rings coming out of the ground using a func_door and trigger mulitiple combination but I've run into some problems

1. As you walk into the trigger the rings stay raised Is it possible to put a time limit onto this so the rings will sink back into the ground

2. As of yet i havnt added the transport function would it be possible to add the teleport function to the bottom ring and have it move with rings?

3. For Some Reason the rings Pulsate Red how can I stop this?

Thanks

Shifty
.MDT Webmaster, Mapper, Moddeler & Concept Artist
.Map Reviewer
Image
http://www.shiftys-bunker.tk Under Construction
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

#3 could be a pulsating texture like das_boot/ironwall1_pulse
Random
Moderator
Posts: 401
Joined: Sun Jun 01, 2003 11:00 pm

Post by Random »

Im not one for scripting but it sounds like you could do this that way. For example you script and object that moves up, waits then returns (come to think of it there is a door speed dohickie in the entity window, maybe that will help) Then the teleporter could maybe be scripted to to stay off until the script object is in the up state and turned off when it is in the down state. Sorry i cant be more specific but my scripting knowledge is limited but it sounds very doable.

As for the pulse there are several textures that have a pulsating effect in the shader. You could find the shader and edit it to your needs or give it a different texture.
Moderator
Image
Shifty
Map Reviewer
Posts: 717
Joined: Sun Dec 15, 2002 11:53 pm
Location: UK
Contact:

Post by Shifty »

Well i tired adding the teleport to a ring and making it a func_door but i just get a dialogue box saying failed to create entity is there anyway round this?

And thx for the reply wacko ill check that texture out
.MDT Webmaster, Mapper, Moddeler & Concept Artist
.Map Reviewer
Image
http://www.shiftys-bunker.tk Under Construction
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Re: Triggered Doors on Timers

Post by Bjarne BZR »

shifty wrote:1. As you walk into the trigger the rings stay raised Is it possible to put a time limit onto this so the rings will sink back into the ground
Yes it is. I'd suggest you make the stargate a script_object and use move commands on it instead of making it a door ( making it a door gives it strange side effects when it is blocked by a player ).
shifty wrote:2. As of yet i havnt added the transport function would it be possible to add the teleport function to the bottom ring and have it move with rings?
Yes. Bind the trigger that activates the teleport code to the stargate.
shifty wrote:3. For Some Reason the rings Pulsate Red how can I stop this?
Don't use a pulsating texture. (As the one mentioned by Wacko above) :)
Admin .MAP Forums
Image
Head above heels.
Shifty
Map Reviewer
Posts: 717
Joined: Sun Dec 15, 2002 11:53 pm
Location: UK
Contact:

Post by Shifty »

Wow Thanks Bjarne Im Confident that'll solve the problem but 1st can u tell me how to use the move commands and also how to bind?

Thanks Again
.MDT Webmaster, Mapper, Moddeler & Concept Artist
.Map Reviewer
Image
http://www.shiftys-bunker.tk Under Construction
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

shifty wrote:can u tell me how to use the move commands...
Yes I can. See my scripting tutorial. Some basic movement commands are listed in appendix A, in the movement section to be exact.
shifty wrote:...and also how to bind?
Here goes:

Code: Select all

$one_targetname bind $another_targetname
Sorry for beeing a bit unclear before... ;)
Admin .MAP Forums
Image
Head above heels.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

script

Post by tltrude »

You are going to have to script it if you want the effect from Stargate. There is a seperate trigger for teleport (trigger_teleport). You can turn that trigger off untill the rings finish moving with "nottriggerable", like this:

ring_teleporter:

$teleport_trigger nottriggerable
$ring_trigger waittill trigger
wait .2
$ring_cover movedown 256
$ring_cover move
$ring1 moveup 128
$ring1 waitmove
$ring2 moveup (96 + 16) //add thickness of ring
$ring2 waitmove
$ring3 moveup (64 + 16) //add thickness of ring
$ring3 waitmove
$ring4 moveup (32 + 16) //add thickness of ring
$ring4 waitmove
$ring_cover moveup 256
$ring_cover waitmove
$teleport_trigger triggerable
wait 2
ect... //see note
goto ring_teleporter
end

Note: Reverse the order and direction to put the rings back down. You can also add sounds and lighting effects to it. You may want to add rings at the teleport destination too and you can use the same targetnames to make those rings move at the same time as the first set. You will need a bigger delay so the player does not just teleport back to the starting point, if it is a two-way system--could get tricky.



Hope that helps!
Last edited by tltrude on Mon Sep 29, 2003 6:51 am, edited 3 times in total.
Tom Trude,

Image
Random
Moderator
Posts: 401
Joined: Sun Jun 01, 2003 11:00 pm

Post by Random »

Random wrote:Im not one for scripting but it sounds like you could do this that way. For example you script and object that moves up, waits then returns. Then the teleporter could maybe be scripted to to stay off until the script object is in the up state and turned off when it is in the down state. Sorry i cant be more specific but my scripting knowledge is limited but it sounds very doable.
Ah see i knew it could be done i just didnt know how. Shifty if you could let me know how this turns out i would be happy to share with you some textures i am converting for exchange of your lil teleporting thingamagiggie.
Moderator
Image
Shifty
Map Reviewer
Posts: 717
Joined: Sun Dec 15, 2002 11:53 pm
Location: UK
Contact:

Post by Shifty »

Wow thanks guys I'll have ago at it later on but now i've got to go to work and of course ill sharewhat i get

Thanks
.MDT Webmaster, Mapper, Moddeler & Concept Artist
.Map Reviewer
Image
http://www.shiftys-bunker.tk Under Construction
Shifty
Map Reviewer
Posts: 717
Joined: Sun Dec 15, 2002 11:53 pm
Location: UK
Contact:

Post by Shifty »

Ok Ive done a little test map and a script using tltrudes idea The Stargate Teleport works out fine but im having problems with the rings - as u touch the teleport trigger u are teleported straight away without the rings showing any ideas?

This is How I have it Set up

Stargate (Works Fine)

trigger_teleport - target : gatetravel
func_teleportdest - targetname : gatetravel

Ring Transportation (Not So Good)

Ringcover (script_object) targetname : ringcover
1st Ring (script_object) targetname : ring1
2nd Ring (script_object) targetname : ring2
3rd Ring (script_object) targetname : ring3
4th Ring (script_object) targetname : ring4
5th Ring (script_object) targetname : ring5
trigger_teleport - target : ringtravel
func_teleportdest - targetname : ringtravel

And Below is the Script

Code: Select all

// dm_chulak
main:

// set scoreboard messages 
setcvar "g_obj_alliedtext1" "" 
setcvar "g_obj_alliedtext2" "" 
setcvar "g_obj_alliedtext3" "" 
setcvar "g_obj_axistext1" "" 
setcvar "g_obj_axistext2" "" 
setcvar "g_obj_axistext3" "" 

setcvar "g_scoreboardpic" "none" //your score board picture 

level waittill prespawn 

exec global/DMprecache.scr

ring_teleporter: 
//PLAYER STEPS OVER RING COVER
$teleport_trigger nottriggerable 
$ring_trigger waittill trigger 
wait .2 
$ring_cover movedown 80 
$ring_cover move 
$ring1 moveup 72 
$ring1 waitmove 
$ring2 moveup 56
$ring2 waitmove 
$ring3 moveup 40 
$ring3 waitmove 
$ring4 moveup 24 
$ring4 waitmove 
$ring5 moveup 8 
$ring5 waitmove 
$teleport_trigger triggerable //TELEPORT ACTIVE
wait 2
//ALL RINGS IN UP POSITION - PLAYER TELEPORTED
$teleport_trigger nottriggerable //TELEPORT INACTIVE
$ring5 movedown 8 
$ring5 waitmove 
$ring4 movedown 24 
$ring4 waitmove
$ring3 movedown 40 
$ring3 waitmove 
$ring2 movedown 56
$ring2 waitmove 
$ring1 movedown 72 
$ring1 waitmove
$ring_cover moveup 80 
$ring_cover move
wait 5 
goto ring_teleporter
end
//ALL RINGS DOWN (RINGS RESET) 

level.script = "maps/dm/dm_chulak.scr" // remember to put in your map name 

level waittill spawn 

end 
Again Thanks Very Much
.MDT Webmaster, Mapper, Moddeler & Concept Artist
.Map Reviewer
Image
http://www.shiftys-bunker.tk Under Construction
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

targetnames

Post by tltrude »

There should be two triggers at each ring spot. One for the rings and one for the teleport. The two teleport triggers should not be named the same. Also, the ring triggers should not be named the same, although you can target the first ring trigger with the second one to trigger it from the second location.

Try it just one way for now. I will probably need to see the .map file, if you want to e-mail it to me (please zip it).

Here is a cleaner version of your script:

Code: Select all

// dm_chulak 
main: 

	// set scoreboard messages 
	setcvar "g_obj_alliedtext1" "" 
	setcvar "g_obj_alliedtext2" "" 
	setcvar "g_obj_alliedtext3" "" 
	setcvar "g_obj_axistext1" "" 
	setcvar "g_obj_axistext2" "" 
	setcvar "g_obj_axistext3" "" 

	setcvar "g_scoreboardpic" "none" 

level waittill prespawn 

	exec global/DMprecache.scr 
	level.script = "maps/dm/dm_chulak.scr"

	$teleport_trigger nottriggerable
	thread ring_teleporter 

level waittill spawn 

end 

ring_teleporter:
 
	//PLAYER STEPS OVER RING COVER 

	$ring_trigger waittill trigger 
	wait .2 
	$ring_cover movedown 80 
	$ring_cover move 
	$ring1 moveup 72 
	$ring1 waitmove 
	$ring2 moveup 56 
	$ring2 waitmove 
	$ring3 moveup 40 
	$ring3 waitmove 
	$ring4 moveup 24 
	$ring4 waitmove 
	$ring5 moveup 8 
	$ring5 waitmove 
	$teleport_trigger triggerable //TELEPORT ACTIVE 
	wait 2 

	//ALL RINGS IN UP POSITION - PLAYER TELEPORTED 

	$teleport_trigger nottriggerable //TELEPORT INACTIVE 
	$ring5 movedown 8 
	$ring5 waitmove 
	$ring4 movedown 24 
	$ring4 waitmove 
	$ring3 movedown 40 
	$ring3 waitmove 
	$ring2 movedown 56 
	$ring2 waitmove 
	$ring1 movedown 72 
	$ring1 waitmove 
	$ring_cover moveup 80 
	$ring_cover move 
	wait 5 
	goto ring_teleporter 

	//ALL RINGS DOWN (RINGS RESET)

end
Do the rings pop up after you teleport?
Tom Trude,

Image
Shifty
Map Reviewer
Posts: 717
Joined: Sun Dec 15, 2002 11:53 pm
Location: UK
Contact:

Post by Shifty »

Thanks again

So far im just making sure i get the rings coming up on the 1st "Ring up" then when i got that workin i can add the "ring up" at the arrival location

Oh and you should be recieving an email from me cheers bud
.MDT Webmaster, Mapper, Moddeler & Concept Artist
.Map Reviewer
Image
http://www.shiftys-bunker.tk Under Construction
Shifty
Map Reviewer
Posts: 717
Joined: Sun Dec 15, 2002 11:53 pm
Location: UK
Contact:

Post by Shifty »

Ok I'm getting closer to having this working so tltrude dont bother with the files i emailed you with as i theres some stuff i forgot to do in there :oops:

Anyway the main problem now is that the teleport happens before the rings move up basicly the sequence should be that

Ring Cover Moves Down (at Start and Arrive Locations)

Rings 1-5 Moves Up (at Start and Arrive Locations)

Teleport then activates - you arrive at new location

All Rings Move Down

All Covers Move Up

Then you carry on walkin round the rest of the map etc.....
.MDT Webmaster, Mapper, Moddeler & Concept Artist
.Map Reviewer
Image
http://www.shiftys-bunker.tk Under Construction
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

targetname

Post by tltrude »

The basic problem was that the trigger_teleport brush for the rings was never given the targetname "teleport_trigger". So, it was not being turned off--made nottriggerable.

In the reworked map/script I sent, I gave the stargate part of a wave lap sound. But, after thinking about it, a water explosion sound might work better for the "flush" noise.

If players run fast, thay can trip the rings and get out before they come up. So, you need to make a clip ring that pops up fast to stop them before the visible rings move up. And, I think the rings should be big enough to hold 4 players (64 unit square). In the TV show, the cover is in 4 parts and drops down a little before moving in 4 directions. If you want to do that, the rings should wait untill the cover is done moving. You can also add sounds for the cover movements.

The func_teleportdestination has a bad habit of kicking the player off itself. I fixed that by using a script_origin as the destination.
Tom Trude,

Image
Post Reply