Jump to content

Selacius

Members
  • Content Count

    134
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Selacius

  • Rank
    Member
  • Birthday 10/30/1985

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Location
    Sudbury, Ontario, Canada
  1. Selacius

    Best Method To Save Data in AS3

    I am trying to figure out the best way to save my RPG object data in AS3. I would preferrably like it to be sent to a server and saved in a db, however I am struggling with how to send all of my data across to PHP. The objects are quite lengthy and have nested objects within them as well. Any suggestions would be greatly appreciated.
  2. Selacius

    Multidimensional Array Compare

    Basically I am looking for a quick way to check a section of my primary array (the section constraints defined by array 2) in order to see if the section consists of all "wall" values or a "floor" component is present.
  3. Selacius

    Multidimensional Array Compare

    I have two multidimensional arrays, one is my base array which I am building on, and the second is which I will be using to build the first. The first array will be filled with "wall" values (my range is -13 to 13 in both the y and x planes). My second array will be filled with "floor" values and can range in size across the x and y planes, which will correlate with the same location in the primary array. For example:My second array goes from y = 0 to y = 5, and x = 0 to x = 5, this correlates to y = 0 to y = 5, and x = 0 to x = 5 in the main array. I want to now compare the 2nd array to the first and check to see if for all values of array 2 that array one is walls. Basically I am creating a map and do not want any overlap between rooms (array 2). I am currently checking with a bunch of for loops, but this is time intensive and often timeouts on me. Also if there is an easy way to insert array 2 into array 1 after determining whether the location is void of any floors, that would be helpful. I once again am using for statements and it is time intensive.
  4. Selacius

    Random Dungeon/Maze Generator

    I am not necessarily looking to make a rogue-like maze however. I would like there to be big rooms, small rooms and corridors connecting them.
  5. Selacius

    Random Dungeon/Maze Generator

    Does anyone out there have or know of a method/algorithm written in PHP or Javascript that is designed to create a random dungeon/map. I am not looking for a script that creates doors, staircases, treasure chests, etc but simply creates an area with open rooms, corridors, etc. An arena of sorts to battle in (throw-back to the online game Droidarena). I have seen some online versions which do exactly what I would like, but these are designed to be printed off for D&D, etc. I just simply need to generate a random dungeon and store the layout in an array for use in my game. Suggestions even as to how to go about coding one would be great. I currently have a few attempts going, but none of them work all that great.Thanks.
  6. Selacius

    For Loop Without Increment Expression

    That is exactly what I am trying to get at. I have a way to do it now using a few if statements, but if there is a way to dynamically that would be great. the value of x is negligible. Just if I am going from small to large then it increments, and large to small it decreases.
  7. Selacius

    For Loop Without Increment Expression

    Going from -5 to 9 would be causing the $i to increase, whereas 9 to -5 would cause it to decrease.
  8. Selacius

    For Loop Without Increment Expression

    I am looking to find a way to create a for loop which automatically executes the proper increment expression. By this I mean if my x values are from -5 to 9, that it knows to go $i++, but if the values are 9 to -5, then it does $i--. I don't want ot have numerous amounts of if statements.
  9. Selacius

    Persistent JS Variables

    I am wondering how it would be possible to have a variable/s which are able to persist throughout multiple web-pages. For example, I setup my quest array which handles all of the quest information when the main exploration page loads up. Now I would like to only have to populate these arrays once and somehow allow them to be accessed from different pages which stem off the exploration page.Any clues? Thanks
  10. Selacius

    Slow Down Execution of Script

    Ive tried that in attempts to debug the script. When I alert it only pops up the first portion of the script variable (index 0) and does not show index 1. So its not proceeding onto the 2nd eval line. However when I remove eval from the for statement it alerts both index 0 and 1.
  11. Selacius

    Slow Down Execution of Script

    Nope, that still doesn't work.:S
  12. Selacius

    Slow Down Execution of Script

    Yes, it certainly does. If I forgo the For statement and manually tell it to eval the two indices of the array I move on a left downward diagonal.
  13. Selacius

    Slow Down Execution of Script

    Perfect. That works exactly how I want it. Will just need to adjust the delay. Now, my next question is, why would my eval statement not be working in this line of code: script = maps.scripts[player.y][player.x].split("|"); for (i=0; i < script.length; i++) { eval (script[i]); } The script variable is an array which will contain the functions which are to be automated (move left, down, right, up). So I want to loop through the length of this array and process the functions one at a time. Currently it only does the first function and then ends.
  14. Selacius

    Slow Down Execution of Script

    I have a function in my exploration system which I effectively want to use as a means to get the player to automatically move (somewhat like automatic cut scene). The code I am using is function movedown (num) { if (num > 0 ){ player.y++; draw_map (player.y, player.x); setTimeout(movedown(num-1), 3000) } } Which works, except that when I move onto the tile with the script, I immediately move the "num" of tiles down from my current position, instead of moving down in a stepwise fashion.Any hints?
  15. Selacius

    Trouble Using Link to Execute Function

    I have tried to alert right at the start of the function (its actually the only line presently in the function), so it is most certainly not being called. I know I have a few tags that hang open and such. I'll finish up those once everything works. I figured it out, the single quotation marks were all i needed to fix it up:)
×