New tutorial on using areaportals
Moderator: Moderators
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
New tutorial on using areaportals
I've realized that a lot of mappers have no idea how to use areaportals. This is a shame, because they are an easy way to boost the FPS in some cases. To fix this I made a tutorial on the subject. My hope is that it is easy to understand, if it is not: please point out its weak spots so I can fix them.
Here it is:
http://www.planetmedalofhonor.com/rjuka ... ortal.html
Here it is:
http://www.planetmedalofhonor.com/rjuka ... ortal.html
-
Casquebleu
- Lance Corporal
- Posts: 24
- Joined: Sun Dec 22, 2002 9:54 am
- Location: France
-
Casquebleu
- Lance Corporal
- Posts: 24
- Joined: Sun Dec 22, 2002 9:54 am
- Location: France
Hum, i tried it and it didn't work for me, the portal stayed closed !!! I put an areaportal on my trap like i always do for a rotating_door. I add the 2 lines in my script :
trap_door_mover:
$trap_door_trigger waittill trigger
$trap_door openportal
$trap_door time 2
$trap_door playsound door_metal_open_move
$trap_door rotateXup 90
$trap_door waitmove
$trap_door playsound door_metal_open_stop
wait 15
$trap_door playsound door_metal_close_move
$trap_door rotateXdown 90
$trap_door waitmove
$trap_door playsound door_metal_close_stop
$trap_door closeportal
goto trap_door_mover
end
Thx for all !!!
trap_door_mover:
$trap_door_trigger waittill trigger
$trap_door openportal
$trap_door time 2
$trap_door playsound door_metal_open_move
$trap_door rotateXup 90
$trap_door waitmove
$trap_door playsound door_metal_open_stop
wait 15
$trap_door playsound door_metal_close_move
$trap_door rotateXdown 90
$trap_door waitmove
$trap_door playsound door_metal_close_stop
$trap_door closeportal
goto trap_door_mover
end
Thx for all !!!
Caskou, Mappeur Fou
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
And here is my hatch code ( that works ):
Code: Select all
use_hatch:
if(level.hatch_moving == 0) {
level.hatch_moving = 1
local.hatch_time = 1
$hatch time local.hatch_time
if (level.hatch_open) {
$hatch rotateXup 90
$hatch_trigger_opened hide
$hatch_trigger_closed show
$hatch playsound hatch_close
$hatch move
wait (local.hatch_time + 1)
$hatch closeportal
level.hatch_moving = 0
} else {
$hatch openportal
$hatch rotateXup -90
$hatch_trigger_opened show
$hatch_trigger_closed hide
$hatch playsound hatch_open
$hatch move
wait (local.hatch_time + 1)
level.hatch_moving = 0
}
level.hatch_open = !level.hatch_open
}
end-
Daniel Radcliffe
- Second Lieutenant
- Posts: 168
- Joined: Fri May 30, 2003 9:49 am
-
Casquebleu
- Lance Corporal
- Posts: 24
- Joined: Sun Dec 22, 2002 9:54 am
- Location: France
Well, I'm sure my areaportal works 'cause you can't see behind it !!! So its' correctly positionned.



This is my script for this one (2 traps) :
trap_door1_mover:
$trap_door1_trigger waittill trigger
$trap_door1a time 2
$trap_door1b time 2
$trap_door openportal
$trap_door1a playsound door_metal_open_move
$trap_door1a rotateXup 90
$trap_door1b rotateXup -90
$trap_door1a move
$trap_door1b waitmove
$trap_door1a playsound door_metal_open_stop
wait 15
$trap_door1a playsound door_metal_close_move
$trap_door1a rotateXdown 90
$trap_door1b rotateXdown -90
$trap_door1a move
$trap_door1b waitmove
$trap_door1a playsound door_metal_close_stop
$trap_door closeportal
goto trap_door1_mover
end



This is my script for this one (2 traps) :
trap_door1_mover:
$trap_door1_trigger waittill trigger
$trap_door1a time 2
$trap_door1b time 2
$trap_door openportal
$trap_door1a playsound door_metal_open_move
$trap_door1a rotateXup 90
$trap_door1b rotateXup -90
$trap_door1a move
$trap_door1b waitmove
$trap_door1a playsound door_metal_open_stop
wait 15
$trap_door1a playsound door_metal_close_move
$trap_door1a rotateXdown 90
$trap_door1b rotateXdown -90
$trap_door1a move
$trap_door1b waitmove
$trap_door1a playsound door_metal_close_stop
$trap_door closeportal
goto trap_door1_mover
end
Caskou, Mappeur Fou
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
OK Casquebleu: what is the $trap_door entity? Is there one?
As I see it in the script: the trap door is made up of $trap_door1a and $trap_door1b....
Try
or
(Or both?)
As I see it in the script: the trap door is made up of $trap_door1a and $trap_door1b....
Try
Code: Select all
$trap_door1a openportalCode: Select all
$trap_door1b openportal-
Casquebleu
- Lance Corporal
- Posts: 24
- Joined: Sun Dec 22, 2002 9:54 am
- Location: France
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
- General_DisArray
- Warrant Officer
- Posts: 142
- Joined: Tue Dec 17, 2002 4:17 am
- Location: magnolia, texas
-
Daniel Radcliffe
- Second Lieutenant
- Posts: 168
- Joined: Fri May 30, 2003 9:49 am
- General_DisArray
- Warrant Officer
- Posts: 142
- Joined: Tue Dec 17, 2002 4:17 am
- Location: magnolia, texas
this is what i have in my shortcut, verbatim:
what do i need to take out or add?
Code: Select all
+set cl_playintro 0 +set ui_skip_eamovie 1 +set ui_skip_titlescreen 1 +set ui_skip_legalscreen 1 +set developer 1 +set thereisnomonkey 1 +set cheats 1 +set ui_console 1what do i need to take out or add?
-
Casquebleu
- Lance Corporal
- Posts: 24
- Joined: Sun Dec 22, 2002 9:54 am
- Location: France


