Jump to content
New account registrations are disabed. This website is now an archive. Read more here.

diagostimo

Member
  • Content Count

    371
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by diagostimo

  1. well i think its official to say that the forum is been spammed crazily by bots, bad time for marked to take a holiday, definitely needs an upgrade on security
  2. thanks for the input guys, the main reason i want to get into php is because me and some friends had an idea on making more personal based forums for storing and posting information, as im already familiar in many fields of coding i thought i would give it a shot, i know by all means im not going to pick it up straight away, i learnt that when i took on other coding languages, and im still learning about them now. also thanks for the references marked, i see some great tuts up there so ill be sure to follow through with them :)
  3. hey guys, so i want to get into making a website that utilizes mysql to manage users and let them log in, from what i have read i need to learn php, but i cant find many in depth tuts to follow through, what i can do: code in html make database such as a mysql understanding of other coding languages basicly im trying to pull of a test forum for my first atempt, allowing the user to create and post on topics, i need a good tut that will help me understand php from beginning to end and how i can utilize it with mysql to achieve what i want.
  4. sure, here it is: class Game_Character #-------------------------------------------------------------------------- # * Move away from Event #-------------------------------------------------------------------------- def move_away_from_event(id) # Get difference in player coordinates sx = @x - $game_map.events[id].x sy = @y - $game_map.events[id].y # If coordinates are equal if sx == 0 and sy == 0 return end # Get absolute value of difference abs_sx = sx.abs abs_sy = sy.abs # If horizontal and vertical distances are equal if abs_sx == abs_sy # Increase one of them randomly by 1 rand(2) == 0 ? abs_sx += 1 : abs_sy += 1 end # If horizontal distance is longer if abs_sx > abs_sy # Move away from player, prioritize left and right directions sx > 0 ? move_right : move_left if not moving? and sy != 0 sy > 0 ? move_down : move_up end # If vertical distance is longer else # Move away from player, prioritize up and down directions sy > 0 ? move_down : move_up if not moving? and sx != 0 sx > 0 ? move_right : move_left end end end end that should work just use the following calls: $game_player.move_away_from_event(ID) $game_map.events[iD].move_away_from_event(ID)
  5. yes that is correct, that will check if event 1 is next to event 2, if your not getting results, that will be because of the "&& character.direction" part on the end of each condition within the script, as that checks if the event is facing it too, if you dont want that part, you can remove it as stated above and just put in your own conditions to direction via conditional branch if you ever need them
  6. on the last tab to the right of a conditional branch(when selecting whether the condition be a switch or something) theres a script insert section, add the script call there as mentioned above edit: ok i just tested the above scripts, i found 1 glitch where the event would spam its movment and the event would get there before the graphic, i have updated the top script to fix that, also i typo'd a couple of script calls, i have corrected them too, just re get everthing :) as for images how to set up an event: if the script call is to big for 1 line(the one that executes the movement) then you will have to break it up like i did in the image above for the event
  7. np, also as for the second script, i just noticed as i quickly wrote that, it wont account for y or x disposition when the x or y matches up, my bad, replace it with this: class Game_Character def character_next_to?(character) return true if character.x == @x - 1 && character.y == @y && character.direction == 6 return true if character.x == @x + 1 && character.y == @y && character.direction == 4 return true if character.y == @y - 1 && character.x == @x && character.direction == 2 return true if character.y == @y + 1 && character.x == @x && character.direction == 8 return false end end
  8. i agree, the first thing i thought when i saw the updates was that it was a rebuild of the old forum, i think they take up to much room for there purpose, maybe if we could treat them like spoilers, hiding and showing them when needed to conserve space
  9. here be a script: class Game_Character #-------------------------------------------------------------------------- # * Move toward Event #-------------------------------------------------------------------------- def move_toward_event(id) return if moving? # Get difference in player coordinates sx = @x - $game_map.events[id].x sy = @y - $game_map.events[id].y # If coordinates are equal if sx == 0 and sy == 0 return end # Get absolute value of difference abs_sx = sx.abs abs_sy = sy.abs # If horizontal and vertical distances are equal if abs_sx == abs_sy # Increase one of them randomly by 1 rand(2) == 0 ? abs_sx += 1 : abs_sy += 1 end # If horizontal distance is longer if abs_sx > abs_sy # Move towards player, prioritize left and right directions sx > 0 ? move_left : move_right if not moving? and sy != 0 sy > 0 ? move_up : move_down end # If vertical distance is longer else # Move towards player, prioritize up and down directions sy > 0 ? move_up : move_down if not moving? and sx != 0 sx > 0 ? move_left : move_right end end end end to use that use either: $game_player.move_toward_event(ID) $game_map.events[iD].move_toward_event(ID) then a script to check if the event/player is next to an event or player: class Game_Character def character_next_to?(character) return true if character.x == @x - 1 && character.y == @y && character.direction == 6 return true if character.x == @x + 1 && character.y == @y && character.direction == 4 return true if character.y == @y - 1 && character.x == @x && character.direction == 2 return true if character.y == @y + 1 && character.x == @x && character.direction == 8 return false end end to use that use either of the following script calls in a conditional branch: $game_player.character_next_to?(CHARACTER) $game_map.events[iD].character_next_to?(CHARACTER) for CHARACTER replace that to the required: $game_player $game_map.events[iD] obviously don't check it against itself, that would be stupid, i made it also check if they were facing the target, if you dont want that(but im guesing you do) just remove the "&& character.direction" parts of the ends of the conditions. so set up a conditional branch with the script call that checks if the character is next to the target, then put the first script that makes it move towards the character in the else branch, so it moves towards if that condition is not met. :)
  10. i made a rewrite a little while ago of Window_Selectable to act like such: so basicly just make your window have the parent of Window_Horizontal like you would with any other window that uses Window_selectable, the main variables to take note of are in the initialize method: @item_max = 1 #the maximum number of items to scroll through @row_max = 1 #the maximum number of rows(verticaly) @index = -1 #the initializing index value @cursor_width = 32 #the cursors width @offset = 32 #spacing between each cursor point as you said you wanted pages, if you didnt want the cursor some minor editing would be needed to set the pages width(you could use the cursors width varialbe) and you would need to remove the part that draws the cursor, as for removing up and down scrolling just leave @row_max as 1
  11. ah ok, well the choices are built into the message window, to get to all the code that controls it you would need to look inside Window_Message, are you farmiliar with ruby? im guessing you have a little knowledge from the task you have aimed for. first thing is first, Window_Message has the parent class class Window_selectable as you can see from the class name: class Window_Message < Window_Selectable this means that this class has all the methods that its parent has unless you redefine them, so because it has all the methods of that class it can act like such, now the confusing part about Window_Message is how it decides whether choices should be shown, all this is done inside the refresh and update methods, it also gets its values from $game_temp which are set by your events, the way the events setup message windows is first they set up the text, then they check the next event line to see if it is a show choices command, if it is it advances to that line and executes the show choice command adding the choices to the window, you can find the code that executes this by going to interpreter 3 and you will see command_101 is the show text command and the method that it calls to setup the choices if found in interpreter 1. what do you plan on achieving with your new choices? it would be alot easyer if i knew and i could point you the right way, if you have further questions or need help im here :)
  12. what like the message window choices, or menu, your not been very specific
  13. diagostimo

    Picture help

    ah i see the problem, after looking into spriteset_map, that automaticly creates all the picture objects, you can find this from line 44 in spriteset map: @picture_sprites = [] for i in 1..50 @picture_sprites.push(Sprite_Picture.new(@viewport2, $game_screen.pictures[i])) end we have a few options that we could do, first you could increase the z of your windows, or you could lower the z of the sprites, to lower the z of the sprites below the code i just pointed to, place this: @picture_sprites.each {|sprite| sprite.z = VALUE } that will set a default z value for all your pictures, bear in mind that the default z of a window is 100, but this would set your pictures below the fog layers etc, so i think the safest option would be to increase the z value of all your windows, actually after thinking about it, it would be very simple, go to scene base and you will see a line that says: self.z = 100 just change that value and all your windows will change, the only negative effect this would have would be for scripts that change the z value inside them, as it would not acount for your default increased value, but you could easily just go in changing the z's if a case like that did occur, finally if you do not want the pictures & fogs etc displaying at all in your menu's then you would need a rewrite of the maps spriteset, or a custom one that voids out all of the above except the map edit: on note as to what moon pearl just said, you could erase the picture in an event when you press the B button to stop it being drawn, bearing that you dont want it drawn at all
  14. diagostimo

    Picture help

    can you post the transparancy script? it using the maps spriteset for the background, i think that maybe they might have added some code that forces and update or picture creation edit: also on that matter do you want your picture apart of the background? i think the creator might have added picture creation into the menu to keep stuff legit to how it was when you entered the menu but not acounted that map pictures have a high z value, really you shouldnt play with the pictures z as you would get unexpected behaviours with fogs and what not, but you can always increase your windows z, if you look into your menu scene script, you will see something along the lines of : @command_window = Window_Command.new to give it a specified z underneath each variable that creates a window you would put the name with .z and give it value, so for the command window: @command_window.z = 1000000
  15. diagostimo

    Picture help

    true, which is why i asked if hes using a custom menu, if he is using a menu that has the maps Spriteset as the background and updates game_map in order to update the Spriteset his events will run, in that case a conditional branch that only checks if" $scene.is_a?(Scene_Map)" will work fine and not redraw the image when the menu opens
  16. diagostimo

    Picture help

    i think he is checking the scene and moving the picture acordingly, like moonpearl said you should use the erase picture command, as for checking the value of the scene(any variable for that matter) in script, you would put "$scene ==" not "$scene =" $scene = sets the value and $scene == checks it, my question is why you even need to do this stuff, by default when the map scene isnt active it disposes all pictures present, are you using a real time custom menu or anything? another alternaltive if you dont want to delete the hud is to increase the z value of your window edit: another reason you script calls are bugged, take this for example "$scene == Scene_Map.new" you need the caps, exactly like the class name is in the database
  17. your request just came true: http://forum.chaos-project.com/index.php/topic,12527.msg171259.html#new :3 from what i see anyway you can configure differnt effect when killing enemies
  18. hmmm strange, i coppied and pasted the script call i posted and changed the integers as necessary and all was well, the only thing that would cause that problem is if the actor does not exist for the one your trying to change it for, which it should if it exists in the database, as by default the engine creates all actors when a new game is created, here is 2 things that could cause any problems: you are using an old save where the actor did not exist in the database when it was created a custom script overwrites the way actors are created try it as a new game if you have been using old save data, if thats not the case do you have any scripts that could mess with the actors in any way, a demo would help if the problem persits, if you feel uncomfortable about posting it unencrypted just send me a copy with only the essentials like scripts and a test map setup to test it
  19. it would be pretty simple, from looking at you event i am guessing its some sort of steam shoot, first set your event to parallel process, in the event get it to wait 20 frames, then after the 20 frames do what you do to make the steam appear using move route commands and changing opacity ect, put a condition checking if the player is at the same location of the event, if they are set the process of them getting kicked back, if not just let it continue, a parallel process event is a self looping event so there's no need to put in a loop, i am guessing you changing self switches to control the animations, like i said do the animation with move route commands, you can change opacity and stop animation triggers ect there, making it so you can build it all in one event page. also for info purposes, as i hate using up lots of variables to do simple stuff, you can check a players location to an events in the conditional branch script section like so: $game_player.x == $game_map.events[iD].x $game_player.y == $game_map.events[iD].y you can also stick them both together into 1 check like so: $game_player.x == $game_map.events[iD].x && $game_player.y == $game_map.events[iD].y just replace id with the id of the event, if the id is the same as the event executing it you can put "@event_id", that gets the id of the running event, making it a simple copy and paste event :) also if you want change the range check of the values you can use the following operands: value <= value2 # value is lower or equal to value2 value < value2 # value is lower than value2 value >= value2 # value is greater or equal to value2 value > value2 # value is greater than value2
  20. did you try with the actor id of 1? i just tested it and found that 1 was the id of the first actor, not 0 :3
  21. its not useless, if you look at his previous post he mentioned the music stopped when entering a sub menu, that condition handles whever it should stop or not depending on the new scene
  22. ye you added that right, if you wanted to actually save going through all the code you could do this: class Scene_Menu alias main_copy main def main #start your audio main_copy if $scene.is_a?(Scene_Map) #stop your audio end end end basicly the alias copies the method defined, then we can use that object to call the old method as you can see how i implemented it, also i put a conditional check to test if the scene is a map when the script closes, that will eliminate you having to edit the input b part in the update method, so the music will only stop and revert if the new target scene is a map, with that script you would just place it below all other scripts/or your menu script :)
  23. no, the only thing you should edit is main with the audio starting at the top and ending at the bottom of the same method like this: #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main Audio.bgm_play("Audio/BGM/" + "LD", 100, 0) Audio.bgs_stop # Make command window s1 = $data_system.words.item s2 = $data_system.words.skill s3 = $data_system.words.equip s4 = "Status" s5 = "Save" s6 = "Shut Down" @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6]) @command_window.index = @menu_index # If number of party members is 0 if $game_party.actors.size == 0 # Disable items, skills, equipment, and status @command_window.disable_item(0) @command_window.disable_item(1) @command_window.disable_item(2) @command_window.disable_item(3) end # If save is forbidden if $game_system.save_disabled # Disable save @command_window.disable_item(4) end # Make play time window @playtime_window = Window_PlayTime.new @playtime_window.x = 0 @playtime_window.y = 224 # Make steps window @steps_window = Window_Steps.new @steps_window.x = 0 @steps_window.y = 320 # Make gold window @gold_window = Window_Gold.new @gold_window.x = 0 @gold_window.y = 416 # Make status window @status_window = Window_MenuStatus.new @status_window.x = 160 @status_window.y = 0 # Execute transition Graphics.transition # Main loop loop do # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed if $scene != self break end end # Prepare for transition Graphics.freeze # Dispose of windows @command_window.dispose @playtime_window.dispose @steps_window.dispose @gold_window.dispose @status_window.dispose Audio.bgm_stop $game_map.autoplay end just replace main with that, if you look i added bgs_stop at the start, that ensure the bgs doesnt carry over from the map, unless you want it to
  24. $game_actors[ACTOR_ID].equip(EQUIP_TYPE, ID) the ACTOR_ID starts at 0 i think, if not it starts at 1, for EQUIP_TYPE here are the cases: 0=weapon 1=shield 2=head 3=body 4=accessory then the ID is the id of the item in the database, 0 unequips it, hope this helps :)
  25. you added Audio.bgm_stop and $game_map.autoplay to the update_status method, they should be at the end of the main method: class Scene_Menu def main #start audio #everything else #end audio end #this is another method def update #whatever update does end end all you need to look at is the indenting of the end's, every method has an end that is inline with it just make sure you put your Audio stoping code above the main's end
×
×
  • Create New...