A Flash Developer Resource Site

Page 20 of 20 FirstFirst ... 101617181920
Results 381 to 399 of 399

Thread: rpg discussion

  1. #381
    Senior Member
    Join Date
    Jun 2002
    Posts
    192
    I've added the code to allow for vertical scrolling, and added one more screen to test it. I was having some problems with my Z-indexing, but I think I've fixed it. Tell me if you notice the character going behind the bushes when he is in fact in front of them after changing screens up and down. Oh, and as always, does anybody have a method for doind this that isn't as choppy?

    http://www.angelfire.com/games3/halberd/Smooth.swf

  2. #382
    SaphuA mosterdfles_flash's Avatar
    Join Date
    Jan 2002
    Location
    Tha Couch
    Posts
    935

    Uhm...

    Originally posted by mevolve
    I've added the code to allow for vertical scrolling, and added one more screen to test it. I was having some problems with my Z-indexing, but I think I've fixed it. Tell me if you notice the character going behind the bushes when he is in fact in front of them after changing screens up and down. Oh, and as always, does anybody have a method for doind this that isn't as choppy?

    http://www.angelfire.com/games3/halberd/Smooth.swf
    Can you please place the vertical code???

  3. #383
    Not PWD ViRGo_RK's Avatar
    Join Date
    May 2001
    Posts
    1,799
    mevolve, I mean the one that is having the scrolling problem...

  4. #384
    Senior Member
    Join Date
    Jun 2002
    Posts
    192
    Okay, well I don't know if I'd call it a problem. It is just slow. The one that is doing this though, the one I've been giving links to, Smooth.swf. If you can not tell by looking at it, or have not viewed it, the map is displayed in tiles, however, the character moves freely and is not bound by the grid. Does that give you enough info to think of any ideas?

    Mosterd, if, as you say you are using this Mario based file(which I have never heard of), it would be silly for me to post the script as it would not work with you code. The code for the scrolling is heavily dependant on how the tiles are set up in the first place in my code. If you send me the .fla file for what you are working on, or explain to me how it works, perhaps I can come up with a vertical scroll that will suite your needs.
    Or, if you think that mine will be helpful, or if you just want to see it for some other reason, then ask again and I might put it up.

  5. #385
    Not PWD ViRGo_RK's Avatar
    Join Date
    May 2001
    Posts
    1,799
    K, thanks mevolve. I wwas pretty sure it was tile based, and no offense, but no **** it's not restricted to the grid

  6. #386
    Not PWD ViRGo_RK's Avatar
    Join Date
    May 2001
    Posts
    1,799
    Wow, I noticed that I was just bleeped out. Who turned on the sensors? Now I look like an idiot. Cus bleeping yourself out makes you look stupid. Mean Flash kit

  7. #387
    Senior Member
    Join Date
    Jun 2002
    Posts
    192
    I was only mentioning that it wasn't restricted, because I wasn't sure if you had looked at the file yet. I mean it is fairly obvious that it is tile based, though I could see how it might not be. The foreground stuff would be a lot more difficult to do if it wasn't though, because if it were just one graphic for the forground, the character couldn't be in front of and behind it at the same time. Anyway, now that you know, any ideas on making a faster scroll for when it changes screens? I can make it redraw less often, but that just makes it choppier. I would really like to make it smoother.

  8. #388
    Senior Member
    Join Date
    Feb 2001
    Posts
    226
    I saw a link in this thread before.

    It was a link to a homepage...
    where you made the map,
    and then got the map code.

    example.
    (1,0,0,3,2,4,0,0,1)
    (1,0,0,0,0,0,0,0,0)
    (1,1,1,1,1,1,1,1,1)

    I can't find that link anymore.
    I really want to see that again,
    because of that i'm making a rpg
    game with hlep from Ed-Mack's tutorials.

    With that map thing, it would be
    much easier for me to make maps.

  9. #389
    Senior Member
    Join Date
    Jun 2002
    Posts
    192
    I'm afraid I don't know what or where that would be. Good luck though. Hey Teddy, at the very beginning of this topic, you posted a file called Zelda Walk6 or something. If I recall rightly, it had fairly smooth transitions between screens. Were you not using tiles to do this? If you were using tiles, how did you manage it?

  10. #390
    SaphuA mosterdfles_flash's Avatar
    Join Date
    Jan 2002
    Location
    Tha Couch
    Posts
    935

    Originally posted by mevolve


    Mosterd, if, as you say you are using this Mario based file(which I have never heard of), it would be silly for me to post the script as it would not work with you code. The code for the scrolling is heavily dependant on how the tiles are set up in the first place in my code........
    Well, I've sended you an e-mai lwith flashkit... but I'm not sure if youve got it... so here my mail agan:
    Code:
    mosterdfles_flash@hotmail.com
    and thnx for helping me

    If I'm correct... here my mail agan for if you might forget the other one

  11. #391
    Senior Member
    Join Date
    Jun 2002
    Posts
    192
    I have recieved your email and responded to it.

  12. #392
    Senior Member
    Join Date
    Mar 2002
    Location
    Canada
    Posts
    470
    hello ppl..
    i gotta a question about my health bar for you!

    onClipEvent (enterFrame) {
    if (_root.health==150){ this.gotoAndStop(1); }
    if (_root.health==135){ this.gotoAndStop(2); }
    if (_root.health==120){ this.gotoAndStop(3); }
    if (_root.health==105){ this.gotoAndStop(4); }
    if (_root.health==90){ this.gotoAndStop(5); }
    if (_root.health==75){ this.gotoAndStop(6); }
    if (_root.health==60){ this.gotoAndStop(7); }
    if (_root.health==45){ this.gotoAndStop(8); }
    if (_root.health==30){ this.gotoAndStop(9); }
    if (_root.health==15){ this.gotoAndStop(10); }
    if (_root.health==0){ _root.gotoAndPlay(5); }
    }

    i have a health MC with all the hearts and a health text box that goes down...

    thats the only way that i can some what make it work. all this does is say if the health text box equals to watever show so many hearts... but if i try to ad 15 onto the text box then it doesnt work sometimes because the health bar will equal 42 and wont change... get what i mean...

    this doesnt work:

    onClipEvent (enterFrame) {
    if (_root.health >150){ this.gotoAndStop(1); }
    if (_root.health >135){ this.gotoAndStop(2); }
    if (_root.health >120){ this.gotoAndStop(3); }
    if (_root.health >105){ this.gotoAndStop(4); }
    if (_root.health >90){ this.gotoAndStop(5); }
    if (_root.health >75){ this.gotoAndStop(6); }
    if (_root.health >60){ this.gotoAndStop(7); }
    if (_root.health >45){ this.gotoAndStop(8); }
    if (_root.health >30){ this.gotoAndStop(9); }
    if (_root.health >15){ this.gotoAndStop(10); }
    if (_root.health==0){ _root.gotoAndPlay(5); }
    }

    and things along those lines dont work... it just automatically makes the health MC go to the 10th frame with that.. anyone know why?

    should i do a different approach?

  13. #393
    Senior Member
    Join Date
    Jun 2002
    Posts
    192
    Originally posted by ZGOteddy
    hello ppl..
    i gotta a question about my health bar for you!

    onClipEvent (enterFrame) {
    if (_root.health==150){ this.gotoAndStop(1); }
    if (_root.health==135){ this.gotoAndStop(2); }
    if (_root.health==120){ this.gotoAndStop(3); }
    if (_root.health==105){ this.gotoAndStop(4); }
    if (_root.health==90){ this.gotoAndStop(5); }
    if (_root.health==75){ this.gotoAndStop(6); }
    if (_root.health==60){ this.gotoAndStop(7); }
    if (_root.health==45){ this.gotoAndStop(8); }
    if (_root.health==30){ this.gotoAndStop(9); }
    if (_root.health==15){ this.gotoAndStop(10); }
    if (_root.health==0){ _root.gotoAndPlay(5); }
    }

    i have a health MC with all the hearts and a health text box that goes down...

    thats the only way that i can some what make it work. all this does is say if the health text box equals to watever show so many hearts... but if i try to ad 15 onto the text box then it doesnt work sometimes because the health bar will equal 42 and wont change... get what i mean...

    this doesnt work:

    onClipEvent (enterFrame) {
    if (_root.health >150){ this.gotoAndStop(1); }
    if (_root.health >135){ this.gotoAndStop(2); }
    if (_root.health >120){ this.gotoAndStop(3); }
    if (_root.health >105){ this.gotoAndStop(4); }
    if (_root.health >90){ this.gotoAndStop(5); }
    if (_root.health >75){ this.gotoAndStop(6); }
    if (_root.health >60){ this.gotoAndStop(7); }
    if (_root.health >45){ this.gotoAndStop(8); }
    if (_root.health >30){ this.gotoAndStop(9); }
    if (_root.health >15){ this.gotoAndStop(10); }
    if (_root.health==0){ _root.gotoAndPlay(5); }
    }

    and things along those lines dont work... it just automatically makes the health MC go to the 10th frame with that.. anyone know why?

    should i do a different approach?
    Here is what you would need for your code to work,
    if (_root.health >135){ this.gotoAndStop(1); }
    else if (_root.health >120){ this.gotoAndStop(2); }
    else if (_root.health >105){ this.gotoAndStop(3); }
    else if (_root.health >90){ this.gotoAndStop(4); }
    else if (_root.health >75){ this.gotoAndStop(5); }
    else if (_root.health >60){ this.gotoAndStop(6); }
    else if (_root.health >45){ this.gotoAndStop(7); }
    else if (_root.health >30){ this.gotoAndStop(8); }
    else if (_root.health >15){ this.gotoAndStop(9); }
    else if (_root.health >0){ this.gotoAndStop(10); }
    else if (_root.health==0){ _root.gotoAndPlay(5); }
    This will work just fine for the effect you want. However, it is rather long, I would suggest something like this:

    if(_root.health==0){_root.gotoAndStop(5);}
    else{this.gotoAndStop(11-Math.ceil(_root.health/15));}

    So, if health is less than or equal to 15, it goes to frame 10; greater than 15, but less than or equal to 30, it will go to 9. If it is equal to 136-150, then it will go to frame 1. However, to simplify things even further, you could make the full lifebar in frame 10, and the near empty in frame one, so that you wouldn't need the 10- at the beginning. I hope that is of some help to you.

  14. #394
    Senior Member
    Join Date
    Jun 2002
    Posts
    192
    Oh yeah, and I'm not sure if I've shown anybody here this, but here are a couple of thins I've madecopy these links into the address bar, or else angelfire won't let you view them.)

    http://www.angelfire.com/games3/halberd/simprpgnet.swf

    This is the first rpg I made in flash. For the most part it is fully functional, but it is rather simple. The idea was to create a working rpg that was simple and then add to it. It was programmed so akwardly though, that it was too difficult to add new features. I've moved on to much better things since then. Anyway, press s to skip the credits, and pretty much use s o do everything else in the game. At each level up, you are given the choice to increase one of your stats, and your hp refills. If you feel like playing this simple game, I would suggest getting to at least level four before fighting any wolves. Oh yes, it has wav formatted music, so it will take a while to load.

    http://www.angelfire.com/games3/halb...ingflat0.1.swf
    (flat easy to understand)

    This is my original puzzle game, I call it Save the King for lack of a better name. It is a mze game in which your character moves according to the moves of a chess piece. By reaching certain squares on the board, you can change pieces and get different move sets. The point is to navigate to the king square. Use the number pad to control your piece. For the most part, it is fairly straight forward, however, the knight piece has very strange moves, and it is difficult to control. Good luck:

    http://www.angelfire.com/games3/halberd/saveking0.1.swf
    (The 3d version of the same game.)
    http://www.angelfire.com/games3/halberd/saveking0.5.swf
    (The improved 3d game, graphics glitches removed, better pieces, different levels, and enemy pieces.)

    I don't have many levels for that last version, but it has a lot more possibilities than the others do. I've got one last thing to show, but I think I'm going to improve it a little more before I do. Anyway, tell me what you think about these games. Remember, copy the links, do not click on them.


  15. #395
    Senior Member mbenney's Avatar
    Join Date
    Mar 2001
    Posts
    2,744
    i wouldnt do it that way personally, health bars that is, i think i can find a tutorial of an easier way.....



    yep found one!

    http://ed.gamegeared.com/flash/tuts/...mpleAS&sub=bar

    hope this helps

    [m]

  16. #396
    Senior Member
    Join Date
    Jun 2002
    Posts
    192
    Your talking about his way right? Because if you aren't I would like to point out that my way is easier than the one you brought up. My way is only two lines, the link you showed is about eight or more. Anybody have a chance to check out those games? I'm looking for some feedback.

  17. #397
    Junior Member
    Join Date
    Jun 2002
    Posts
    1

    swf's

    Is it posible to use a hittest to link swf's?

    example: I have one swf as the "town" and when the "hero" reaches the edge of the swf at a certain point, (say he is going up a path and the path ends at the edge of the swf) could I make it so another swf would load and the hero would now be in another town??

    But i just realized, that i wouldnt be able to keep any items that the character had, like money... so it would be pointless to do this...

    AHHHHHHHHH!!!!!!!!

    I'm having so much trouble with the room changing... any help? Ive checked all the pages in this discussion and the subjects on this havent helped.....

    Oh flash, why do I love you????

  18. #398
    Senior Member
    Join Date
    Jun 2002
    Posts
    192
    It really depends on your map system, however changing swf files seems like a bad idea to me. Either find another way, or consider putting the map into a movieclip and using different movieclips. Perhaps you could explain how you are doing it.

  19. #399
    Junior Member
    Join Date
    Jun 2001
    Posts
    23

    RPG

    Can anyone help me with a system to store user variables for future visits for an RPG I'm working on (cookies? databases?) You can check the only finished aspect of the game here http://www.angelfire.com/me2/crossrods/battle3.html

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center