Welcome, Guest. Please login or register.

Login with username, password and session length
 
Pages: [1]
  Print  
Author Topic: SGMOD MAPPERS BIBLE  (Read 4081 times)
Luke Nadewalker
Site Admins
Sergeant Major
********
Offline Offline

Posts: 692


Original Creator


« on: March 05, 2008, 03:04:28 PM »

in the following posts i will be making sure all mappers have a baseline standard to follow..

there are certain rules that should be followed, how and why......
« Last Edit: June 17, 2008, 07:36:22 PM by SGM Luke Nadewalker » Logged
Luke Nadewalker
Site Admins
Sergeant Major
********
Offline Offline

Posts: 692


Original Creator


« Reply #1 on: March 05, 2008, 03:08:37 PM »

Standard dialing sequence for the gate...

« Last Edit: March 05, 2008, 03:58:42 PM by SGM Luke Nadewalker » Logged
Luke Nadewalker
Site Admins
Sergeant Major
********
Offline Offline

Posts: 692


Original Creator


« Reply #2 on: March 05, 2008, 03:53:53 PM »

GATE DIALING RULES....

1.. A gate must be dialed by a dhd or the SGC dialing computer

2.. A gate dialing to another gate displays the chevrons on both gates during the dialing sequence

3.. A gate CANNOT dial another gate if the destination gate is active

4.. A traveller can only travel from the dialing gate (via a wormhole) to the destination gate (ONE WAY TRAVEL ONLY)

5.. Power is always required to establish an outgoing wormhole, and is usually supplied by the DHD
« Last Edit: March 05, 2008, 04:01:47 PM by SGM Luke Nadewalker » Logged
Luke Nadewalker
Site Admins
Sergeant Major
********
Offline Offline

Posts: 692


Original Creator


« Reply #3 on: March 05, 2008, 04:42:43 PM »

GATE TRAVEL SEQUENCE

(for mappers)



HOW TO DO THIS

1.. Player "ssnride" the dhd (or SGC computer)
2.. If the gate is not currently active (use a variable to check for this) then set the "active" variable to 1 and start the dialing sequence
3.. once the gate is fully dialed set the active variable to 2
4.. once the active variable = 2 and the player "ssnride" a invisible block , use this to triger the TELEPORT PLOOP
5.. during the ploop the player(s) on the invisible trigger block are forced to the first teleport object
6.. at this point the relevant RELEASE PLOOP will release any player(s) and they will fall through the wormhole
7.. here the players will trigger another TELEPORT PLOOP by means of a SSNnearSSN, once again forcing them to the next TELEPORT OBJECT
8.. once again a RELEASE PLOOP will force the players to be released from the final destination


TIPS..

use a timer system to shut the gate down, setting the active variable back to 0

put a flat psp directly under where the players will exit the final teleport object

if you have multiple gate systems, use a ACTIVE VARIABLE for each gate

REMEMBER gates only travel one way, so if you want to travel back you will have to double everything you used but in the other direction!!! (suggest you use a separate wormhole also)


CODE EXAMPLES

RELEASE PLOOP
this code checks to see if anyone is riding the destination, if so force them off it..
 use one of these for every teleport object


if ssnride(teleport object) then
    PLOOP
        if ssnonssn(player, teleport object) then
            ssnrelease(player)
        endif
    END
endif

......... this code MUST go before the following code.....



TELEPORT PLOOP
this is code to check how many players are standing on a trigger and teleport
 them in batches of a preset amount every second til they all gone
must be used in conjunction with the above code


if ssnride(teleport trigger) (and (optional event))  then
    V5 = 0
        PLOOP
            if ssnnearssn(player,object,distance) then
                inc(v5)
                if v5 < 6 then  < number here is the max players(+1) to transport in that second (MAX 20)
                    ssn2ssn(player,teleport object)
                    ssnuse(player)
                endif
            endif
        END
endif

use different variables for each teleport object (in the given example i used v5)
where ever it says " player " LEAVE IT
ALL teleport objects used with this entire code are found only in this mod




IF YOU ARE UNABLE TO FOLLOW THIS , try the SGLH
« Last Edit: June 04, 2009, 10:54:21 PM by SGM Luke Nadewalker » Logged
Luke Nadewalker
Site Admins
Sergeant Major
********
Offline Offline

Posts: 692


Original Creator


« Reply #4 on: March 30, 2008, 06:48:42 AM »

RANDOM SPAWNING

last nite i was pondering the DM problem where players respawn at the same start point over and over... after some head scratching i came up with a neat solution...

