Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: Missions Maps Teleporter?

  1. #11
    Senior Member verruguitens's Avatar
    Join Date
    Mar 2017
    Location
    Argentina
    Posts
    207

    Default

    Quote Originally Posted by Slimbips {sfx} View Post
    make this a .scr file and call it teleport1.scr and putt it in a folder called global
    Code:
    //  DESTROYED VILLAGE 
    
    port1:
    local.fx = spawn script_model
    local.fx model "fx/corona_red.tik" 
    local.fx.origin = ( -1003 -985 90 )
    local.fx.scale = 1.5
    local.fx notsolid
    //local.fx hide
    
    
    local.trig = spawn trigger_use origin local.fx.origin
    local.trig setsize ( -20 -20 -20 ) ( 20 20 20 )
    while(1)
    {
    local.trig waittill trigger
    local.player = parm.other
    local.player tele ( -1010 -965 328 )
    local.player thread push_player3
    local.fx hide
    wait 2
    local.fx show
    }
    wait 1
    end
    push_player3:
    local.trigger = spawn trigger_push origin ( -1010 -965 328 ) "target" "roof"
    spawn script_origin "targetname" "roof" origin ( -1010 -945 328 )
    local.trigger speed 250
    wait 1
    local.trigger remove
    end
    
    //----------------------------------------------------------------------------
    execute it in the map.scr like this

    level waittill prespawn
    exec teleports/teleport1.scr

    only change the coords to your need

    or test this on destroyed village map to see if it works... if it works change the coords to coords in your map
    How can I get the coordinates of the maps I want, where do I get them from?

  2. #12

    Default

    or install this mod that has teleports and just dig the teleport out of it http://www.mohaaaa.co.uk/AAAAMOHAA/content/fortress-0

    this mod only works in destroyed village, there is a teleport in a secret room i created, or else u cant escape the secret room that why i created there.

  3. #13

    Default

    go offline in the map... open console and type coord in console

  4. #14
    Senior Member verruguitens's Avatar
    Join Date
    Mar 2017
    Location
    Argentina
    Posts
    207

    Default

    Quote Originally Posted by Slimbips {sfx} View Post
    go offline in the map... open console and type coord in console
    Cool!! w8, i create the .scr file with this code for the FIRST PORTAL only sure? later have create the same with the END COORDENATES FINAL PORTAL for the FIRST teleport sure?!, go in "global" but in what pk3?

  5. #15

    Default

    As the person with the shortest modding/programming experience on this forum I can relate somehow to known feeling when you don't know how to start, I was year ago on your place. I'm not good at explaining, but in cut through bullsh*t way of talking - if you want to learn coding, you have to code and read code. In this sense programming doesn't differ from arts like poetry or other forms of writing, you get better as you write and read other authors, and you would have to find in yourself motivation to waste time for trying to understand statements which look like nonsense gibber at the first sight.

    Start from getting good text editor.
    What I would recommend, because it works for me, is SublimeText3, with adaptive and dark themes turned on, plus sidebar enchantments plugin with MOH:AA syntax highlight plugin. Last thing can be found here: https://www.x-null.net/forums/thread...r-Sublime-Text

    Guidelines how to install plugins, use plugins and search for them in Sublime are widely accessible in internet, google is your friend. I recommended Side Bar Enchantments plugin because with it you can drag whole folders from your desktop/other directories and have them easily accessible in editor. I usually don't collect garbage like singular .scr files in sidebar, I just keep them in one bigger folder in Documents/Dev/Morpheus/Garbage directory and access them through there. That being said, treat your PC like temple and have some order in your folders, if you have unpacked Freeze-Tag mod from which you would like to learn and try to understand it, don't throw it to folder with other mod, give it it's own folder. You can quickly find out that having mess in code files is terrifying experience, and in first month you would spend a lot of time as a noob in refactoring your directories and inventing better ways to organise them, unless you are freak like Marie Kondo who have even socks divided by color.

    Setting up local dev server.
    Sure as hell you won't want to create and test mods through server you have buyed from whenever, what you want is to set up local(on your PC) server with reborn patch installed on, then one mohaa instance runs as a remote console on your desktop, what represents your server, and from second you are connecting to it by connect localhost:12203 command and testing your mods. Again, google is your friend, many search results will redirect you to this forum or fpsadmin site.

    Getting basic skills in programming.
    My advice doesn't really count past this point, as I'm still noob myself, so probably others will straighten some points of this advice, as I won't be reading that essay before publishing it. Going back to topic, there were attempts to create comprehensive scripting tutorials in past, and if you would ask guys, then probably they would recommend you SOR's scripting tutorial, Shadow tutorial pack and accessing Rjukan through wayback machine site. Don't do it, just jump straight in script files, to be more precise map files of AA, BT and SH. Maybe for someone these tutorials were useful, but for me it was complete waste of time spent on reading these, these contributed completely nothing to my experience, with exception to Shadow's tutorial pack when I was searching for really specific things like map creation stuff.

    Shadow's pack: https://www.x-null.net/forums/thread...OHAA-TUTORIALS

    You main goal is to get basic understanding on what functions are, variable scope, flow control, things like that, majority of these and related subjects are explained in MOHAA scripting advce by chrissstrahl: https://www.x-null.net/forums/attach...9&d=1553708437

    You new lover from now is also MOHAA SDK(Software Development Kit), it contains and explains all morpheus functions and related topics, you want to take your time to get to know which link redirects to which part of SDK. You will be probably most interested in MOH Game Classes link, you will search through it a lot to get to know what you can use to create desired effect with code or what does someone else code do. So you have, let's say, code like that:


    //=========================================================================
    doJeepSound2:
    //=========================================================================
    {
    $jeep playsound Intro_Jeep_Player2
    }end


    For sake of example let's say that you don't know what playsound is. So you look at this cursed code and think to yourself "Okay, we have entity named jeep, but what the hell is playsound?". Out of natural curiosity which drives all coders you check sdk's game module classes, and it gives you that definition:
    playsound( String soundName, [ Integer channel ], [ Float volume ], [ Float min_distance ], [ Float pitch ] )

    play a sound coming from this entity.
    default channel, CHAN_BODY.
    So now you know that when doJeepSound2 function is called entity named jeep starts to play some sick music to give you some sort of proper game experience. Simple as that.

    Link to SDK: http://homepage.tinet.ie/~abyrne/sdk/

    Going with the flow.
    At this point you should have been coding a lot and polishing your skill. You can now code some basic stuff, so to not make your life too easy we have now to introduce you to clean coding. Download yourself Clean Code book by Martin Robert C. Normally I would say that scripting advice PDF is enough to keep good style in Morpheus, but as newbie you want to absorb and confront as many world views as possible, and Clean Code is absolute bible. So don't be lazy and read it, praise it and sleep with it. After reading Clean Code and getting these basics in your head you can pick up good book about algorithms, introduction to algorithms (CLRS) 3rd edition is good book and I recommend it.



    I have no idea if I could add anything else and in better way, my brains is not functioning and it's too late for coffee fix. Maybe it's bad advice, maybe not, but sure as hell others will confront it if something is wrong so don't worry. In the end, keep motivated, you would feel many times that you are shiet coder, but survive that phase and you would be OK.
    Last edited by Criminal; March 29th, 2019 at 05:41 PM.
    Github - Steam - .Crimewavez#5285

  6. #16
    Senior Member verruguitens's Avatar
    Join Date
    Mar 2017
    Location
    Argentina
    Posts
    207

    Default

    Quote Originally Posted by Slimbips {sfx} View Post
    or install this mod that has teleports and just dig the teleport out of it http://www.mohaaaa.co.uk/AAAAMOHAA/content/fortress-0

    this mod only works in destroyed village, there is a teleport in a secret room i created, or else u cant escape the secret room that why i created there.
    :O very very beautiful bro! congratulations!, but no, i need the teleport for big maps missions SP (ex.: m2l3 etc), i have to create all teleports for maybe 80% missions sp maps :S

  7. #17

    Default

    moment i will try if i can make it more easy for you

  8. #18
    Senior Member verruguitens's Avatar
    Join Date
    Mar 2017
    Location
    Argentina
    Posts
    207

    Default

    Quote Originally Posted by Slimbips {sfx} View Post
    moment i will try if i can make it more easy for you
    GOD BLESS YOU!!!!!!!! U AVAILABLE TO CHAT?

  9. #19
    Senior Member verruguitens's Avatar
    Join Date
    Mar 2017
    Location
    Argentina
    Posts
    207

    Default

    Look my m2l1.scr file! - THE FIRST TELEPORT WORKS!!!!! BUT THE SECOND NO :/ look.
    what am I doing wrong in thread port02? I'm working in FFA but in TDM it's the same, is not it?

    //
    // M2L1 - Secret Documents of the Kriegsmarine
    //


    main:

    removeclass ammoEntity
    removeclass weapon
    removeclass Health

    if((getcvar("g_gametype") == "1"))
    {
    waitthread ffatype
    end
    }
    else
    {
    waitthread tdmtype
    end
    }
    end



    tdmtype:

    setcvar "g_obj_alliedtext1" "Mapa: M2L1"
    setcvar "g_obj_alliedtext2" ""
    setcvar "g_obj_alliedtext3" "Solo sniper + 1 granada"

    setcvar "g_obj_axistext1" ""
    setcvar "g_obj_axistext2" "El Server del Major Konig"
    setcvar "g_obj_axistext3" ""

    setcvar "g_scoreboardpic" "textures/mohmenu/briefing/briefing2a.tga"

    setcvar "g_gametype" "2"

    waitthread tdm_spawns
    waitthread set_da_stuff_up

    level waittill prespawn

    thread global/door_locked.scr::lock
    exec global/ambient.scr m2l1

    level waittill spawn

    level.clockside = kills


    end



    ffatype:

    setcvar "g_obj_alliedtext1" "Mapa: M2L1"
    setcvar "g_obj_alliedtext2" ""
    setcvar "g_obj_alliedtext3" "Solo sniper + 1 granada"

    setcvar "g_obj_axistext1" ""
    setcvar "g_obj_axistext2" "El Server del Major Konig"
    setcvar "g_obj_axistext3" ""

    setcvar "g_scoreboardpic" "textures/mohmenu/briefing/briefing2a.tga"


    setcvar "g_gametype" "1"

    waitthread ffa_spawns
    waitthread set_da_stuff_up

    level waittill prespawn

    thread global/door_locked.scr::lock
    exec global/ambient.scr m2l1

    level waittill spawn
    thread port01
    port01:

    local.portlight = spawn script_model
    local.portlight model "static/corona_orange.tik"
    local.portlight notsolid
    local.portlight.origin = ( -1326.21 -3033.30 485.85 ) // starting point
    local.portlight.scale = 1.5

    local.trig = spawn trigger_multiple
    local.trig targetname port01
    local.trig.origin = ( -1326.21 -3033.30 485.85 ) // starting point
    local.trig setsize ( -30 -30 0 ) ( 30 30 10 )
    $port01 waittill trigger
    local.p = parm.other
    local.p tele ( 307.13 2400.87 624.13 ) // destination
    local.p.viewangles = ( 0 -51 0 )
    local.portlight remove
    $port01 remove
    wait 10
    thread port01
    end

    thread port02
    port02:

    local.portlight = spawn script_model
    local.portlight model "static/corona_orange.tik"
    local.portlight notsolid
    local.portlight.origin = ( 4536.49 -1187.96 448.13 ) // starting point
    local.portlight.scale = 1.5

    local.trig = spawn trigger_multiple
    local.trig targetname port02
    local.trig.origin = ( 4536.49 -1187.96 448.13 ) // starting point
    local.trig setsize ( -30 -30 0 ) ( 30 30 10 )
    $port02 waittill trigger
    local.p = parm.other
    local.p tele ( 3.97 29.29 0.00 ) // destination
    local.p.viewangles = ( 0 -51 0 )
    local.portlight remove
    $port02 remove
    wait 10
    thread port02
    end

    level.clockside = kills



    end


    tdm_spawns:



    //
    spawn info_player_axis "origin" "944.45 2385.03 624.13" "angle" "-86" "targetname" "X1"
    spawn info_player_axis "origin" "765.40 2350.61 624.13" "angle" "-96" "targetname" "X2"
    spawn info_player_axis "origin" "575.13 2374.71 624.13" "angle" "-68" "targetname" "X3"
    spawn info_player_axis "origin" "796.37 2548.91 448.13" "angle" "14" "targetname" "X4"
    spawn info_player_axis "origin" "791.13 2676.48 448.13" "angle" "3" "targetname" "X5"

    spawn info_player_axis "origin" "1264.87 2605.44 448.13" "angle" "160" "targetname" "X6"
    spawn info_player_axis "origin" "1424.88 2447.13 448.13" "angle" "98" "targetname" "X7"
    spawn info_player_axis "origin" "1768.57 2115.37 448.13" "angle" "121" "targetname" "X8"
    spawn info_player_axis "origin" "1937.80 2251.59 448.13" "angle" "142" "targetname" "X9"
    spawn info_player_axis "origin" "2106.38 2326.16 448.13" "angle" "158" "targetname" "X10"

    spawn info_player_axis "origin" "2218.13 2137.92 448.13" "angle" "148" "targetname" "X11"
    spawn info_player_axis "origin" "2563.74 2220.75 448.13" "angle" "161" "targetname" "X12"
    spawn info_player_axis "origin" "1696.55 2767.52 499.36" "angle" "-135" "targetname" "X13"
    spawn info_player_axis "origin" "1893.32 2715.71 491.19" "angle" "-155" "targetname" "X14"
    spawn info_player_axis "origin" "576.07 3328.87 448.13" "angle" "-69" "targetname" "X15"



    spawn info_player_allied "origin" "392.50 -3776.87 488.12" "angle" "46" "targetname" "A1"
    spawn info_player_allied "origin" "1900.07 -3721.16 536.39" "angle" "112" "targetname" "A2"
    spawn info_player_allied "origin" "1989.64 -3120.86 478.63" "angle" "141" "targetname" "A3"
    spawn info_player_allied "origin" "-323.81 -3776.87 488.13" "angle" "128" "targetname" "A4"
    spawn info_player_allied "origin" "-1425.31 -3772.59 472.58" "angle" "44" "targetname" "A5"

    spawn info_player_allied "origin" "-1520.86 -3753.95 584.13" "angle" "61" "targetname" "A6"
    spawn info_player_allied "origin" "-1801.17 -3760.86 584.13" "angle" "9" "targetname" "A7"
    spawn info_player_allied "origin" "-2132.56 -3378.35 484.00" "angle" "33" "targetname" "A8"
    spawn info_player_allied "origin" "-2062.78 -3148.61 484.00" "angle" "8" "targetname" "A9"
    spawn info_player_allied "origin" "-1972.37 -3065.31 484.00" "angle" "58" "targetname" "A10"

    spawn info_player_allied "origin" "-1750.48 -3085.53 484.00" "angle" "87" "targetname" "A11"
    spawn info_player_allied "origin" "-1314.70 -2969.85 487.08" "angle" "0" "targetname" "A12"
    spawn info_player_allied "origin" "-1704.20 -3392.42 484.13" "angle" "23" "targetname" "A13"
    spawn info_player_allied "origin" "-2241.29 -2957.43 486.41" "angle" "-27" "targetname" "A14"
    spawn info_player_allied "origin" "-2387.16 -3133.96 481.26" "angle" "-2" "targetname" "A15"




    end




    ffa_spawns:


    spawn info_player_deathmatch "origin" "-1814.51 -2672.87 776.13" "angle" "58"
    spawn info_player_deathmatch "origin" "431.13 -3641.05 489.66" "angle" "75"
    spawn info_player_deathmatch "origin" "-1623.08 -1170.81 452.94" "angle" "3"
    spawn info_player_deathmatch "origin" "-2132.54 447.73 464.39" "angle" "-2"
    spawn info_player_deathmatch "origin" "-1619.10 1552.47 488.40" "angle" "11"

    spawn info_player_deathmatch "origin" "307.13 2400.87 624.13" "angle" "-87"
    spawn info_player_deathmatch "origin" "1008.87 2400.87 624.13" "angle" "-122"
    spawn info_player_deathmatch "origin" "820.88 1519.13 624.13" "angle" "159"
    spawn info_player_deathmatch "origin" "1315.79 1687.46 448.13" "angle" "-177"
    spawn info_player_deathmatch "origin" "891.24 1963.57 448.13" "angle" "99"

    spawn info_player_deathmatch "origin" "872.87 3252.87 448.13" "angle" "-113"
    spawn info_player_deathmatch "origin" "807.13 2613.46 448.13" "angle" "26"
    spawn info_player_deathmatch "origin" "1490.65 1656.19 502.26" "angle" "72"
    spawn info_player_deathmatch "origin" "3688.93 2288.74 503.85" "angle" "173"
    spawn info_player_deathmatch "origin" "3564.65 1390.24 484.13" "angle" "174"

    end



    set_da_stuff_up:

    // Some sounds
    local.master = spawn scriptmaster
    local.master aliascache m2l1_radio1 sound/mechanics/shortwave2.wav soundparms 0.7 0.0 1.0 0.0 100 900 auto streamed maps "m dm moh obj"
    local.master aliascache radio_loop sound/mechanics/Mec_RadioMusic_01.wav soundparms 0.5 0.0 1.0 0.0 150 800 local streamed maps "m2l1 m6l2a dm moh obj train"
    local.master aliascache m2l1_radio3 sound/mechanics/Mec_RadioLoop_05.wav soundparms 0.7 0.0 1.0 0.0 100 500 auto loaded maps "m2 dm moh obj train"


    // Remove AI
    removeclass actor

    $gate_clip remove
    $main_gate remove

    $radio1_sound loopsound m2l1_radio1
    $radio2_sound loopsound radio_loop
    $radio3_sound loopsound m2l1_radio1

    //thread Map_Guard

    level.rifle = 1
    level.bar = 1
    level.bazooka = 1
    level.mp44 = 1
    level.shotgun = 1


    end


    // not needed
    Map_Guard:

    level.killcount = 0

    spawn trigger_multipleall "targetname" "Killah"
    $Killah.origin = ( 3152.01 3558.89 590.76 )
    $Killah setsize ( -30 -130 -200 ) ( 30 30 200 )
    $Killah setthread die
    $Killah message "Play fair!"
    end

    die:
    iprintln "*** - Map_Guard Triggered - ***"
    local.punk = parm.other
    if!(isalive local.punk)
    {
    end
    }
    local.punk thread spawn_fx models/animate/fx_mortar_dirt.tik
    local.punk kill
    wait 1
    if (local.punk.health == 0)
    {
    level.killcount ++
    waitthread hudprint ("Map Guard Kills:" + level.killcount ) .75 .65 .1
    }
    end


    hudprint local.nstring local.r local.g local.b:

    huddraw_rect 187 140 -84 50 50
    huddraw_color 187 local.r local.g local.b
    huddraw_font 187 "facfont-20"
    huddraw_string 187 local.nstring
    huddraw_align 187 left bottom
    huddraw_alpha 187 1
    end

    spawn_fx local.fx:
    local.temp = spawn script_model model local.fx
    local.temp notsolid
    local.temp.origin = self.origin
    local.temp anim start
    wait 3
    local.temp remove
    end



    // End some labels
    document2:
    end
    document1:
    end
    s7_test:
    end
    music2:
    end
    document4:
    end
    document3:
    end
    ladder_hint:
    end
    enable_hall_guards:
    end

  10. #20

    Default

    You need to call the port01 thread on the tdm thread to have him on the map.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •