Members Online»
0 Active | 74 Guests
Online:
|
LATEST FORUM THREADS»
by supersword
Posts: 2 / 92 The Future of MODSonline
In The News by KAZAM3766
Posts: 1 / 482 CoD: Battle Royale
CoD+UO Map + Mod Releases by morgawr
Posts: 1 / 2555 Damaged .pk3's
CoD Mapping by lazygit
Posts: 1 / 3073 heli to attack ai
CoD4 SP Mapping by DrBiggzz
Posts: 11 / 982 New Cod UO Rifle Mod.
CoD Mapping |
Polls»
|
This tutorial shows mappers how to make a door be opened by player once and never close again.
Well assuming you know the basics of Radiant and a little bit script and how to set up a single singleplayer map then you're good.
First Step:
Open Radiant and make a wall then a hole in it like a door gap and then a brush that will be your door.
then go to textures>usage>tools
and make a brush with the origin texture as tall as the door and place it where the door is touching one of the two side walls
now select both and then press (on the 2D window) right click > script > brushmodel
then your door is now a brushmodel. That means that you can manipulate it in script.
Now select the Door and the origin and press "N" then a window will pop up.
In that window you will give the door a "Targetname" with wich you will be able to call the door in script.
Now where it says Key, type: targetname (then press ENTER)
and where it says value, type: door (then press ENTER)
Second Step:
right next to the door, on the side where the player will open it, right click on 2D window i trigger >use_touch
now place the trigger next to the door like this
now select the trigger press "N"
and set a key: targetname (then press ENTER)
and a value: door_trigg (then press ENTER)
Third Step:(Optional)
If you want an AI to be able to come with you trough the door do this.
Place the Actor in the side the player is.
Select the Door, press "N" and click where you see a box (DYNAMICPATH)
good now place some node in both sides of the door (make sure that the nodes will not be far from each other but not too close)-(about 1 meter)(in radiant grid 128max distance)
place a node_balcony on the other side of the door by pressing right click on 2D grid and click node>balcony
now give a key and a value
key: targetname (then press ENTER)
value: node_one (then press ENTER)
Now select your actor and give him key and value
key: targetname (then press ENTER)
value: guy (then press ENTER)
Fourth Step:
(assuming you did the rest so the map is ready For compile (lights, reflection_probes, lightgrid) we continue)
We need some script to make the whole thing work.
Go in your games COD 4 directory go on foilder: COD4GAMEFOILDER>raw>maps
and there create a txt file named as: yourmapname.gsc
(yourmapname can be any name you want but it has to be the same as the .map in radiant)
open the gsc files with notepad (or an other program that you need to download called:Programmers Notepad)-really useful tool
open your file and add these lines in the gsc file (contains the AI movement)
--------------from now on --------------------------(do not copy this line)copy below
#include maps_utility;
main()
{
maps_load::main();
thread door();
}
door()
{
door = getent("door", "targetname"); //finds the door
door_trigg = getent("door_trigg", "targetname"); //finds the tirgger
guy = getent("guy", "targetname"); //finds the actor
node_one = getnode("node", "targetname"); //finds the node
door_trigg sethintstring( &"PRESS_THE_USE_KEY_TO_OPEN_DOOR" ); //make a text to pop up when player touches trigger
door_trigg waittill("trigger"); //script will wait untill trigger is activated
door_trigg delete(); //deletes the trigger
door ConnectPaths();//makes door be not and obstacle between the nodes that the AI will follow
door rotateYaw( 120, 3, 0.5, 2 );//makes the door move
guy setgoalnode(node_one);// makes Actor go to node
}
--------------End--------------------------(do not copy this line)copy above
Save, compile and now you have your door
Latest Syndicated News»
Comments: 5
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which... Comments: 5
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ... Comments: 5
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead?
... Comments: 5
Codutility.com up and runn...
It seems to me the like the site is completely dead? Comments: 5
Codutility.com up and runn...
Yeeaahhhh.........
|
Latest Downloads»
OHMY Don Quixote
Call of Duty 2: Maps: Multiplayer (5.76Mb) OHMY Neuburg
Call of Duty 2: Maps: Multiplayer (6.84Mb) OHMY Tebessa
Call of Duty 2: Maps: Multiplayer (7.36Mb) OHMY POW Camp
Call of Duty 2: Maps: Multiplayer (2.15Mb) OHMY Valley
Call of Duty 2: Maps: Multiplayer (5.7Mb) |
Partners & Friends»
|
Site Links and Information
|
Partners
|
Friends
|
Copyright © MODSonline LLC
Tresware Content Management System © 2011
Website Designed by LKFX and Developed by Tresware