for the following code to work, every start marker you place needs to have 4 teleport objects to go with it

simply place a start player marker way out of the play area (away form any other start markers),, when the player spawns there the counter determines where the player is immediately teleported to.....



random(3)
/////////////////// repeat from here ///////////////////////

// replace "teleport object" with the ssn of a teleport object
PLOOP
        if ssnonssn(player, teleport object1) or ssnonssn(player, teleport object2) or ssnonssn(player, teleport object3) or ssnonssn(player, teleport object4) then
            ssnrelease(player)
        endif
END

//start player marker #1 ssn replaces "object" and replace the "teleport object" with numbers from the above code

PLOOP
    if ssnnearssn(player,object,6) THEN
        if rnd == 1 then
            ssn2ssn(player,teleport object1)
        elseif rnd == 2 then
            ssn2ssn(player,teleport object2)
        elseif rnd == 3 then
            ssn2ssn(player,teleport object3)
        elseif rnd == 4 then
            ssn2ssn(player,teleport object4)
        endif
        ssnuse(player)
    endif
END
///////////////////////////// to here for every start marker////////////////////////////////////


the end result will be that even if the player spawns at the same start marker more then once the counter determines one of 4 possible destinations, this makes it very unlikely for the player to appear to spawn in the same place......as we cant control when a player dies and respawns this makes it very random... random spawning is finally here  Grin
this code could also work with TDM's that have no psp's or even converted for use in COOP maps ... all upto you guys..

NOTE: suggest you have atleast 10 start markers..... this will give 40 potentially random places for players to spawn into
ALL teleport objects used with this entire code are found only in this mod

NOTE since the 1757 update a problem with this code has occured : you cannot use a start marker as a SSNNEARSSN, so throw down a waypoint and use its ssn number instead
« Last Edit: March 11, 2010, 07:11:42 AM by SGM Luke Nadewalker » Logged
Luke Nadewalker
Site Admins
Sergeant Major
********
Offline Offline

Posts: 692


Original Creator


« Reply #5 on: April 17, 2008, 11:17:56 AM »

RING TRANSPORTERS

RING TRANSPORTERS ARE NOT USED FOR LONG RANGE TELEPORTATION, however they do transport in both directions simultaniously

simply place 2 ring platform objects in your map and replace A & B with the ssn numbers for each


if ssnride(A) or ssnride(B) then
    ploop
        if ssnonssn(player,A) or ssnonssn(player,B) then
            ssnrelease(player)
        endif
    end
    if !v130 then
        v130 = ticks + 4                 
    elseif v130 == ticks then
        opendoors(0)
        wave("ringopen.wav")
        v131 = ticks + 3
    endif
else
    v130 = 0
endif
if v131 == ticks then
    ploop
        if ssnnearssn(player,A,2) then
            ssn2ssn(player,B)
            ssnuse(player)
        elseif ssnnearssn(player,B,2) then
            ssn2ssn(player,A)
            ssnuse(player)
        endif

    end
endif
if chain(1) then
    closedoors(0)
endif




this code MUST remain in this order to work


for multiple transport sets try this


if ssnride(A) or ssnride(B) or ssnride(C) or ssnride(D) then
    ploop
        if ssnonssn(player,A) or ssnonssn(player,B) or ssnonssn(player,C) or ssnonssn(player,D) then
            ssnrelease(player)
        endif
    end
    if !v130 then
        v130 = ticks + 4 
    elseif v130 == ticks then
        opendoors(0)
        wave("ringopen.wav")
        v131 = ticks + 3
    endif
else
    v130 = 0
endif
if v131 == ticks then
    ploop
        if ssnnearssn(player,A,2) then
            ssn2ssn(player,B)
            ssnuse(player)
        elseif ssnnearssn(player,B,2) then
            ssn2ssn(player,A)
            ssnuse(player)
        endif

        if ssnnearssn(player,C,2) then
            ssn2ssn(player,D)
            ssnuse(player)
        elseif ssnnearssn(player,D,2) then
            ssn2ssn(player,C)
            ssnuse(player)
        endif

    end
endif
if chain(1) then
    closedoors(0)
endif



note, if the ring transport has a player who teleports and remains on the pad, the pad will not operate again until both pads are empty

also note it takes a player to stand on the pad for 4 seconds to activate teleport.
« Last Edit: September 11, 2008, 09:04:34 AM by SGM Luke Nadewalker » Logged
Pages: [1]
  Print  
 
Jump to:  





Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
SimplePortal 2.3.2 © 2008-2010, SimplePortal