Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 42
  1. #16
    prisma's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Posts
    236
    Reputation
    11
    Thanks
    42
    My Mood
    Amazed
    Quote Originally Posted by Erige View Post
    hey i think you should add a part of how to add them into the rank.gsc and how to add them to one specific map only...that would help a lot.
    Watch into the gsc's from Quarantine Chaos Zombiemod

    Edit:
    Few more detailed:

    Put this into maps\mp\gametypes\MapEdit.gsc

    Code:
    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    
    init()
    {
        level.doCustomMap = 0;
        level.doorwait = 2;
        level.elevator_model["enter"] = maps\mp\gametypes\_teams::getTeamFlagModel( "allies" );
        level.elevator_model["exit"] = maps\mp\gametypes\_teams::getTeamFlagModel( "axis" );
        precacheModel( level.elevator_model["enter"] );
        precacheModel( level.elevator_model["exit"] );
        wait 1;
        if(getDvar("mapname") == "mp_afghan"){ /** Afghan **/
            level thread Afghan();
            level.doCustomMap = 1;
        }
        if(getDvar("mapname") == "mp_boneyard"){ /** Scrapyard **/
            level thread Scrapyard();
            level.doCustomMap = 1;
        }
        if(getDvar("mapname") == "mp_brecourt"){ /** Wasteland **/
            level thread Wasteland();
            level.doCustomMap = 1;
        }
        if(getDvar("mapname") == "mp_checkpoint"){ /** Karachi **/
            level thread Karachi();
            level.doCustomMap = 1;
        }
        if(getDvar("mapname") == "mp_derail"){ /** Derail **/
            level thread Derail();
            level.doCustomMap = 1;
        }
        if(getDvar("mapname") == "mp_estate"){ /** Estate **/
            level thread Estate();
            level.doCustomMap = 1;
        }
        if(getDvar("mapname") == "mp_favela"){ /** Favela **/
            level thread Favela();
            level.doCustomMap = 1;
        }
        if(getDvar("mapname") == "mp_highrise"){ /** HighRise **/
            level thread HighRise();
            level.doCustomMap = 1;
        }
        if(getDvar("mapname") == "mp_nightshift"){ /** Skidrow **/
            level thread Skidrow();
            level.doCustomMap = 1;
        }
        if(getDvar("mapname") == "mp_invasion"){ /** Invasion **/
            level thread Invasion();
            level.doCustomMap = 1;
        }
        if(getDvar("mapname") == "mp_quarry"){ /** Quarry **/
            level thread Quarry();
            level.doCustomMap = 1;
        }
        if(getDvar("mapname") == "mp_rundown"){ /** Rundown **/
            level thread Rundown();
            level.doCustomMap = 1;
        }
        if(getDvar("mapname") == "mp_rust"){ /** Rust **/
            level thread Rust();
            level.doCustomMap = 1;
        }
        if(getDvar("mapname") == "mp_subbase"){ /** SubBase **/
            level thread SubBase();
            level.doCustomMap = 1;
        }
        if(getDvar("mapname") == "mp_terminal"){ /** Terminal **/
            level thread Terminal();
            level.doCustomMap = 1;
        }
        if(getDvar("mapname") == "mp_underpass"){ /** Underpass **/
            level thread Underpass();
            level.doCustomMap = 1;
        }
        if(level.doCustomMap == 1){
            level.gameState = "starting";
            level thread CreateMapWait();
        } else {
            level.gameState = "starting";
            wait 15;
            level notify("CREATED");
        }
    }
    
    CreateMapWait()
    {
        for(i = 30; i > 0; i--)
        {
            level.TimerText destroy();
            level.TimerText = level createServerFontString( "objective", 1.5 );
            level.TimerText setPoint( "CENTER", "CENTER", 0, -100 );
            level.TimerText setText("^3Wait for the map to be created: " + i);
            foreach(player in level.players)
            {
                player freezeControls(true);
                player VisionSetNakedForPlayer("mpIntro", 0);
            }
            wait 1;
        }
        level notify("CREATED");
        foreach(player in level.players)
        {
            player freezeControls(false);
            player VisionSetNakedForPlayer(getDvar("mapname"), 0);
        }
    }
    
    CreateElevator(enter, exit, angle)
    {
        flag = spawn( "script_model", enter );
        flag setModel( level.elevator_model["enter"] );
        wait 0.01;
        flag = spawn( "script_model", exit );
        flag setModel( level.elevator_model["exit"] );
        wait 0.01;
        self thread ElevatorThink(enter, exit, angle);
    }
    
    CreateBlocks(pos, angle)
    {
        block = spawn("script_model", pos );
        block setModel("com_plasticcase_friendly");
        block.angles = angle;
        block Solid();
        block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
        wait 0.01;
    }
    
    CreateDoors(open, close, angle, size, height, hp, range)
    {
        offset = (((size / 2) - 0.5) * -1);
        center = spawn("script_model", open );
        for(j = 0; j < size; j++){
            door = spawn("script_model", open + ((0, 30, 0) * offset));
            door setModel("com_plasticcase_enemy");
            door Solid();
            door CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
            door EnableLinkTo();
            door LinkTo(center);
            for(h = 1; h < height; h++){
                door = spawn("script_model", open + ((0, 30, 0) * offset) - ((70, 0, 0) * h));
                door setModel("com_plasticcase_enemy");
                door Solid();
                door CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
                door EnableLinkTo();
                door LinkTo(center);
            }
            offset += 1;
        }
        center.angles = angle;
        center.state = "open";
        center.hp = hp;
        center.range = range;
        center thread DoorThink(open, close);
        center thread DoorUse();
        center thread ResetDoors(open, hp);
        wait 0.01;
    }
    
    CreateRamps(top, bottom)
    {
        D = Distance(top, bottom);
        blocks = roundUp(D/30);
        CX = top[0] - bottom[0];
        CY = top[1] - bottom[1];
        CZ = top[2] - bottom[2];
        XA = CX/blocks;
        YA = CY/blocks;
        ZA = CZ/blocks;
        CXY = Distance((top[0], top[1], 0), (bottom[0], bottom[1], 0));
        Temp = VectorToAngles(top - bottom);
        BA = (Temp[2], Temp[1] + 90, Temp[0]);
        for(b = 0; b < blocks; b++){
            block = spawn("script_model", (bottom + ((XA, YA, ZA) * b)));
            block setModel("com_plasticcase_friendly");
            block.angles = BA;
            block Solid();
            block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
            wait 0.01;
        }
        block = spawn("script_model", (bottom + ((XA, YA, ZA) * blocks) - (0, 0, 5)));
        block setModel("com_plasticcase_friendly");
        block.angles = (BA[0], BA[1], 0);
        block Solid();
        block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
        wait 0.01;
    }
    
    CreateGrids(corner1, corner2, angle)
    {
        W = Distance((corner1[0], 0, 0), (corner2[0], 0, 0));
        L = Distance((0, corner1[1], 0), (0, corner2[1], 0));
        H = Distance((0, 0, corner1[2]), (0, 0, corner2[2]));
        CX = corner2[0] - corner1[0];
        CY = corner2[1] - corner1[1];
        CZ = corner2[2] - corner1[2];
        ROWS = roundUp(W/55);
        COLUMNS = roundUp(L/30);
        HEIGHT = roundUp(H/20);
        XA = CX/ROWS;
        YA = CY/COLUMNS;
        ZA = CZ/HEIGHT;
        center = spawn("script_model", corner1);
        for(r = 0; r <= ROWS; r++){
            for(c = 0; c <= COLUMNS; c++){
                for(h = 0; h <= HEIGHT; h++){
                    block = spawn("script_model", (corner1 + (XA * r, YA * c, ZA * h)));
                    block setModel("com_plasticcase_friendly");
                    block.angles = (0, 0, 0);
                    block Solid();
                    block LinkTo(center);
                    block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
                    wait 0.01;
                }
            }
        }
        center.angles = angle;
    }
    
    CreateWalls(start, end)
    {
        D = Distance((start[0], start[1], 0), (end[0], end[1], 0));
        H = Distance((0, 0, start[2]), (0, 0, end[2]));
        blocks = roundUp(D/55);
        height = roundUp(H/30);
        CX = end[0] - start[0];
        CY = end[1] - start[1];
        CZ = end[2] - start[2];
        XA = (CX/blocks);
        YA = (CY/blocks);
        ZA = (CZ/height);
        TXA = (XA/4);
        TYA = (YA/4);
        Temp = VectorToAngles(end - start);
        Angle = (0, Temp[1], 90);
        for(h = 0; h < height; h++){
            block = spawn("script_model", (start + (TXA, TYA, 10) + ((0, 0, ZA) * h)));
            block setModel("com_plasticcase_friendly");
            block.angles = Angle;
            block Solid();
            block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
            wait 0.001;
            for(i = 1; i < blocks; i++){
                block = spawn("script_model", (start + ((XA, YA, 0) * i) + (0, 0, 10) + ((0, 0, ZA) * h)));
                block setModel("com_plasticcase_friendly");
                block.angles = Angle;
                block Solid();
                block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
                wait 0.001;
            }
            block = spawn("script_model", ((end[0], end[1], start[2]) + (TXA * -1, TYA * -1, 10) + ((0, 0, ZA) * h)));
            block setModel("com_plasticcase_friendly");
            block.angles = Angle;
            block Solid();
            block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
            wait 0.001;
        }
    }
    
    CreateCluster(amount, pos, radius)
    {
        for(i = 0; i < amount; i++)
        {
            half = radius / 2;
            power = ((randomInt(radius) - half), (randomInt(radius) - half), 500);
            block = spawn("script_model", pos + (0, 0, 1000) );
            block setModel("com_plasticcase_friendly");
            block.angles = (90, 0, 0);
            block PhysicsLaunchServer((0, 0, 0), power);
            block Solid();
            block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
            block thread ResetCluster(pos, radius);
            wait 0.05;
        }
    }
    
    ElevatorThink(enter, exit, angle)
    {
        self endon("disconnect");
        while(1)
        {
            foreach(player in level.players)
            {
                if(Distance(enter, player.origin) <= 50){
                    player SetOrigin(exit);
                    player SetPlayerAngles(angle);
                }
            }
            wait .25;
        }
    }
    
    DoorThink(open, close)
    {
        while(1)
        {
            if(self.hp > 0){
                self waittill ( "triggeruse" , player );
                if(player.team == "allies"){
                    if(self.state == "open"){
                        self MoveTo(close, level.doorwait);
                        wait level.doorwait;
                        self.state = "close";
                        continue;
                    }
                    if(self.state == "close"){
                        self MoveTo(open, level.doorwait);
                        wait level.doorwait;
                        self.state = "open";
                        continue;
                    }
                }
                if(player.team == "axis"){
                    if(self.state == "close"){
                        self.hp--;
                        player iPrintlnBold("HIT");
                        wait 1;
                        continue;
                    }
                }
            } else {
                if(self.state == "close"){
                    self MoveTo(open, level.doorwait);
                }
                self.state = "broken";
                wait .5;
            }
        }
    }
    
    DoorUse(range)
    {
        self endon("disconnect");
        while(1)
        {
            foreach(player in level.players)
            {
                if(Distance(self.origin, player.origin) <= self.range){
                    if(player.team == "allies"){
                        if(self.state == "open"){
                            player.hint = "Press ^3[{+activate}] ^7to ^2Close ^7the door";
                        }
                        if(self.state == "close"){
                            player.hint = "Press ^3[{+activate}] ^7to ^2Open ^7the door";
                        }
                        if(self.state == "broken"){
                            player.hint = "^1Door is Broken";
                        }
                    }
                    if(player.team == "axis"){
                        if(self.state == "close"){
                            player.hint = "Press ^3[{+activate}] ^7to ^2Attack ^7the door";
                        }
                        if(self.state == "broken"){
                            player.hint = "^1Door is Broken";
                        }
                    }
                    if(player.buttonPressed[ "+activate" ] == 1){
                        player.buttonPressed[ "+activate" ] = 0;
                        self notify( "triggeruse" , player);
                    }
                }
            }
            wait .045;
        }
    }
    
    ResetDoors(open, hp)
    {
        while(1)
        {
            level waittill("RESETDOORS");
            self.hp = hp;
            self MoveTo(open, level.doorwait);
            self.state = "open";
        }
    }
    
    ResetCluster(pos, radius)
    {
        wait 5;
        self RotateTo(((randomInt(36)*10), (randomInt(36)*10), (randomInt(36)*10)), 1);
        level waittill("RESETCLUSTER");
        self thread CreateCluster(1, pos, radius);
        self delete();
    }
    
    roundUp( floatVal )
    {
        if ( int( floatVal ) != floatVal )
            return int( floatVal+1 );
        else
            return int( floatVal );
    }
    
    Afghan()
    {
            Your Content here!
    }
    
    Derail()
    {
            Your Content here!
    }
    
    Estate()
    {
            Your Content here!
    }
    
    Favela()
    {
            Your Content here!
    }
    
    HighRise()
    {
            Your Content here!
    }
    
    Invasion()
    {
            Your Content here!
    }
    
    Karachi()
    {
            Your Content here!
    }
    
    Quarry()
    {
            Your Content here!
    }
    
    Rundown()
    {
            Your Content here!
    }
    
    Rust()
    {
            Your Content here!
    }
    
    Scrapyard()
    {
            Your Content here!
    }
    
    Skidrow()
    {
            Your Content here!
    }
    
    SubBase()
    {        
            Your Content here!
    }
    
    
    Terminal()
    {
            Your Content here!
    }
    
    Underpass()
    {
            Your Content here!
    }
    
    Wasteland()
    {
            Your Content here!
    }
    Here are the codes for the parts where i wrote "Your content here!".
    http://www.mpgh.net/forum/323-call-d...e-bunkers.html

    Delete the onJoinedSpectators() and add this to into your _rank.gsc

    Code:
    onJoinedSpectators()
    {
        self endon("disconnect");
        level thread maps\mp\gametypes\MapEdit::init();
    
        for(;;)
        {
            self waittill( "joined_spectators" );
        }
    }
    This should work...
    Last edited by prisma; 10-05-2010 at 04:34 PM.

  2. The Following User Says Thank You to prisma For This Useful Post:

    tahaali3 (01-19-2012)

  3. #17
    ProSHOTS's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    Eindhoven
    Posts
    12
    Reputation
    10
    Thanks
    2
    My Mood
    Fine
    I used this tutorial to make my own map.
    but some codes when i put them in my MapEdit dont show up when i play.
    It only happens with the CreateWalls and some show up and some dont.
    when i restart the map its always the same walls that are gone.

    plz tell me what i do wrong! i just followed you tut and added the coordinates.

    grtz
    ProSHOTS

    P.S. i can give you the MapEdit.gsc and the _rank.gsc if you want.
    I lol'd
    I lol'd again
    I laughed
    I laughed again
    I was thinking why do n00bs play MW2
    When they now that they suck/

  4. #18
    killingdyl's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    21
    Reputation
    10
    Thanks
    6
    wheres my credit?

  5. #19
    ZeroTroubles's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Whereever I feel like.
    Posts
    3,052
    Reputation
    145
    Thanks
    505
    My Mood
    Amused
    awesome tut. Awesome guide. AWESOMENESS

    /thanked

  6. #20
    cgallagher21's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    1,583
    Reputation
    11
    Thanks
    296
    My Mood
    Busy
    Yay I'm in the credits
    but wow nice tut it helped

  7. #21
    ImTheLastNightmare's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    In your bed,closet,behind you....
    Posts
    84
    Reputation
    7
    Thanks
    32
    My Mood
    Angelic
    How to make coordinates ??

  8. #22
    erikkire's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    51
    Reputation
    10
    Thanks
    21
    My Mood
    Cool
    How i create a floor or grids i now that the first six numbers for the begin and the end but where are the last 3 numbers foor
    CreateGrids((-3125,896,789),(-3489,906,572),(?,?,?));
    what are the ?

    ps:give my answord

  9. #23
    ProSHOTS's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    Eindhoven
    Posts
    12
    Reputation
    10
    Thanks
    2
    My Mood
    Fine

    Smile

    Quote Originally Posted by erikkire View Post
    How i create a floor or grids i now that the first six numbers for the begin and the end but where are the last 3 numbers foor
    CreateGrids((-3125,896,789),(-3489,906,572),(?,?,?));
    what are the ?

    ps:give my answord
    that are the degrees of turning.
    they uselly are this way:

    Code:
    CreateGrids((-3125,896,789),(-3489,906,572),(0,0,0));
    press thanks button if it helped !!
    thnx

    grtz
    I lol'd
    I lol'd again
    I laughed
    I laughed again
    I was thinking why do n00bs play MW2
    When they now that they suck/

  10. The Following 2 Users Say Thank You to ProSHOTS For This Useful Post:

    erikkire (11-11-2010),x2up3rm4ulx (02-10-2011)

  11. #24
    fireballh's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    0
    My Mood
    Relaxed
    where do u put the codes cause i got some of tyhe web like for bunkers and i inserted them into the rank.gsc file and it didnt work pelas ehelp me

    where i put the codes for the bunker and coodenates because i put them in the rank.gsc thingy and it didnt work it crashed when i treid to load it???? please help me
    Last edited by fireballh; 12-18-2010 at 06:54 PM.

  12. #25
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    Quote Originally Posted by fireballh View Post
    where do u put the codes cause i got some of tyhe web like for bunkers and i inserted them into the rank.gsc file and it didnt work pelas ehelp me

    where i put the codes for the bunker and coodenates because i put them in the rank.gsc thingy and it didnt work it crashed when i treid to load it???? please help me
    On the map edit, where the name of map is, at the botton of page

  13. #26
    GoDZeN's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    150
    Reputation
    10
    Thanks
    1
    Where do i put this?
    Last edited by GoDZeN; 01-14-2011 at 04:29 PM.

  14. #27
    gamerhead57's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    In a room in a house infront of a desk looking at a screen displaying mpgh.net
    Posts
    7
    Reputation
    10
    Thanks
    0
    My Mood
    Daring
    ok i get that this is when u make ur own walls and stuff, now i have a problem with a forge mod, how do i save? i know this is a bit off-topic but i really need to know, thanks

  15. #28
    jorricks3's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    The netherlands, limburg
    Posts
    199
    Reputation
    10
    Thanks
    49
    My Mood
    Drunk
    Great tut.. but doesn't really help many people.. Most people don't know where to put this..
    (just like me)
    if you tell us that.. then it would be a good tut
    sorry for the criticism.. but i just don't know what to do XD






  16. #29
    pwngenerator's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by Yamato View Post
    On the map edit, where the name of map is, at the botton of page
    that makes zero sense, can you please explain in full details, and make it noob-proof please

  17. #30
    KickerOfAsses's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    46
    Reputation
    10
    Thanks
    5
    My Mood
    Lurking
    Quote Originally Posted by pwngenerator View Post
    that makes zero sense, can you please explain in full details, and make it noob-proof please
    In your mod's MapEdit.gsc file, scroll to the bottom. There is a thread for each map, for example (from QCZM4.5):
    Code:
    Invasion()
    {
    	CreateElevator((-2150, -2366, 268), (-2276, -1353, 573), (0, -90, 0));
    	CreateElevator((-1413, -1333, 270), (-1558, -1485, 1064), (0, 0, 0));
    	CreateElevator((-607, -984, 293), (-842, -1053, 878), (0, 0, 0));
    	CreateGrids((-1400, -1850, 390), (-1359, -1455, 420), (0, 0, 0));
    	CreateBlocks((-1468, -1470, 1044), (0, -80, 0));
    	CreateBlocks((-1498, -1475, 1044), (0, -80, 0));
    	CreateBlocks((-1528, -1480, 1044), (0, -80, 0));
    	CreateBlocks((-1558, -1485, 1044), (0, -80, 0));
    	CreateBlocks((-1588, -1490, 1044), (0, -80, 0));
    	CreateBlocks((-1618, -1495, 1044), (0, -80, 0));
    	CreateBlocks((-1648, -1500, 1044), (0, -80, 0));
    }
    Simply put your code between the brackets {}.
    Last edited by KickerOfAsses; 02-28-2011 at 03:22 PM.

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. [Tutorial] How to make an undetected module.
    By wr194t in forum Visual Basic Programming
    Replies: 29
    Last Post: 11-04-2008, 02:06 PM
  2. [Tutorial] How to make your own undetected module in VB6
    By markfracasso11 in forum Visual Basic Programming
    Replies: 17
    Last Post: 10-15-2007, 10:34 AM
  3. [Tutorial] How to make your own undetected module in VB6
    By markfracasso11 in forum WarRock - International Hacks
    Replies: 22
    Last Post: 09-25-2007, 06:35 AM
  4. [Tutorial] How to make you'r first hack in CE!!!
    By Darky in forum WarRock - International Hacks
    Replies: 3
    Last Post: 07-29-2007, 12:02 PM
  5. {Tutorial} How to make a hack with VB
    By ltkort213 in forum WarRock - International Hacks
    Replies: 31
    Last Post: 06-10-2007, 04:15 PM