User Tag List

Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 21 to 30 of 33

Thread: Mystery Dungeon Script ;p [help wanted]

  1. #21
    I shall exalt myself over all Armagedddon Games bigjoe's Avatar
    Join Date
    Apr 2000
    Age
    39
    Posts
    5,621
    Mentioned
    87 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,573
    Level
    24
    vBActivity - Bars
    Lv. Percent
    93.54%

    Re: Mystery Dungeon Script ;p [help wanted]

    int en_count = e8;

    Then you can tell the SCREEN how many enemies you want. I already accidentally did 80, and it was trippy. You had to kill them in droves just to stay alive.

    Then shave out the if (RandNum == 7) part and change the Rands to 7


  2. #22
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,959
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.22%

    Re: Mystery Dungeon Script ;p [help wanted]

    Oh right...I didn't do that because it would require more setup, plus I figured 18 enemies on a screen would be enough..lol!...But knowing me I would of made a variant for that eventually. hehe.

    Anyways check this one out. ver2.0
    Now with more doors. Again with this one if you F6 doors, they will be unaffected.

    Enjoy!

    Code:
    //------------------------------------------------------
    // Creates 1-3 closed shutters in a random direction as 
    // long as there is a wall.-along with a one-way wherever link enters from.
    // Once the enemies have been killed the shutter will open.
    // This will not overwrite essential doors added for specific
    // dungeon map layouts :)
    // Not used yet/ -random locked doors, boss doors, open doors-
    //------------------------------------------------------
    
    ffc script random_door_generator{   //ver2.0
    
          void run(){
    
          int RandNum = Rand(4);
                    
                    if (Link->Dir == 0 && Screen->Door[DIR_DOWN] == D_WALL){
                               Screen->Door[DIR_DOWN] = D_1WAYSHUTTER;
                  } if (Link->Dir == 1 && Screen->Door[DIR_UP] == D_WALL){
                               Screen->Door[DIR_UP] = D_1WAYSHUTTER;
                  } if (Link->Dir == 2 && Screen->Door[DIR_RIGHT] == D_WALL){
                               Screen->Door[DIR_RIGHT] = D_1WAYSHUTTER;
                  } if (Link->Dir == 3 && Screen->Door[DIR_LEFT] == D_WALL){
                               Screen->Door[DIR_LEFT] = D_1WAYSHUTTER;
                               
                  } if (RandNum == 0 && Screen->Door[DIR_DOWN] == D_WALL){
                               Screen->Door[DIR_DOWN] = D_SHUTTER;
                  } if (RandNum == 0 && Screen->Door[DIR_UP] == D_WALL){
                               Screen->Door[DIR_UP] = D_SHUTTER;
                  } if (RandNum == 1 && Screen->Door[DIR_RIGHT] == D_WALL){
                               Screen->Door[DIR_RIGHT] = D_SHUTTER;
                  } if (RandNum == 1 && Screen->Door[DIR_LEFT] == D_WALL){
                               Screen->Door[DIR_LEFT] = D_SHUTTER;
                  } if (RandNum == 2 && Screen->Door[DIR_DOWN] == D_WALL){
                               Screen->Door[DIR_DOWN] = D_SHUTTER;
                  } if (RandNum == 2 && Screen->Door[DIR_UP] == D_WALL){
                               Screen->Door[DIR_UP] = D_SHUTTER;
                  } if (RandNum == 2 && Screen->Door[DIR_RIGHT] == D_WALL){
                               Screen->Door[DIR_RIGHT] = D_SHUTTER;
                  } if (RandNum == 3 && Screen->Door[DIR_LEFT] == D_WALL){
                               Screen->Door[DIR_LEFT] = D_SHUTTER;
                  } if (RandNum == 3 && Screen->Door[DIR_RIGHT] == D_WALL){
                               Screen->Door[DIR_RIGHT] = D_SHUTTER;
                  } if (RandNum == 3 && Screen->Door[DIR_UP] == D_WALL){
                               Screen->Door[DIR_UP] = D_SHUTTER;
      
                  }
           }
    }

    Also---Uh-oh. Bugs.. How do we keep the enemies within the walls on the enemy script? Apparently Doors were not accounted for.



    Maybe some kind of x32, y32, perimeter?? Idea's?
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  3. #23
    I shall exalt myself over all Armagedddon Games bigjoe's Avatar
    Join Date
    Apr 2000
    Age
    39
    Posts
    5,621
    Mentioned
    87 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,573
    Level
    24
    vBActivity - Bars
    Lv. Percent
    93.54%

    Re: Mystery Dungeon Script ;p [help wanted]

    Just solidify the "beyond" combos on the Door Combo Sets. Like the combos that are BEHIND The shutter. thats how I fixed it


  4. #24
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,959
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.22%

    Re: Mystery Dungeon Script ;p [help wanted]

    Right. I suppose you couldn't use this on a screen with open or unlocked doors then. Well that's not so bad.

    I also have another question for someone to answer:

    Or statement;
    if (milk += funny == true){
    nose x16milk l l nose y16milk l l Link->Die;


    Which one of these runs? x16, y16, or dies? or am I using this wrong?.....
    Howabout;
    if (Link->MP >=16 l l Link->HP >= 16){
    Link happy;

    This makes more sense, but would the first one be random?....
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  5. #25
    I shall exalt myself over all Armagedddon Games bigjoe's Avatar
    Join Date
    Apr 2000
    Age
    39
    Posts
    5,621
    Mentioned
    87 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,573
    Level
    24
    vBActivity - Bars
    Lv. Percent
    93.54%

    Re: Mystery Dungeon Script ;p [help wanted]

    Well, I should have put it this way:

    Copy the Beyond tiles to another location in the combo sheet and solidify them. Switch the ones for the SHUTTER DOORS only to those.


  6. #26
    Octorok
    Join Date
    May 2007
    Posts
    331
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,506
    Level
    13
    vBActivity - Bars
    Lv. Percent
    11.29%

    Re: Mystery Dungeon Script ;p [help wanted]

    Or statement;
    if (milk += funny == true){
    nose x16milk l l nose y16milk l l Link->Die;
    oh yeah, sorry the || statement does not work that way. it is for comparisons only (if statements, while loops, etc)


    Code:
    void putenemy(int eid) 
    {
    //to do this properly we really need priority queues in ZScript ;)
    int x = Rand(12)+2;
    int y = Rand(7)+2;
    while(!is_walkable(x,y))
    {
    	x = Rand(12)+2;
    	y = Rand(7)+2;
    }
    Replace that code, it should keep the enemies from spawning inside the outter walls.

  7. #27
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,959
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.22%

    Re: Mystery Dungeon Script ;p [help wanted]

    Sweet, i'll do that. :) thanks.

    Also got another one.

    Code:
    //==============================================================================
    // FFC SCRIPT DMAP PITWARP
    // D0 -probability of warp minus 50%. To chance warp every 16 screens, set to 8.
    // D1 Dmap destination
    // D2 No need to set this 
    //==============================================================================
    ffc script Dmap_Pit{
    
            void run (int shit, int dung, int me){
    
                    int damn = Rand(shit);
                    me = Rand(116);
                    if (damn == 0){
    if ((me == 00 || me == 01 || me == 02 || me == 03 ||
        me == 04 || me == 05 || me == 06 || me == 07) ||
        (me == 10 || me == 11 || me == 12 || me == 13 ||
        me == 14 || me == 15 || me == 16 || me == 17) ||
        (me == 20 || me == 21 || me == 22 || me == 23 ||
        me == 24 || me == 25 || me == 26 || me == 27) ||
        (me == 30 || me == 31 || me == 32 || me == 33 ||
        me == 34 || me == 35 || me == 36 || me == 37) ||
        (me == 40 || me == 41 || me == 42 || me == 43 ||
        me == 44 || me == 45 || me == 46 || me == 47) ||
        (me == 50 || me == 51 || me == 52 || me == 53 ||
        me == 54 || me == 55 || me == 56 || me == 57) ||
        (me == 60 || me == 61 || me == 62 || me == 63 ||
        me == 64 || me == 65 || me == 66 || me == 67) ||
        (me == 70 || me == 71 || me == 72 || me == 73 || 
        me == 74 || me == 75 || me == 76 || me == 77)                       
    ){                        Link->PitWarp(dung,me);
                            }
                    }
            }
    }
    As you can see I tried to get around the "can warp outside the 8x8 Dmap grid" to no avail. Someone please tell me all those aren't being transformed into hexidecimals.....for the love of god..why..:madangry face.)

    One question; Why the hell is Zscript warp so difficult to work with?
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  8. #28
    Octorok
    Join Date
    May 2007
    Posts
    331
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,506
    Level
    13
    vBActivity - Bars
    Lv. Percent
    11.29%

    Re: Mystery Dungeon Script ;p [help wanted]

    Code:
    ffc script Dmap_Pit{
    
            void run (int shit, int dung, int me){
    
                    int damn = Rand(shit);
                    me = Rand(0x74);
    if (damn == 0 && me >= 0x00  && me <= 0x4D) {Link->PitWarp(dung,me);}
    }
    }
    Try that, I think it will work
    if you are wondering what all the 0x stuff is about that is just telling C, ur i mean ZScript, that it is a hex number.

    Nice varible names btw :p


    One question; Why the hell is Zscript warp so difficult to work with?
    its not if you understand hex, it is probley eaiser on the devs to have the screen numbers use hex

  9. #29
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,028
    Level
    31
    vBActivity - Bars
    Lv. Percent
    8.52%

    Re: Mystery Dungeon Script ;p [help wanted]

    You're under no obligation to use hex, warping to screen 0x10 is the same as warping to screen 16.

    Script warps work the same as ordinary, eg side or tile, warps. You give the dmap and a screen offset from the start of that dmap. You can't leave the 8x8 curtain because the dmap only encompasses 64 screens.

  10. #30
    Octorok
    Join Date
    May 2007
    Posts
    331
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,506
    Level
    13
    vBActivity - Bars
    Lv. Percent
    11.29%

    Re: Mystery Dungeon Script ;p [help wanted]

    okay I get what gleeok's problem is now (duh) yea its a Dmap thing so just place two DMaps next to each other and randomly switch between Dmaps then you have a 16x16 map, with good disign it will be transparent to the palyer.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social